X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Futility-types.ts;h=4e2f3de4f726c9cfbcb6f890e2eee9a514feb859;hb=600543a2d1fa2acd379ca7abee65ace63775ef50;hp=9c8d9650b15ccc31007a19d199117860a650ac58;hpb=e088a00c285c320395d883d57d1db51d42300b10;p=poolifier.git diff --git a/src/utility-types.ts b/src/utility-types.ts index 9c8d9650..4e2f3de4 100644 --- a/src/utility-types.ts +++ b/src/utility-types.ts @@ -1,4 +1,4 @@ -import type { Worker } from 'cluster' +import type { Worker as ClusterWorker } from 'cluster' import type { MessagePort } from 'worker_threads' import type { IWorker } from './pools/abstract-pool' import type { KillBehavior } from './worker/worker-options' @@ -13,7 +13,7 @@ export type Draft = { -readonly [P in keyof T]?: T[P] } */ export interface MessageValue< Data = unknown, - MainWorker extends Worker | MessagePort | unknown = unknown + MainWorker extends ClusterWorker | MessagePort | unknown = unknown > { /** * Input data that will be passed to the worker. @@ -34,7 +34,7 @@ export interface MessageValue< /** * Reference to main worker. * - * _Only for internal use_ + * Only for internal use. */ readonly parent?: MainWorker }