TypeScript/tests/cases/compiler/checkMergedGlobalUMDSymbol.ts
Nathan Shively-Sanders 0f598db3e5
Fixes #29524, a merged UMD-global (#30403)
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.
2019-03-15 09:45:33 -07:00

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