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

feature(types): add type definitions #51

Closed
wants to merge 1 commit into from
Closed

Conversation

demurgos
Copy link
Contributor

@demurgos demurgos commented Sep 19, 2018

Why

See my blog post on the benefits of type definitions.
signal-exit is extremely popular since it's used as a dependency of most code coverage tools. Writing down the public API in a strict format is a good way to specify the contracts of the API.

This PR is part of the effort to improve code coverage tools for Node as part of node-tooling group. I am going over the dependencies and checking them.

What

Add type definitions for signal-exit and link them in package.json. From a semver point of view this is a feature. Even if it's mostly there for documentation purposes, it enables TS consumers to types for this lib.

@demurgos
Copy link
Contributor Author

CI failure is due to Appveyor and Node 5, this is not caused by this PR.

@demurgos
Copy link
Contributor Author

demurgos commented Oct 9, 2018

Bump: @isaacs @bcoe @profnandaa

Copy link

@profnandaa profnandaa left a comment

Choose a reason for hiding this comment

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

I'd prefer that we deal with the major issues first (for moving this package forward), before we come to types.

@demurgos
Copy link
Contributor Author

@profnandaa Which major issues?

@profnandaa
Copy link

@demurgos - sorry, must have mixed up with spawn-child, this is the very last PR on this project as per the plan; got it now.

@demurgos
Copy link
Contributor Author

Yes, the signal-exit code is good. I just want to add these types to enable static checks and code completion in the consumers.

@demurgos
Copy link
Contributor Author

Ping @bcoe @isaacs

@bcoe
Copy link
Member

bcoe commented Mar 12, 2019

@demurgos is this still something you'd like to land, would love to work with you to get some of the work you've done in the past over the finish line.

@demurgos
Copy link
Contributor Author

demurgos commented May 7, 2019

I had less time for open-source at the start of the year but with the release of Node 12, I am catching up and am definitely OK with finishing what was started 🙂

I'll be on the node-tooling slack.

@bcoe
Copy link
Member

bcoe commented Mar 26, 2020

bump, this would still be pretty cool to land -- or could we land it on DefinitelyTyped?

@TooTallNate
Copy link
Contributor

👍

@isaacs
Copy link
Member

isaacs commented Apr 15, 2023

This will be superceded by v4 very shortly.

There are types on @types/signal-exit in the meantime.

@isaacs isaacs closed this Apr 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants