I'm targeting Node.js 12.x, which means that I shouldn't be able to compile e.g. "foo".replaceAll("a", "b"). But if I depend on ansi-codes, or any package that depends on it, then that code compiles without error. This is a well-known issue, see e.g. https://github.com/microsoft/TypeScript/issues/33901.
This is caused by ansi-code dependency type-fest leaking library definitions. This is fixed in the latest version.
This PR is part of a campaign to stop major packages from leaking TypeScript library definitions. If you merge it and cut a release I can visit packages that depend on ansi-codes and help them upgrade.
I'm targeting Node.js 12.x, which means that I shouldn't be able to compile e.g.
"foo".replaceAll("a", "b")
. But if I depend onansi-codes
, or any package that depends on it, then that code compiles without error. This is a well-known issue, see e.g. https://github.com/microsoft/TypeScript/issues/33901.This is caused by
ansi-code
dependencytype-fest
leaking library definitions. This is fixed in the latest version.This PR is part of a campaign to stop major packages from leaking TypeScript library definitions. If you merge it and cut a release I can visit packages that depend on
ansi-codes
and help them upgrade.