build(deps-dev): bump @types/node
[poolifier.git] / src / worker / abstract-worker.ts
index d0803b8da98d59ca9018cd190d6020d871dfad2e..431354677c17b4da4f21035ba56b2e09ff98b34e 100644 (file)
@@ -368,7 +368,7 @@ export abstract class AbstractWorker<
    *
    * @param message - The kill message.
    */
-  protected handleKillMessage (message: MessageValue<Data>): void {
+  protected handleKillMessage (_message: MessageValue<Data>): void {
     this.stopCheckActive()
     if (isAsyncFunction(this.opts.killHandler)) {
       (this.opts.killHandler?.() as Promise<void>)
@@ -405,7 +405,7 @@ export abstract class AbstractWorker<
   private checkMessageWorkerId (message: MessageValue<Data>): void {
     if (message.workerId == null) {
       throw new Error('Message worker id is not set')
-    } else if (message.workerId != null && message.workerId !== this.id) {
+    } else if (message.workerId !== this.id) {
       throw new Error(
         `Message worker id ${message.workerId} does not match the worker id ${this.id}`
       )