X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fpools%2Fworker.ts;h=b3e02f3ceb5ce8631848e65fcfcba871c4dd9e3c;hb=67e046a3e7a8a3c94dd1ff95252abe57f6819068;hp=43e7fc608cb9be8d569ade1acc7dc72fe2194cad;hpb=9f95d5ebb5081a7f52a6cbd6a5a7c703081296da;p=poolifier.git diff --git a/src/pools/worker.ts b/src/pools/worker.ts index 43e7fc60..b3e02f3c 100644 --- a/src/pools/worker.ts +++ b/src/pools/worker.ts @@ -4,11 +4,15 @@ import type { Task } from '../utility-types' /** * Callback invoked when the worker has started successfully. + * + * @typeParam Worker - Type of worker. */ export type OnlineHandler = (this: Worker) => void /** * Callback invoked if the worker has received a message. + * + * @typeParam Worker - Type of worker. */ export type MessageHandler = ( this: Worker, @@ -17,6 +21,8 @@ export type MessageHandler = ( /** * Callback invoked if the worker raised an error. + * + * @typeParam Worker - Type of worker. */ export type ErrorHandler = ( this: Worker, @@ -25,6 +31,8 @@ export type ErrorHandler = ( /** * Callback invoked when the worker exits successfully. + * + * @typeParam Worker - Type of worker. */ export type ExitHandler = ( this: Worker, @@ -240,7 +248,7 @@ export interface IWorkerNode readonly usage: WorkerUsage /** * Worker choice strategy data. - * This is used to store data that is specific to the worker choice strategy. + * This is used to store data that are specific to the worker choice strategy. */ strategyData?: StrategyData /**