-
Notifications
You must be signed in to change notification settings - Fork 27.5k
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
refactor: use exports
#61525
Closed
Closed
refactor: use exports
#61525
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
balazsorban44
commented
Feb 1, 2024
"types": "./dist/pages/_document.d.ts", | ||
"default": "./dist/pages/_document.js" | ||
}, | ||
"./dist/*": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should provide backward compatibility for imports like next/dist/...
but technically this was never supported. We could get rid of it in a major release
balazsorban44
added a commit
that referenced
this pull request
Feb 2, 2024
balazsorban44
added a commit
that referenced
this pull request
Feb 5, 2024
### 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)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes NEXT-2332