refactor: uniform namespace for task function(s)
[poolifier.git] / src / worker / cluster-worker.ts
index 4c1e118789d53f7228e51a5b974b80575985705f..0ccc0013e9d0314425919bc86c3ea51c8da8e29d 100644 (file)
@@ -2,7 +2,7 @@ import cluster, { type Worker } from 'node:cluster'
 import type { MessageValue } from '../utility-types'
 import { AbstractWorker } from './abstract-worker'
 import type { WorkerOptions } from './worker-options'
-import type { TaskFunctions, WorkerFunction } from './worker-functions'
+import type { TaskFunction, TaskFunctions } from './task-functions'
 
 /**
  * A cluster worker used by a poolifier `ClusterPool`.
@@ -29,9 +29,7 @@ export class ClusterWorker<
    * @param opts - Options for the worker.
    */
   public constructor (
-    taskFunctions:
-    | WorkerFunction<Data, Response>
-    | TaskFunctions<Data, Response>,
+    taskFunctions: TaskFunction<Data, Response> | TaskFunctions<Data, Response>,
     opts: WorkerOptions = {}
   ) {
     super(