* Explicitly merge module augmentation members into the exports added by export * declarations * Use ?., add namespace merge test * Add missing merged symbol call to handle enum/ns merges during entity name lookup * Add test with error case * Handle missing value declarations in more places, unify duplicate declaration error handling to improve assignment declaration duplicate errors
26 lines
464 B
TypeScript
26 lines
464 B
TypeScript
// @filename: file.ts
|
|
export namespace Root {
|
|
// type-only NS
|
|
export interface Foo {
|
|
x: number;
|
|
}
|
|
}
|
|
// @filename: reexport.ts
|
|
export * from "./file";
|
|
// @filename: augment.ts
|
|
import * as ns from "./reexport";
|
|
|
|
declare module "./reexport" {
|
|
// Merging an enum into a type-only NS is OK
|
|
export enum Root {
|
|
A,
|
|
B,
|
|
C
|
|
}
|
|
}
|
|
|
|
declare const f: ns.Root.Foo;
|
|
const g: ns.Root = ns.Root.A;
|
|
|
|
f.x;
|