feat(exit): update definition with option parameter (#43099)

- `streams` optional parameter
- minor updates

https://github.com/cowboy/node-exit#exit-

Thanks!
This commit is contained in:
Piotr Błażejewicz (Peter Blazejewicz)
2020-03-20 13:58:20 -04:00
committed by GitHub
parent a99eed1745
commit 2d3a320fd5
3 changed files with 9 additions and 14 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
import exit = require('exit');
exit(42);
exit(42, [process.stdout, process.stderr]);
+7 -2
View File
@@ -1,8 +1,13 @@
// Type definitions for exit 0.1.2
// Type definitions for exit 0.1
// Project: https://github.com/cowboy/node-exit
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
/**
* A replacement for process.exit that ensures stdio are fully drained before exiting.
*/
declare function exit(code: number, streams?: [NodeJS.WritableStream, NodeJS.WritableStream]): void;
declare function exit(code: number): void;
export = exit;
+1 -11
View File
@@ -1,11 +1 @@
{
"extends": "dtslint/dt.json",
"rules": {
"callable-types": false,
"dt-header": false,
"no-consecutive-blank-lines": false,
"no-redundant-jsdoc": false,
"prefer-method-signature": false,
"trim-file": false
}
}
{ "extends": "dtslint/dt.json" }