X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fworker%2Ftask-functions.ts;h=5518043eb022857209401a32ecd0a0a9d18bcf30;hb=77e8da5a0633e5a282ddc82f52b354101d112f0f;hp=353b8b0c1f8b329d71c89e6a89bbbdd921d3d548;hpb=e4c07d066abc51e978a18f44a973a548f24fb7ad;p=poolifier.git diff --git a/src/worker/task-functions.ts b/src/worker/task-functions.ts index 353b8b0c..5518043e 100644 --- a/src/worker/task-functions.ts +++ b/src/worker/task-functions.ts @@ -1,6 +1,9 @@ /** * 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. */ @@ -12,6 +15,9 @@ export type TaskSyncFunction = ( * 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. */ @@ -45,9 +51,9 @@ TaskFunction > /** - * Task function operation return type. + * Task function operation result. */ -export interface TaskFunctionOperationReturnType { +export interface TaskFunctionOperationResult { status: boolean error?: Error }