-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: Declaration EmitThe issue relates to the emission of d.ts filesThe issue relates to the emission of d.ts filesFix AvailableA PR has been opened for this issueA PR has been opened for this issueRescheduledThis issue was previously scheduled to an earlier milestoneThis issue was previously scheduled to an earlier milestone
Milestone
Description
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,
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: Declaration EmitThe issue relates to the emission of d.ts filesThe issue relates to the emission of d.ts filesFix AvailableA PR has been opened for this issueA PR has been opened for this issueRescheduledThis issue was previously scheduled to an earlier milestoneThis issue was previously scheduled to an earlier milestone
