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
{{ message }}
Repository navigation
Cannot import d.ts files that are located in node_modules through tsconfig.json #12334
... it compiles without any errors as expected.
So, for some reason, d.ts files in the node_modules folder are ignored when imported through tsconfig.json. However, when importing the file via /// <reference ... it works in both cases.
The issue here is the implicit exclude list that the compiler adds if one is not defined. the list by default is ["node_modules", "bower_components", "jspm_packages", <outDir>]. so even after it included your file "node_modules2/monaco-editor/monaco.d.ts" it excluded it because it was under node_modules.
The workaround is to add an empty exclude list.
We will need to change the behavior here to make sure we do not add an exclude list if an include list is available.
Activity
mhegazy commentedon Nov 17, 2016
The issue here is the implicit
excludelist that the compiler adds if one is not defined. the list by default is["node_modules", "bower_components", "jspm_packages", <outDir>]. so even after it included your file"node_modules2/monaco-editor/monaco.d.ts"it excluded it because it was undernode_modules.The workaround is to add an empty
excludelist.We will need to change the behavior here to make sure we do not add an exclude list if an include list is available.