From: Jérôme Benoit Date: Fri, 31 May 2024 18:31:06 +0000 (+0200) Subject: refactor: cleanup type casting X-Git-Tag: v4.0.14~24 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;ds=inline;h=f22545899538e05c24ec929bbc16444b7bc23cb0;hp=b04efa0b62445fdf7e5237c0c20426f27edd6a1f;p=poolifier.git refactor: cleanup type casting Signed-off-by: Jérôme Benoit --- diff --git a/src/worker/abstract-worker.ts b/src/worker/abstract-worker.ts index ac6e6679..ec77ccab 100644 --- a/src/worker/abstract-worker.ts +++ b/src/worker/abstract-worker.ts @@ -399,7 +399,7 @@ export abstract class AbstractWorker< protected handleKillMessage (message: MessageValue): void { this.stopCheckActive() if (isAsyncFunction(this.opts.killHandler)) { - ;(this.opts.killHandler() as Promise) + ;(this.opts.killHandler as () => Promise)() .then(() => { this.sendToMainWorker({ kill: 'success' }) return undefined