redux-persist icon indicating copy to clipboard operation
redux-persist copied to clipboard

Move @types/react to dependencies.

Open tai2 opened this issue 4 years ago • 4 comments

Because @types/react is placed in devDependencies, I cannot have @types/redux-persist-expire test passed. Why it can't? My package depends on a type which redux-persist exposes, so it declares redux-persist as a dependency. When DefinitelyTyped's CI runs, it installs dependent packages then run tests and fails. @types/react won't be installed because it is declared in devDependencies.

As well as source code itself, @types dependencies should also be installed when install the library.

tai2 avatar Aug 19 '19 05:08 tai2

Just install it as a dependency in your project, it's not a dependency of this project.

wouterds avatar Aug 21 '19 13:08 wouterds

I can't install it in my project which is a DefinitelyTyped's subproject. Because DT doesn't permit me to install it in devDependencies.

tai2 avatar Aug 22 '19 13:08 tai2

Further discuttions:

dependencies is preferred way in our case as long as I understand it.

tai2 avatar Aug 22 '19 14:08 tai2

In addition to what I mentioned above, DT doesn't permit me to import what I don't directly use. @types/react is an indirect dependency for my package.

tai2 avatar Aug 22 '19 14:08 tai2