I'm not an experienced Typescript, but I dont think it is a best practice to directly depend on @types/react. Correct me if im wrong here and if it should be there please explain why.
Another aspect of this direct dependency is that there are 4 types of react consumers: raw js, compile2js lang, flowtype and typescript consumers. Even If it makes sense for typescript users that react-css directly depends on "types/react", it introduces download, bandwidth and build time tax for everybody. I dont think it is fair
@iamstarkov Tell this to some toxic typescript guys.
They are sure their ecosystem solves their problem and "who cares about others". "TS everywhere!"
So what do you suggest? Move it to optional dependencies? As moving it to peer dependencies doesn't make sense IMHO.
Anyway we also include flow types in package so it increases load time a bit too.
True, and flow types are the complete source code 馃ぃ
shouldn't it be in devDeps?
@iamstarkov Tell this to some toxic typescript guys.
can't we tell them to heck off if they are toxic?
In general I started using flow for internal purposes, to typecheck the library itself. The fact that it has been exported to the enduser is sort of an accident. I would love to not have to mix those things up with the actual library, just don't know how to do that. Currently if we apply the bus factor to @HenriBeck I will have to remove ts types lol, because I won't be able to make changes.
shouldn't it be in devDeps?
It could be in dev deps and in optional deps
people on twitter tell me it should be in devDeps
Putting the types into peer deps doesn't make sense because everyone would need to install them, also non-TS users.
We could add them to dev and optional deps maybe?
maybe it is the better option than the current one
What do other libs do with the same problem?
I think the best option is to have in optional dependencies and in dev deps.