-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
type check doesn't run for styled-components #3515
Comments
You have If you remove the |
i've enabled
they're just samples. i got like a hundred of them, but the majority is similar, like complaining "React has no exported member Foo".
(but another big issue there is the latest parcel (2.4.1) seems to have an issue to find |
And that'd definitely be the right thing to do, however, It seems that
Not sure I follow? Our docs don't instruct to use I'm not familiar with |
#4271 seems to largely fix this, with a handful of errors still existing in |
Describe the bug
before starting, i'm honestly not sure if this's a bug or it's me doing something wrong, especially about typescript settings with preact, so i want you to check the configure in the repro code below first.
hi, i found tsc somehow didn't return a type error that i expected for components using
styled-components
in my private preact project.it checks non-
styled
components properly and returns a result as intended, also the issue doesn't happen in a react project with the same source (though the settings are kinda different as you see in my repro code).i know preact isn't 100% compatible with react in typing as well, so am kinda reckoning it causes the problem but haven't dug down preact's .d.ts and else.
To Reproduce
here's the repro code: miyacoz/preact-styled-repro
please note there're
master
branch with preact where the problem is happening, andreact
branch with react where everything's fine (= tsc properly emitting type errors).Steps to reproduce the behavior:
yarn start
then tsc starts<Styled>
having an erroralso compare the result with react one (don't forget
yarn install
after checking out).Expected behavior
tsc properly reports type errors.
in my repro code, it points out type errors with both
<Styled>
and<Component>
.The text was updated successfully, but these errors were encountered: