Open Tallyb opened 4 years ago
the current workaround is to completely remove the @types/styled-components and instead use a module declaration as follow:
src
folder create a @types
directory. declare module 'styled-components';
styled-components have several issues with it's types library. They place both react-native and react types which mix poorly. I don't think I can fix it in the context of the compiler (besides applying the workaround in the compiler)
True
Describe the bug
when trying to compile a React project with Typescript and also styled-component, a bunch of errors like this one appear:
Steps to Reproduce
Expected Behavior
Project is successfully compiled.
Running yarn remove @types/styled-components
Additional context
Sadly, this is a long-lasting issue with the styled-components types: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/33015 One workaround to solve it is to add a .yarnclean file that contains the react-native typescript. However, this is not being picked by the compiler.
Specifications