feat(ts): add JSDoc comments for public APIs (#61649)
### What? This PR adds JSDoc comments to the most common public APIs to improve the DX in IDEs like VSCode. ### Why? Currently, we provide no information on some of the most used APIs in IDEs, which makes it harder than it needs to be to look up the extra information. <details> <summary><b>Before:</b></summary> <img src="https://github.com/vercel/next.js/assets/18369201/8b6092e8-8f9b-49da-a3df-b07a59982069" width="640"/> </details> <details> <summary><b>After:</b></summary> <img src="https://github.com/vercel/next.js/assets/18369201/30216f76-414a-43b0-9aa6-2fdd742ab3fe" width="640"/> </details> ### How? Using JSDoc comments, I added a basic description to most public APIs that link back to the current docs for more details. The description is kept minimal to avoid out-of-sync documentation. Note: In the future, the flow could be reversed here, and our API Reference docs could actually be generated from a single source of truth, the source code itself. However, this will require more work by re-organizing our public API submodules in a single directory, (related #61525), so the API docs are easy to maintain even without a deeper knowledge of the codebase. Note: These comments should also be extended to methods/properties/arguments in these public APIs in the future. Closes NEXT-2357 [Slack thread](https://vercel.slack.com/archives/C03KAR5DCKC/p1706735292633029)
Showing
Please
register
or
sign in
to comment