-
Notifications
You must be signed in to change notification settings - Fork 47.8k
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
Bug: JSX SVG Typescript type error: missing 'slot' attribute #32406
Comments
Can you give a brief explanation to your issue ! Exactly what you want to say |
The SVG lacks the attribute 'slot' in the Typescript type of JSX, which exists in SVGElement. |
@apprat |
Yes JavaScript and yes windows 11 and search engine bing |
|
TypeScript's JSX type definitions don't include a slot for SVGElement, even though it's valid in the DOM. A workaround is to use type assertion: <svg {...({ slot: 'start' } as any)}> or extend React.SVGProps to include slot. I hope this helps!🙄 |
This is too ugly. I hope type definitions can be added to the official repository. |
@Nipz66 |
Oo, It is not ideal. |
The text was updated successfully, but these errors were encountered: