TypeScript's ecosystem of self-bundled typings does not work with npm
See original GitHub issueWhen npm dependencies have same packages of different versions, tsc throws duplicate identifier errors. TypeScript’s ecosystem of packages is weaker than npm, and does not have compatibility with npm. I believe this is a large problem. And this will be a popular problem because npm always install an exact version in resolving dependencies. For example, when depending a@^0.0.2
and a@^0.0.1
as another package’s dependency, its project has a@0.0.1
and a@0.0.2
. npm can resolve these different versions, but TypeScript cannot.
TypeScript Version:
1.9.0-dev.20160526
Issue Analytics
- State:
- Created 7 years ago
- Reactions:20
- Comments:13 (9 by maintainers)
Top Results From Across the Web
TypeScript 2: custom typings for untyped npm module
Typescript 2.0 introduced typeRoots and types for loading declaration files packaged in npm packages. If you have custom typings or single loose ...
Read more >@kobdev/types - npm
The repository for *high quality* TypeScript type definitions.. Latest version: 0.1.0, ... If you still can't find it, check if it bundles its...
Read more >Publishing Node modules with TypeScript and ES modules
Its typing system and compiler are able to catch a variety of bugs at compile time before your software has even run, and...
Read more >Content Types - ESBuild
But such code will not work with real ECMAScript module implementations such as node ... So when esbuild bundles your code, your imports...
Read more >Typescript Typings: The Complete Guide: @types Compiler ...
How do I use libraries that don't have Type Definitions available? ... With ts-node installed, let's add a npm script task to run...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@mhegazy What I meant is that dependencies or their dependencies might require an older, conflicting version of a given global typing (e.g. node). Will the TypeScript compiler know to distinguish the in their respectable scopes, or will it cause problems, like the OP described?
Another problem arose: #31148