We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef16f21 commit 1c43975Copy full SHA for 1c43975
examples/threaded-worker/processor.ts
@@ -38,15 +38,15 @@ export class Processor {
38
await this.input.send(req.map(pt => pt.toString()))
39
}
40
41
- const output: string[] = Array.from({length: input.length})
+ const output: (string | undefined)[] = Array.from({length: input.length})
42
for await (const [pos, res] of this.output) {
43
output[parseInt(pos.toString(), 10)] = res.toString()
44
if (output.every(el => el !== undefined)) {
45
break
46
47
48
49
- return output.join("")
+ return (output as string[]).join("")
50
51
52
async stop() {
0 commit comments