chore: migrate to eslint 9
[poolifier.git] / src / worker / task-functions.ts
index 0b3083c3aed6ca892af39070734c1562648f69af..2fd951fb2ac03d71b820a1673561630f0c9d7736 100644 (file)
@@ -2,10 +2,8 @@ import type { WorkerChoiceStrategy } from '../pools/selection-strategies/selecti
 
 /**
  * Task synchronous function that can be executed.
- *
  * @param data - Data sent to the worker.
  * @returns Execution response.
- *
  * @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.
  */
@@ -16,10 +14,8 @@ export type TaskSyncFunction<Data = unknown, Response = unknown> = (
 /**
  * Task asynchronous function that can be executed.
  * This function must return a promise.
- *
  * @param data - Data sent to the worker.
  * @returns Execution response promise.
- *
  * @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.
  */
@@ -30,7 +26,6 @@ export type TaskAsyncFunction<Data = unknown, Response = unknown> = (
 /**
  * Task 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 structured-cloneable data.
  * @typeParam Response - Type of execution response. This can only be structured-cloneable data.
  */
@@ -40,7 +35,6 @@ export type TaskFunction<Data = unknown, Response = unknown> =
 
 /**
  * Task function object.
- *
  * @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.
  */
@@ -63,13 +57,12 @@ export interface TaskFunctionObject<Data = unknown, Response = unknown> {
  * Tasks functions that can be executed.
  * The key is the name of the task function or task function object.
  * The value is the task function or task function object.
- *
  * @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,
-TaskFunction<Data, Response> | TaskFunctionObject<Data, Response>
+  string,
+  TaskFunction<Data, Response> | TaskFunctionObject<Data, Response>
 >
 
 /**