This kind of merged symbol causes crashes in two places because it's marked BlockScoped, which makes us assume that it must be something that is inside a SourceFile. However, block-scoped checks don't make sense for this kind of symbol, so I exclude them by looking at the kind of the valueDeclaration, as @mprobst suggested in the original bug.
17 lines
264 B
TypeScript
17 lines
264 B
TypeScript
// @Filename: three.d.ts
|
|
export namespace THREE {
|
|
export class Vector2 {}
|
|
}
|
|
|
|
// @Filename: global.d.ts
|
|
import * as _three from './three';
|
|
|
|
export as namespace THREE;
|
|
|
|
declare global {
|
|
export const THREE: typeof _three;
|
|
}
|
|
|
|
// @Filename: test.ts
|
|
const m = THREE
|