1 | // Type definitions for signal-exit 3.0
|
2 | // Project: https://github.com/tapjs/signal-exit
|
3 | // Definitions by: BendingBender <https://github.com/BendingBender>
|
4 | // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
5 | // TypeScript Version: 2.1
|
6 |
|
7 | export = signalExit;
|
8 |
|
9 | declare function signalExit(
|
10 | callback: (code: number | null, signal: signalExit.Signal | null) => void,
|
11 | options?: signalExit.Options
|
12 | ): () => void;
|
13 |
|
14 | declare namespace signalExit {
|
15 | function load(): void;
|
16 | function unload(): void;
|
17 | function signals(): Signal[];
|
18 |
|
19 | type Signal = 'SIGABRT' | 'SIGALRM' | 'SIGHUP' | 'SIGINT' | 'SIGTERM' | string;
|
20 |
|
21 | interface Options {
|
22 | alwaysLast?: boolean;
|
23 | }
|
24 | }
|