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
Copy A.d.ts to another directory, that has the ext package installed in node_modules // B.ts import * as modA from './A'
Expected behavior:
Generated A.d.ts causes no errors because typed package 'ext' was in the correct location.
Actual behavior:
A.d.ts(1,16): error TS2664: Invalid module name in augmentation, module 'ext' cannot be found.
Workarounds:
explicitly import 'ext' module while in B
re-export something from B as part of A (triggering an import to be generated in A.d.ts)
Remarks:
This is frustrating because the fact that A depended on 'ext' was an implementation detail, and in reality npm was the one that brought 'ext' into node_modules.
TypeScript Version: v1.8.10
Create a basic external npm package 'node_modules/ext'. In it, set up the following 2 files:
Reference package 'ext' from A.ts, using
--declaration, generating A.d.tsCopy A.d.ts to another directory, that has the ext package installed in node_modules
// B.ts import * as modA from './A'Expected behavior:
Generated A.d.ts causes no errors because typed package 'ext' was in the correct location.
Actual behavior:
A.d.ts(1,16): error TS2664: Invalid module name in augmentation, module 'ext' cannot be found.
Workarounds:
Remarks:
This is frustrating because the fact that A depended on 'ext' was an implementation detail, and in reality
npmwas the one that brought 'ext' into node_modules.Thoughts?