refactor: cleanup message passing code
[poolifier.git] / src / utility-types.ts
index 9ecf56577f999f4d56a5474917d522f644993749..2035235022d13f49cb39c98e3ea10b91cf7ca8ec 100644 (file)
@@ -68,7 +68,7 @@ export interface MessageValue<Data = unknown, ErrorData = unknown>
   /**
    * Kill code.
    */
-  readonly kill?: KillBehavior | 1
+  readonly kill?: KillBehavior | true
   /**
    * Task error.
    */
@@ -85,6 +85,10 @@ export interface MessageValue<Data = unknown, ErrorData = unknown>
    * Whether the worker has started or not.
    */
   readonly started?: boolean
+  /**
+   * Whether the worker starts or stops its aliveness check.
+   */
+  readonly checkAlive?: boolean
 }
 
 /**