seas-computing / mark-one

A UI component library for building React Apps (in development)
https://seas-computing.github.io/mark-one/
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

Specify types in config #7

Closed jonseitz closed 4 years ago

jonseitz commented 4 years ago

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.