X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fworker%2Fthread-worker.ts;h=638de2ba2f9c8f090360c528cd1169cfcd52e823;hb=4335b463013675c6f5f0cd49c86ba7c75cb59c76;hp=7f3cd950a992269fb7917b7eda296419a501b6f8;hpb=67f3f2d6cb8f915ec71f81c4533ab80a6c6a6f0f;p=poolifier.git diff --git a/src/worker/thread-worker.ts b/src/worker/thread-worker.ts index 7f3cd950..638de2ba 100644 --- a/src/worker/thread-worker.ts +++ b/src/worker/thread-worker.ts @@ -42,8 +42,7 @@ export class ThreadWorker< taskFunctions: TaskFunction | TaskFunctions, opts: WorkerOptions = {} ) { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - super(isMainThread, parentPort!, taskFunctions, opts) + super(isMainThread, parentPort, taskFunctions, opts) } /** @inheritDoc */ @@ -85,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) } /**