Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
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! |
eaf1e02
into
sindresorhus:master
|
Thank you for finishing this :) |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

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