fix: fix TS type definitions
[poolifier.git] / src / pools / pool.ts
index f4a1791504f16964c94f378be5a35b066e0cc0e9..d540bbd267256677ba872fc6b08f7690f155dd5e 100644 (file)
@@ -151,12 +151,12 @@ export interface IPool<
    */
   findFreeWorkerNodeKey: () => number
   /**
-   * Executes the function specified in the constructor with the task data input parameter.
+   * Executes the function specified in the worker constructor with the task data input parameter.
    *
-   * @param data - The task input data for the specified function. This can only be serializable data.
-   * @returns Promise that will be resolved when the task is successfully completed.
+   * @param data - The task input data for the specified worker function. This can only be serializable data.
+   * @returns Promise that will be fulfilled when the task is completed.
    */
-  execute: (data: Data) => Promise<Response>
+  execute: (data?: Data) => Promise<Response>
   /**
    * Shutdowns every current worker in this pool.
    */