Allow type and NS references to UMD globals from modules

Fixes #10638
This commit is contained in:
Ryan Cavanaugh
2016-09-14 15:52:54 -07:00
parent 4ce2280559
commit d37391fcfc
4 changed files with 47 additions and 8 deletions

View File

@@ -909,8 +909,8 @@ namespace ts {
}
}
// If we're in an external module, we can't reference symbols created from UMD export declarations
if (result && isInExternalModule) {
// If we're in an external module, we can't reference value symbols created from UMD export declarations
if (result && isInExternalModule && (meaning & SymbolFlags.Value) === SymbolFlags.Value) {
const decls = result.declarations;
if (decls && decls.length === 1 && decls[0].kind === SyntaxKind.NamespaceExportDeclaration) {
error(errorLocation, Diagnostics.Identifier_0_must_be_imported_from_a_module, name);