-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Typing of white-space #1025
Comments
Which one do you use? TS or Flow? |
Typescript |
Then it's because you didn't put exact type. |
I don't understand your comment. The whole point is that the typing isn't correct when I use a mixin. The type should be whiteSpace but it only works with whitespace. |
@e11en It's just how TS type interference works. |
microsoft/TypeScript#29510 |
As described - to fix the issue you need to use const assertions to narrow down the type from string to a concrete string. This is not an issue specific to emotion itself - it's just a TS stuff. |
emotion
version: 9.2.4react
version: 16.4.0react-emotion
version: 9.2.4When using a mixin to fill my styled component the variable needs to be
whitespace
(lower case S) while in the normal use of white-space I need to usewhiteSpace
(upper case S). I was banging my head for a while trying to fix the error it produced. I think the typing somewhere needs to be fixed.The text was updated successfully, but these errors were encountered: