Simplify worker choosing (#138)
[poolifier.git] / src / worker / abstract-worker.ts
index 5e223623225f1084d2d0e51121fa0ae4c4ee54bd..1ae7b65c7efbe67c6e9efafedd44301c5a80f15c 100644 (file)
@@ -4,10 +4,8 @@ import type { WorkerOptions } from './worker-options'
 
 export abstract class AbstractWorker<
   MainWorker,
-  // eslint-disable-next-line @typescript-eslint/no-explicit-any
-  Data = any,
-  // eslint-disable-next-line @typescript-eslint/no-explicit-any
-  Response = any
+  Data = unknown,
+  Response = unknown
 > extends AsyncResource {
   protected readonly maxInactiveTime: number
   protected readonly async: boolean
@@ -32,7 +30,7 @@ export abstract class AbstractWorker<
     this.maxInactiveTime = this.opts.maxInactiveTime ?? 1000 * 60
     this.async = !!this.opts.async
     this.lastTask = Date.now()
-    if (!fn) throw new Error('Fn parameter is mandatory')
+    if (!fn) throw new Error('fn parameter is mandatory')
     // keep the worker active
     if (!isMain) {
       this.interval = setInterval(