The @types/styled-components package requires both @types/react and
@types/react-native, which was causing Typescript to melt down in a
cascade of "duplicate declaration" errors. This is because the normal
behavior of TSC is to read in all of the @types packages it can find
(regardless of the include/exclude options).
As a workaround, we can explicitly declare which @types packages we want
to use, which, at this point, is only the @types packages declared in
the package.json
Along with that, I'm also adding @types/sinon because it was missing, and
made some small changes in the include/exclude to remove things that
didn't need to be there.
The
@types/styled-components
package requires both@types/react
and@types/react-native
, which was causing Typescript to melt down in a cascade of "duplicate declaration" errors. This is because the normal behavior of TSC is to read in all of the@types
packages it can find (regardless of the include/exclude options).As a workaround, we can explicitly declare which
@types
packages we want to use, which, at this point, is only the@types
packages declared in the package.jsonAlong with that, I'm also adding
@types/sinon
because it was missing, and made some small changes in the include/exclude to remove things that didn't need to be there.