Properly integrate standard JS tools for JS and TS code
[poolifier.git] / src / pools / pool.ts
index 78e7c981b6d9e25efb0c3af38d5cab2c4a3f6014..2ce311f710e0d7a809b5b219cd7309c9354d15cf 100644 (file)
@@ -65,15 +65,15 @@ export interface IPool<Data = unknown, Response = unknown> {
    * @param data The input for the specified task. This can only be serializable data.
    * @returns Promise that will be resolved when the task is successfully completed.
    */
-  execute(data: Data): Promise<Response>
+  execute: (data: Data) => Promise<Response>
   /**
    * Shutdowns every current worker in this pool.
    */
-  destroy(): Promise<void>
+  destroy: () => Promise<void>
   /**
    * Sets the worker choice strategy in this pool.
    *
    * @param workerChoiceStrategy The worker choice strategy.
    */
-  setWorkerChoiceStrategy(workerChoiceStrategy: WorkerChoiceStrategy): void
+  setWorkerChoiceStrategy: (workerChoiceStrategy: WorkerChoiceStrategy) => void
 }