-
Notifications
You must be signed in to change notification settings - Fork 27
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 typings #15
Comments
I've marked this as an enhancement issue and will leave it open here. If anyone would like to contribute please do. |
I was gonna send a PR since the types aren't too advanced, but it seems the functions are different between CJS and ESM with CJS having Thoughts on changing the API to be the same across module types? I.e. changing CJS to module.exports.parse = parseCJS;
module.exports.init = () => Promise.reject(new Error('init is not supported when using CommonJS')); Could potentially just no-op in the last one, or warn? |
@SimenB I can get behind unifying the APIs to do that sure. That sounds like a good suggestion to me. |
Cool. I can send a couple of PRs tomorrow if you don't get to it. Current thinking is |
Thanks for the PRs! I've published a 0.6.0 with these. |
Thanks @guybedford! |
It would be very nice if this module came with TS typings 🙂
The text was updated successfully, but these errors were encountered: