fix: prepare code to fix pool internal IPC for cluster worker
[poolifier.git] / src / worker / worker-functions.ts
index 28b9ed5446b5525c6904c1ed7a3a9916064f9545..9232e58f9e9b4b9000124621e16f083af07c154d 100644 (file)
@@ -1,8 +1,8 @@
 /**
  * Worker synchronous function that can be executed.
  *
- * @typeParam Data - Type of data sent to the worker. This can only be serializable data.
- * @typeParam Response - Type of execution response. This can only be serializable data.
+ * @typeParam Data - Type of data sent to the worker. This can only be structured-cloneable data.
+ * @typeParam Response - Type of execution response. This can only be structured-cloneable data.
  */
 export type WorkerSyncFunction<Data = unknown, Response = unknown> = (
   data?: Data
@@ -12,8 +12,8 @@ export type WorkerSyncFunction<Data = unknown, Response = unknown> = (
  * Worker asynchronous function that can be executed.
  * This function must return a promise.
  *
- * @typeParam Data - Type of data sent to the worker. This can only be serializable data.
- * @typeParam Response - Type of execution response. This can only be serializable data.
+ * @typeParam Data - Type of data sent to the worker. This can only be structured-cloneable data.
+ * @typeParam Response - Type of execution response. This can only be structured-cloneable data.
  */
 export type WorkerAsyncFunction<Data = unknown, Response = unknown> = (
   data?: Data
@@ -23,8 +23,8 @@ export type WorkerAsyncFunction<Data = unknown, Response = unknown> = (
  * Worker function that can be executed.
  * This function can be synchronous or asynchronous.
  *
- * @typeParam Data - Type of data sent to the worker. This can only be serializable data.
- * @typeParam Response - Type of execution response. This can only be serializable data.
+ * @typeParam Data - Type of data sent to the worker. This can only be structured-cloneable data.
+ * @typeParam Response - Type of execution response. This can only be structured-cloneable data.
  */
 export type WorkerFunction<Data = unknown, Response = unknown> =
   | WorkerSyncFunction<Data, Response>
@@ -36,8 +36,8 @@ export type WorkerFunction<Data = unknown, Response = unknown> =
  * The key is the name of the function.
  * The value is the function itself.
  *
- * @typeParam Data - Type of data sent to the worker. This can only be serializable data.
- * @typeParam Response - Type of execution response. This can only be serializable data.
+ * @typeParam Data - Type of data sent to the worker. This can only be structured-cloneable data.
+ * @typeParam Response - Type of execution response. This can only be structured-cloneable data.
  */
 export type TaskFunctions<Data = unknown, Response = unknown> = Record<
 string,