X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Futility-types.ts;h=60ec2f546fe50f2ab14ea96b49b60d839dd12ea0;hb=8b4b3bded3afa74f22aa673871d2dfb72b6da090;hp=b2470bea17df1e283ee492a4346f46bf6944a13f;hpb=c172526cd82999efbace45402e0bd6d9ae173963;p=poolifier.git diff --git a/src/utility-types.ts b/src/utility-types.ts index b2470bea..60ec2f54 100644 --- a/src/utility-types.ts +++ b/src/utility-types.ts @@ -69,10 +69,6 @@ export interface WorkerStatistics { * @internal */ export interface Task { - /** - * Worker id. - */ - readonly workerId: number /** * Task name. */ @@ -104,6 +100,10 @@ export interface Task { */ export interface MessageValue extends Task { + /** + * Worker id. + */ + readonly workerId?: number /** * Kill code. */ @@ -118,12 +118,14 @@ export interface MessageValue readonly taskPerformance?: TaskPerformance /** * Task function operation: - * - `'has'` - Check if a task function exists. * - `'add'` - Add a task function. - * - `'delete'` - Delete a task function. + * - `'remove'` - Remove a task function. * - `'default'` - Set a task function as default. */ - readonly taskFunctionOperation?: 'has' | 'add' | 'remove' | 'default' + readonly taskFunctionOperation?: 'add' | 'remove' | 'default' + /** + * Whether the task function operation is successful or not. + */ readonly taskFunctionOperationStatus?: boolean /** * Task function serialized to string.