-
-
Notifications
You must be signed in to change notification settings - Fork 935
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 documentation comments to exported TypeScript types #1278
Conversation
Hmm ... I'm not sure why tests are failing. All code added in this PR are within comment blocks. |
Just ignore it. |
Let me know when this is done and ready for review. |
I think it is now mostly ready. There are still some parts missing, but they are either:
A specific case I have some doubts is for function overloads, like |
I'm not sure either, but you can test by requiring Got and opening it up in VSCode to see. |
Can you also update the contribution guidelines to mention that doc changes should also be applied to the doc comments, not just readme. |
I just checked. TS doesn't assume it's the same function with a different name. |
Should I duplicate the docs or leave it alone? I think this issue also exists for re-exports/types that are used in interfaces as values. (Sorry I haven't been able to dug into this ...) |
@sindresorhus Maybe let's duplicate them? |
Yeah, I guess we have to duplicate them. |
Relevant microsoft/TypeScript#407 |
# Conflicts: # source/as-promise/core.ts # source/core/index.ts
I finally got time to "finish" this 🤦 I've duplicated all the documentation as necessary, and have checked that most types should be documented. I've left out some types that are quite sparse/would rarely be used:
Please tell me if you want me to fill in any gaps listed above or need to change anything! |
Thank you for finishing this :) |
This PR address the last missing bit of #758 by adding doc comments for all public exported types.
Most of the wordings are borrowed from the README.
Questions
isStream
,resolveBodyOnly
,responseType
,NormalizedOptions
, etc.?Checklist
Fixes #758