refactor: cleanup internal pool messaging code
[poolifier.git] / src / utility-types.ts
index da2fa22300c58c99998a637c31f531dba8c982c0..f330d192296dcc62a5b86a4209126d21798acff6 100644 (file)
@@ -49,14 +49,10 @@ export interface WorkerStatistics {
  *
  * @typeParam Data - Type of data sent to the worker or execution response. This can only be structured-cloneable data.
  * @typeParam ErrorData - Type of data sent to the worker triggering an error. This can only be structured-cloneable data.
- * @typeParam MainWorker - Type of main worker.
  * @internal
  */
-export interface MessageValue<
-  Data = unknown,
-  ErrorData = unknown,
-  MainWorker = NodeJS.Process | MessagePort
-> extends Task<Data> {
+export interface MessageValue<Data = unknown, ErrorData = unknown>
+  extends Task<Data> {
   /**
    * Kill code.
    */
@@ -69,10 +65,6 @@ export interface MessageValue<
    * Task performance.
    */
   readonly taskPerformance?: TaskPerformance
-  /**
-   * Reference to main worker.
-   */
-  readonly parent?: MainWorker
   /**
    * Whether to compute the given statistics or not.
    */