X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Futility-types.ts;h=4e2f3de4f726c9cfbcb6f890e2eee9a514feb859;hb=138cda236c840c18c6234bc426e95f4b53a5e2d2;hp=9441fec4e420292905a23150d73580e73b3411cd;hpb=be0676b3936d75f22ce55b0f71a1fb03d008a01c;p=poolifier.git diff --git a/src/utility-types.ts b/src/utility-types.ts index 9441fec4..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,14 +13,14 @@ 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. */ readonly data?: Data /** - * ID of the message. + * Id of the message. */ readonly id?: number /** @@ -34,7 +34,7 @@ export interface MessageValue< /** * Reference to main worker. * - * _Only for internal use_ + * Only for internal use. */ readonly parent?: MainWorker }