X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fworker%2Fthread-worker.ts;h=638de2ba2f9c8f090360c528cd1169cfcd52e823;hb=fea198e84b17af4bd0f63cb2984447afbd1a7192;hp=2a50249f7bbd406ad6789d80167bace6cb009dc6;hpb=d35e571704515a8b729d3455e4784054f07c368f;p=poolifier.git diff --git a/src/worker/thread-worker.ts b/src/worker/thread-worker.ts index 2a50249f..638de2ba 100644 --- a/src/worker/thread-worker.ts +++ b/src/worker/thread-worker.ts @@ -42,7 +42,7 @@ export class ThreadWorker< taskFunctions: TaskFunction | TaskFunctions, opts: WorkerOptions = {} ) { - super(isMainThread, parentPort as MessagePort, taskFunctions, opts) + super(isMainThread, parentPort, taskFunctions, opts) } /** @inheritDoc */ @@ -84,7 +84,10 @@ export class ThreadWorker< protected readonly sendToMainWorker = ( message: MessageValue ): void => { - this.port?.postMessage({ ...message, workerId: this.id }) + this.port?.postMessage({ + ...message, + workerId: this.id + } satisfies MessageValue) } /**