neo-one icon indicating copy to clipboard operation
neo-one copied to clipboard

Fix `emotion` typings

Open spencercorwin opened this issue 5 years ago • 1 comments

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

  1. Open repo
  2. Revert commit mentioned
  3. 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.

spencercorwin avatar Feb 26 '20 18:02 spencercorwin

https://github.com/emotion-js/emotion/issues/1606

spencercorwin avatar May 05 '20 17:05 spencercorwin