neo-one
neo-one copied to clipboard
Fix `emotion` typings
Description
In my PR to upgrade TS to v3.8.1-rc here I had to add a whole lot of any
types and other generic generic types (<{}, {}>
), mostly to the styled()
method from emotion
. This was due to some obscure and very difficult to fix types that emotion
was/is looking for. At some point this needs to be fixed and the type-safety added back. It looks like emotion
has already acknowledged the problem and merged a fix here. But it seems it won't be released until emotion
v11. See here. It's hard to tell when this will be released. I tried using @emotion/styled
v11.0.0-next.11 without success. So perhaps the fix didn't make it into that specific version? Or perhaps there's a solution mentioned here? In any case, this should be fixed when possible. It should be easy to revert my temporary fix by git revert
-ing this commit here.
Steps to Reproduce
- Open repo
- Revert commit mentioned
-
rush tsc
Expected behavior: No type errors
Actual behavior: Lots of type errors
Reproduces how often: 100%
Versions
On master
without the type fix mentioned above.
Additional Information
None.
https://github.com/emotion-js/emotion/issues/1606