Skip to content

Commit 08337f2

Browse files
authored
chore: fix some ts types (#2142)
1 parent 3380893 commit 08337f2

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

packages/rspack/src/multiCompiler.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,7 @@ export class MultiCompiler {
241241
validateDependencies(callback: Callback<Error, MultiStats>): boolean {
242242
const edges = new Set<{ source: Compiler; target: Compiler }>();
243243
const missing: string[] = [];
244-
// @ts-expect-error
245-
const targetFound = compiler => {
244+
const targetFound = (compiler: Compiler) => {
246245
for (const edge of edges) {
247246
if (edge.target === compiler) {
248247
return true;

packages/rspack/src/watching.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,7 @@ class Watching {
6868
dirs: Iterable<string>,
6969
missing: Iterable<string>
7070
) {
71-
// @ts-expect-error
72-
this.pausedWatcher = null;
71+
this.pausedWatcher = undefined;
7372
this.watcher = this.compiler.watchFileSystem.watch(
7473
files,
7574
dirs,
@@ -215,8 +214,7 @@ class Watching {
215214
this.pausedWatcher = this.watcher;
216215
this.lastWatcherStartTime = Date.now();
217216
this.watcher.pause();
218-
// @ts-expect-error
219-
this.watcher = null;
217+
this.watcher = undefined;
220218
} else if (!this.lastWatcherStartTime) {
221219
this.lastWatcherStartTime = Date.now();
222220
}

0 commit comments

Comments
 (0)