2403b8a257b0377e441a4dc2568b49571be4cdc2
1 import type { Worker
} from
'cluster'
2 import type { MessagePort
} from
'worker_threads'
3 import type { KillBehavior
} from
'./worker/worker-options'
6 * Make all properties in T non-readonly.
8 export type Draft
<T
> = { -readonly [P
in keyof T
]?: T
[P
] }
11 * Message object that is passed between worker and main worker.
13 export interface MessageValue
<
15 MainWorker
extends Worker
| MessagePort
| unknown
= unknown
18 * Input data that will be passed to the worker.
28 readonly kill
?: KillBehavior
| 1
32 readonly error
?: string
34 * Reference to main worker.
36 * _Only for internal use_
38 readonly parent?: MainWorker