I use package A and B v1 in my application. Package A itself depends on B v2, and it seems like all @types packages use * for their dependency versions. This means that I can only have either B v1 or B v2 in node_modules/@types/B.
What I would expect is to have:
- v1 in
node_modules/@types/Bused in my application - v2 in
node_modules/@types/A/node_modules/Bused byA
While writing this question I realised I could do declare module 'A'; declare module 'B'; and just ignore all typings for both packages all together. Is there some other way, keeping the typings for the respective package? Is this not a design flaw in @types packages?