You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My project has an external dependency that was written in Typescript, targets ES5 and depends on @types/es6-promise. I do not see a way to compile my project without tsc including node_modules/@types/es6-promise which conflicts with lib.es6.d.ts and throws type errors.
Since fake.d.ts references es6-promise as a global, but is itself a module, it is polluting the compilation context. Although you set "types": [], importing './fake' brings it back into view. Ideally you should submit a PR to the maintainer's of fake or fake's declaraction, depending on how it is distributed, that would update their declaration to import es6-promise correctly. That said, the current behavior is not good.
My project has an external dependency that was written in Typescript, targets ES5 and depends on
@types/es6-promise
. I do not see a way to compile my project withouttsc
includingnode_modules/@types/es6-promise
which conflicts withlib.es6.d.ts
and throws type errors.Am I missing a tsconfig.json option?
TypeScript Version: Version 2.1.4
Code
Here is a stripped down example:
tsconfig.json
index.ts
Some external dependency transpiled into ES5 but depending on ES6 promise -
dependency.d.ts
Expected behavior:
No type errors.
Actual behavior:
The text was updated successfully, but these errors were encountered: