-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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 filesFixedA PR has been merged for this issueA PR has been merged for this issue
Milestone
Description
TypeScript Version: 2.3.2
Code
// deps/dep/dep.d.ts
declare namespace NS {
interface Dep {
}
}// deps/dep/package.json
{
"typings": "dep.d.ts"
}// src/index.ts
class Src implements NS.Dep {}Compile with
// src/tsconfig.json
{
"compilerOptions": {
"declaration": true,
"types": [
"dep"
],
"typeRoots": [
"../deps"
]
}
}Expected behavior:
// src/index.d.ts
/// <reference types="dep" />
declare class Src implements NS.Dep {
}Actual behavior:
// index.d.ts
declare class Src implements NS.Dep {
}If the namespace is removed from dep.d.ts (with an interface at the top-level), the <reference> is (correctly) emitted.
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 filesFixedA PR has been merged for this issueA PR has been merged for this issue