Merged
Conversation
This adds some missing information about using JSX in TypeScript. - Add the `react-jsx` and `react-jsxdev` modes in the introduction. Also mention they are called the classic and automatic runtime. - Specify where frameworks need to specify the `JSX` namespace. - Clarify which `jsx` options use which type definitions. - Specify that JSX runtimes must use package exports in order to support ESM. - Fix syntax highlighting in JSX code blocks. - Document that users may use the `@jsxRuntime` comment to override the `jsx` option on a per-file basis.
Member
|
Is there anyone who might be able to help verify this? @weswigham maybe? @DanielRosenwasser? |
Contributor
|
I can at least confirm that this is how I model the JSX support in my head (I think people are re-looking at this because React 19 is starting to come out) after giving it a look though. The only bits I'm not certain of are the ESM support docs, because I've not had to interact with that system. Feels reasonable to me though. |
Contributor
Author
|
Missing package exports are the reason why the automatic runtime in |
The JSX mode does affect type checking.
eps1lon
reviewed
Jun 6, 2024
Co-authored-by: Sebastian Silbermann <silbermann.sebastian@gmail.com>
Since it’s also possible to define the `JSX` namespace globally, `needs to` is a bit to strong. It was replaced with `should`.
Contributor
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://victorious-plant-05c166c10-3064.centralus.5.azurestaticapps.net |
jakebailey
approved these changes
Jul 8, 2024
Member
|
Gave this a reread, and everything seems to check out to me. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This adds some missing information about using JSX in TypeScript.
react-jsxandreact-jsxdevmodes in the introduction. Also mention they are called the classic and automatic runtime.JSXnamespace.jsxoptions use which type definitions.@jsxRuntimecomment to override thejsxoption on a per-file basis.