-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Use node module resolution for @types even when targeting non-node modules #11103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I am sure we had another issue for this, but can not seem to find it. |
@Andy-MS we should get a fix for this soon as well. |
The quick fix doesn't solve the problem when developing AMD-based projects. All modules defined in the project are in AMD format. If |
This will also enable scenario of using Rollup.js for bundling and |
@cnshenj What is your workaround for now? We have the same problem with momentjs and knockout-decorators |
@viceice Just keep using |
@cnshenj If you use relative path then it will work. That's the workaround for me. |
TypeScript Version: nightly (2.1.0-dev.20160923)
Code
node_modules/@types/a/index.d.ts
node_modules/@types/b/index.d.ts
tsconfig.json
src/foo.ts
May leave this empty.
Expected behavior
node_modules/@types/b/index.d.ts
can referencenode_modules/@types/a/index.d.ts
Actual behavior
node_modules/@types/b/index.d.ts(1,17): error TS2307: Cannot find module 'a'.
Quick fix
This may be fixed by adding
"moduleResolution": "node"
totsconfig.json
.The text was updated successfully, but these errors were encountered: