try {
this.port = message.port
this.port.on('message', this.messageListener.bind(this))
- this.sendTaskFunctionsListToMainWorker()
- this.sendToMainWorker({ ready: true, workerId: this.id })
+ this.sendToMainWorker({
+ ready: true,
+ taskFunctions: this.listTaskFunctions(),
+ workerId: this.id
+ })
} catch {
- this.sendToMainWorker({ ready: false, workerId: this.id })
+ this.sendToMainWorker({
+ ready: false,
+ taskFunctions: this.listTaskFunctions(),
+ workerId: this.id
+ })
}
}
}
}
/** @inheritDoc */
- protected handleError (e: Error | string): string {
- return e as string
+ protected handleError (error: Error | string): string {
+ return error as string
}
}