From: Jérôme Benoit Date: Fri, 13 Oct 2023 20:15:31 +0000 (+0200) Subject: build: silence type warnings X-Git-Tag: v3.0.1~10 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=9b85e2d05de962867f56024f026f89a11a2eb728;p=poolifier.git build: silence type warnings Signed-off-by: Jérôme Benoit --- diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index a0fc76c3..bec4cd29 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -622,7 +622,7 @@ export abstract class AbstractPool< for (const [workerNodeKey] of this.workerNodes.entries()) { this.workerNodes[workerNodeKey].addEventListener( 'emptyqueue', - this.handleEmptyQueueEvent + this.handleEmptyQueueEvent as EventListener ) } } @@ -631,7 +631,7 @@ export abstract class AbstractPool< for (const [workerNodeKey] of this.workerNodes.entries()) { this.workerNodes[workerNodeKey].removeEventListener( 'emptyqueue', - this.handleEmptyQueueEvent + this.handleEmptyQueueEvent as EventListener ) } } @@ -640,7 +640,7 @@ export abstract class AbstractPool< for (const [workerNodeKey] of this.workerNodes.entries()) { this.workerNodes[workerNodeKey].addEventListener( 'backpressure', - this.handleBackPressureEvent + this.handleBackPressureEvent as EventListener ) } } @@ -649,7 +649,7 @@ export abstract class AbstractPool< for (const [workerNodeKey] of this.workerNodes.entries()) { this.workerNodes[workerNodeKey].removeEventListener( 'backpressure', - this.handleBackPressureEvent + this.handleBackPressureEvent as EventListener ) } } @@ -1366,13 +1366,13 @@ export abstract class AbstractPool< if (this.opts.tasksQueueOptions?.taskStealing === true) { this.workerNodes[workerNodeKey].addEventListener( 'emptyqueue', - this.handleEmptyQueueEvent + this.handleEmptyQueueEvent as EventListener ) } if (this.opts.tasksQueueOptions?.tasksStealingOnBackPressure === true) { this.workerNodes[workerNodeKey].addEventListener( 'backpressure', - this.handleBackPressureEvent + this.handleBackPressureEvent as EventListener ) } }