-
Notifications
You must be signed in to change notification settings - Fork 8
/
index.d.ts
27 lines (27 loc) · 1.15 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
export default class Graceful {
private static DEADLY_SIGNALS;
static exitOnDouble: boolean;
static timeout: number;
private static _captureExceptions;
private static _captureRejections;
private static listeners;
private static isRegistered;
private static isExiting;
private static exceptionListener;
private static rejectionListener;
private static signalsListeners;
static get captureExceptions(): boolean;
static set captureExceptions(newValue: boolean);
static get captureRejections(): boolean;
static set captureRejections(newValue: boolean);
static on(signal: 'exit', listener: GracefulListener): GracefulSubscription;
static off(signal: 'exit', listener: GracefulListener): void;
static clear(): void;
static exit(code?: number | string, signal?: string): void;
private static onDeadlyEvent;
private static invokeListener;
private static updateRegistration;
private static killProcess;
}
export declare type GracefulListener = (signal: string, details?: object) => (void | any | Promise<any> | Promise<void> | Promise<Error>);
export declare type GracefulSubscription = () => void;