-
-
Notifications
You must be signed in to change notification settings - Fork 12
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 definition #20
Conversation
- Add @types/node as requires types from stream.
- Fix typo (buffer vs Buffer).
Let me know if there's anything in the style guide that could be clearer or improved. It's still a work-in-progress :) |
Re: the guide. I suppose the main thing I found a little tricky at first was how to use the type assertions correctly, I ended up going through a few other projects to understand the usage more correctly. |
Also note:
|
You also left out types for the default export. |
Yup I've come to realize this after the comment around the stream options, will sort out soonish :) |
I've hopefully this time covered everything :) |
Mistakes were made... |
- hookStd, stdout, stderr: Added correct typings for options. - HookPromise: Correct Promise<any> to Promise<void>.
Should be good now. |
Actually I take it back, few issues to look at still, will comment when ready for another review |
- index.js: Changed to initialise hookStd, adding the methods to hookStd, and exporting them all appropriately. - index.d.ts: Updated to single default export instead of overloaded, while the prior appeared to work, it wasn't as clean.
Updated with the default export and fixed some typings. I think this is more up to scratch now. Sorry for the delays, uni has been crazy busy. Can you please clarify a couple of things:
In the readme it specifies Cheers |
Yes
Maybe just:
|
Just wondering if there were any pending changes you were wanting that I have possibly missed? |
Thank you :) |
Great, thanks Sindre! |
Removed my request from DefinitelyTyped and migrated following your guide.
Hopefully this meets the requirements :)