**TypeScript Version:** 3.4.2 **Search Terms:** .d.ts; import path Suppose I have following project structure:  The codes are emplaced at https://github.com/shrinktofit/ts-issue . The generated .d.ts will be: ``` declare module "nested/shared" { export class B { } } declare module "nested/base" { import { B } from "nested/shared"; export function f(): B; } declare module "nested/derived" { export function g(): import("nested").B; // LINE 10 } declare module "nested/index" { export * from "nested/base"; export * from "nested/derived"; export * from "nested/shared"; } declare module "index" { export * from "nested/index"; } ``` In line 10, the `import("nested").B` is an error with message `nested is not a module`; If I change it to `import("nested/index").B`, it's fine,
Activity
[-]Module resolution in .d.ts cannot recognize 'xx/index''[/-][+].d.ts generation error behaviour[/+]shrinktofit commentedon May 7, 2019
If I do not export
nested/sharedin modulenested/index, generated code becomes:and the error disappear.
4 remaining items