-
-
Notifications
You must be signed in to change notification settings - Fork 949
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
Solid Styled JSX + Typescript #169
Comments
Thanks for reporting. I will see what I can do update the types. |
How can solve this problem? Some one helps? |
You should just be able to import it: https://github.com/ryansolid/solid/tree/master/packages/solid-styled-jsx#typescript |
@ryansolid , it seems like still not work. |
I just run |
Hmm.. It should be extending the global namespace. I wonder if it is not finding it or the global extension is not working. Can you try writing that declaration in file? declare global {
namespace JSX {
interface StyleHTMLAttributes<T> {
jsx?: boolean;
global?: boolean;
dynamic?: boolean;
}
}
} As far as I know this mechanism should work (same for adding custom elements etc). But let's isolate whether it's the "solution" or the module/build system. |
I found that I need extra types for typescript to play nice with styled-jsx on solid. Using the
style
tag make typescript throw an error:Property 'jsx' does not exist on type 'StyleHTMLAttributes<HTMLStyleElement>'. [2322]
I manage to make the errors go away with similar to this issue in styled-jsx:
It would be convenient to put it on the readme or make a package out of it under
@types/solid-styled-jsx
.The text was updated successfully, but these errors were encountered: