-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from electrovir/add-types
Add Typescript definitions
- Loading branch information
Showing
3 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
# 2.1.0 | ||
|
||
- Typescript definitions added | ||
|
||
# 2.0.0 | ||
|
||
## Breaking changes | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/** | ||
* Object whose keys are signal names and values are signal objects. | ||
*/ | ||
export declare const signalsByName: { [signalName: string]: Signal } | ||
/** | ||
* Object whose keys are signal numbers and values are signal objects. | ||
*/ | ||
export declare const signalsByNumber: { [signalNumber: string]: Signal } | ||
|
||
export declare type SignalAction = | ||
| 'terminate' | ||
| 'core' | ||
| 'ignore' | ||
| 'pause' | ||
| 'unpause' | ||
export declare type SignalStandard = | ||
| 'ansi' | ||
| 'posix' | ||
| 'bsd' | ||
| 'systemv' | ||
| 'other' | ||
|
||
export declare type Signal = { | ||
/** | ||
* Standard name of the signal, for example 'SIGINT'. | ||
*/ | ||
name: string | ||
/** | ||
* Code number of the signal, for example 2. While most number are cross-platform, some are different between different OS. | ||
*/ | ||
number: number | ||
/** | ||
* Human-friendly description for the signal, for example 'User interruption with CTRL-C'. | ||
*/ | ||
description: string | ||
/** | ||
* Whether the current OS can handle this signal in Node.js using process.on(name, handler). The list of supported signals is OS-specific. | ||
*/ | ||
supported: boolean | ||
/** | ||
* What is the default action for this signal when it is not handled. | ||
*/ | ||
action: SignalAction | ||
/** | ||
* Whether the signal's default action cannot be prevented. This is true for SIGTERM, SIGKILL and SIGSTOP. | ||
*/ | ||
forced: boolean | ||
/** | ||
* Which standard defined that signal. | ||
*/ | ||
standard: SignalStandard | ||
} |