X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Futility-types.ts;h=7ea86042ff796660b57410561bd1b57a2b9c8025;hb=0e19141a4c860c96cde0eac21023cef79e6b22f5;hp=82dbb4233dab878049059a6334bb1bbcceab2c94;hpb=fb41d7f7735b2e2b13874c11aeb55829f79f292f;p=poolifier.git diff --git a/src/utility-types.ts b/src/utility-types.ts index 82dbb423..7ea86042 100644 --- a/src/utility-types.ts +++ b/src/utility-types.ts @@ -1,9 +1,9 @@ import type { Worker } from 'cluster' import type { MessagePort } from 'worker_threads' +import type { KillBehavior } from './worker/worker-options' -export type KillBehavior = 'HARD' | 'SOFT' /** - * Make all properties in T non-readonly + * Make all properties in T non-readonly. */ export type Draft = { -readonly [P in keyof T]?: T[P] } @@ -43,7 +43,7 @@ export interface MessageValue< /** * Kill code. */ - readonly kill?: KillBehavior | number + readonly kill?: KillBehavior | 1 /** * Error. */ @@ -55,4 +55,3 @@ export interface MessageValue< */ readonly parent?: MainWorker } -