diff --git a/packages/rspack/src/multiCompiler.ts b/packages/rspack/src/multiCompiler.ts index b11bad98f603..b475708290b8 100644 --- a/packages/rspack/src/multiCompiler.ts +++ b/packages/rspack/src/multiCompiler.ts @@ -241,8 +241,7 @@ export class MultiCompiler { validateDependencies(callback: Callback): boolean { const edges = new Set<{ source: Compiler; target: Compiler }>(); const missing: string[] = []; - // @ts-expect-error - const targetFound = compiler => { + const targetFound = (compiler: Compiler) => { for (const edge of edges) { if (edge.target === compiler) { return true; diff --git a/packages/rspack/src/watching.ts b/packages/rspack/src/watching.ts index 5ab3b3707cfd..62ddd7260a88 100644 --- a/packages/rspack/src/watching.ts +++ b/packages/rspack/src/watching.ts @@ -65,8 +65,7 @@ class Watching { dirs: Iterable, missing: Iterable ) { - // @ts-expect-error - this.pausedWatcher = null; + this.pausedWatcher = undefined; this.watcher = this.compiler.watchFileSystem.watch( files, dirs, @@ -212,8 +211,7 @@ class Watching { this.pausedWatcher = this.watcher; this.lastWatcherStartTime = Date.now(); this.watcher.pause(); - // @ts-expect-error - this.watcher = null; + this.watcher = undefined; } else if (!this.lastWatcherStartTime) { this.lastWatcherStartTime = Date.now(); }