chore: v3.0.10
[poolifier.git] / src / utility-types.ts
index b2470bea17df1e283ee492a4346f46bf6944a13f..60ec2f546fe50f2ab14ea96b49b60d839dd12ea0 100644 (file)
@@ -69,10 +69,6 @@ export interface WorkerStatistics {
  * @internal
  */
 export interface Task<Data = unknown> {
-  /**
-   * Worker id.
-   */
-  readonly workerId: number
   /**
    * Task name.
    */
@@ -104,6 +100,10 @@ export interface Task<Data = unknown> {
  */
 export interface MessageValue<Data = unknown, ErrorData = unknown>
   extends Task<Data> {
+  /**
+   * Worker id.
+   */
+  readonly workerId?: number
   /**
    * Kill code.
    */
@@ -118,12 +118,14 @@ export interface MessageValue<Data = unknown, ErrorData = unknown>
   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.