-
Notifications
You must be signed in to change notification settings - Fork 9
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
feat: add ts typedefs #32
Conversation
4823e18
to
da08a98
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs the type checker run over the tests to ensure the types are as intended, otherwise releasing future changes will be very error prone.
This should also go out as a major to avoid breaking projects that have types, use this module and suddenly discover the types are not quite as they expected.
@Gozala ping |
Addressed review comments & is ready for another pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Co-authored-by: Alex Potsides <alex@achingbrain.net>
I'll need to deprecate the types in @types/err-code |
PR created DefinitelyTyped/DefinitelyTyped#52518 |
Adds typedefs so that users of this library can get those out of the box. I have considered adding them via jsdoc systax as per #31, however given all the overloads used in the implementation it's impossible to type those in jsdoc syntax without additional type magic &
@ts-ignore
comments.For this reasons and the minimal surface of this lib, I think it's more practical to just have
index.d.ts
file instead.