| | |
| | | type ExitListener = (code: number) => void; |
| | | type RejectionHandledListener = (promise: Promise<unknown>) => void; |
| | | type UncaughtExceptionListener = (error: Error, origin: UncaughtExceptionOrigin) => void; |
| | | type UnhandledRejectionListener = (reason: {} | null | undefined, promise: Promise<unknown>) => void; |
| | | /** |
| | | * Most of the time the unhandledRejection will be an Error, but this should not be relied upon |
| | | * as *anything* can be thrown/rejected, it is therefore unsafe to assume the the value is an Error. |
| | | */ |
| | | type UnhandledRejectionListener = (reason: unknown, promise: Promise<unknown>) => void; |
| | | type WarningListener = (warning: Error) => void; |
| | | type MessageListener = (message: unknown, sendHandle: unknown) => void; |
| | | type SignalsListener = (signal: Signals) => void; |
| | |
| | | /** |
| | | * If true, a diagnostic report is generated when the process |
| | | * receives the signal specified by process.report.signal. |
| | | * @defaul false |
| | | * @default false |
| | | */ |
| | | reportOnSignal: boolean; |
| | | /** |
| | |
| | | emit(event: 'unhandledRejection', reason: unknown, promise: Promise<unknown>): boolean; |
| | | emit(event: 'warning', warning: Error): boolean; |
| | | emit(event: 'message', message: unknown, sendHandle: unknown): this; |
| | | emit(event: Signals, signal: Signals): boolean; |
| | | emit(event: Signals, signal?: Signals): boolean; |
| | | emit(event: 'multipleResolves', type: MultipleResolveType, promise: Promise<unknown>, value: unknown): this; |
| | | emit(event: 'worker', listener: WorkerListener): this; |
| | | on(event: 'beforeExit', listener: BeforeExitListener): this; |