X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Futility-types.ts;h=685e5c4c606755bf801dd6c13d582d3657f8fe8e;hb=c319c66bad0611acf6087950a1f8a20f8124167b;hp=458b31a055ef7d4a92e86bd9f9fbd1be46512d80;hpb=f06e48d8e14dcfe3277bd16b1bd2463136af13e6;p=poolifier.git diff --git a/src/utility-types.ts b/src/utility-types.ts index 458b31a0..685e5c4c 100644 --- a/src/utility-types.ts +++ b/src/utility-types.ts @@ -10,6 +10,9 @@ export type Draft = { -readonly [P in keyof T]?: T[P] } /** * Message object that is passed between worker and main worker. + * + * @typeParam Data - Type of data sent to the worker. This can only be serializable data. + * @typeParam MainWorker - Type of main worker. */ export interface MessageValue< Data = unknown, @@ -39,6 +42,7 @@ export interface MessageValue< * Reference to main worker. * * Only for internal use. + * @internal */ readonly parent?: MainWorker } @@ -48,6 +52,7 @@ export interface MessageValue< * * @typeParam Worker - Type of worker. * @typeParam Response - Type of execution response. This can only be serializable data. + * @internal */ export interface PromiseResponseWrapper< Worker extends IWorker, @@ -62,7 +67,7 @@ export interface PromiseResponseWrapper< */ readonly reject: (reason?: string) => void /** - * The worker handling the promise. + * The worker handling the execution. */ readonly worker: Worker }