Skip to content

Commit 1c43975

Browse files
committed
fix: fix the output lint error in threaded-worker
1 parent ef16f21 commit 1c43975

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/threaded-worker/processor.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ export class Processor {
3838
await this.input.send(req.map(pt => pt.toString()))
3939
}
4040

41-
const output: string[] = Array.from({length: input.length})
41+
const output: (string | undefined)[] = Array.from({length: input.length})
4242
for await (const [pos, res] of this.output) {
4343
output[parseInt(pos.toString(), 10)] = res.toString()
4444
if (output.every(el => el !== undefined)) {
4545
break
4646
}
4747
}
4848

49-
return output.join("")
49+
return (output as string[]).join("")
5050
}
5151

5252
async stop() {

0 commit comments

Comments
 (0)