Skip to content
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

docs: add type assertion to React.JSX.Element type #867

Merged
merged 2 commits into from
Dec 17, 2024

Conversation

karlhorky
Copy link
Contributor

Description

Add TypeScript type assertion to the React.JSX.Element type, because hast-util-to-jsx-runtime will not update types for React 19:

The hast-util-to-jsx-runtime project recommends adding back the JSX global namespace:

But this seems like an unusual way, considering that the ecosystem is moving away from that.

So I suggest the type assertion to work around this.

@antfu if you would prefer a different type eg. ReactElement or some other method like adding back the global JSX namespace, I can do that instead.

Linked Issues

--

Additional context

--

Copy link

netlify bot commented Dec 16, 2024

Deploy Preview for shiki-next ready!

Name Link
🔨 Latest commit f828fc1
🔍 Latest deploy log https://app.netlify.com/sites/shiki-next/deploys/676056bd1e1fa20008674ddb
😎 Deploy Preview https://deploy-preview-867--shiki-next.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Dec 16, 2024

Deploy Preview for shiki-matsu ready!

Name Link
🔨 Latest commit f828fc1
🔍 Latest deploy log https://app.netlify.com/sites/shiki-matsu/deploys/676056bcb33b16000824a1f5
😎 Deploy Preview https://deploy-preview-867--shiki-matsu.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@antfu antfu merged commit c01b456 into shikijs:main Dec 17, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants