Version of ts-toolbelt used by @types/ramda declares global modules and names, it causes errors of duplication when I want to use ramda with other packages that also use ts-toolbelt or having two packages in my monorepo use ramda.
If you know how to fix the issue, make a pull request instead.
@types/ramda package and had problems.Definitions by: in index.d.ts) so they can respond.If you do not mention the authors the issue will be ignored.
@Igorbek I can confirm that @types/react-query is also affected by this. I have an application that uses both react-query _and_ ramda. Typescript fails to compile, due to the global namespace pollution that @KSXGitHub describes.
Ah, that's sad. I can move from using it and use typescript-tuple instead.
Thanks @Igorbek !
Ah, that's sad. I can move from using it and use
typescript-tupleinstead.
You may not need to. typescript-tuple has fewer features, and I don't think the latest version of ts-toolbelt still uses global namespace.
I totally admire ts-toolbelt has more features but in terms of tuples, typescript-tuple has some superior features like working with finite/infinite tuples more precisely. Anyway, ts-toolbelt needs to be updated for the latest version in ramda.
typescript-tuplehas some superior features like working with finite/infinite tuples more precisely
Well thanks. I'm flattered.
@KSXGitHub, is this still a problem?
@millsp IIRC, I worked around this problem by stop using ramda (I wrote my own library), so I don't know.
I can confirm that it's fixed, you can close the issue
@millsp I'm not sure. Even the latest version of ts-toolbelt still has declare module "...". I'm pretty sure this problem will occur again in the future.
I see. Sorry about that. Will fix soon
Not actually. The problem was caused by declare module "index" which I changed to declare module "ts-toolbelt". This is exactly how the upcoming type bundling feature is going to work https://github.com/microsoft/TypeScript/pull/39277. No problem.
Most helpful comment
@Igorbek I can confirm that
@types/react-queryis also affected by this. I have an application that uses both react-query _and_ ramda. Typescript fails to compile, due to the global namespace pollution that @KSXGitHub describes.