Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TypeScript types definition #3

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions lib/exit.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/// <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;

export = exit;
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@
"name": "exit-x",
"description": "A replacement for process.exit that ensures stdio are fully drained before exiting.",
"version": "0.2.1",
"homepage": "https://github.com/cowboy/node-exit",
"homepage": "https://github.com/gruntjs/node-exit-x",
"author": "Grunt Development Team (https://gruntjs.com/development-team)",
"repository": {
"type": "git",
"url": "git://github.com/gruntjs/node-exit-x.git"
},
"bugs": {
"url": "https://github.com/gruntjs/node-exit/issues"
"url": "https://github.com/gruntjs/node-exit-x/issues"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This depends on this repo enabling the "Issues" tab for this project

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ping @vladikoff

},
"license": "MIT",
"main": "lib/exit",
"main": "lib/exit.js",
"types": "lib/exit.d.ts",
"engines": {
"node": ">= 0.8.0"
},
Expand Down
Loading