@@ -1039,7 +1039,7 @@ namespace ts {
10391039 const moduleSymbol = resolveExternalModuleName(node, (<ImportDeclaration>node.parent).moduleSpecifier);
10401040
10411041 if (moduleSymbol) {
1042- const exportDefaultSymbol = isShorthandAmbientModule (moduleSymbol.valueDeclaration ) ?
1042+ const exportDefaultSymbol = isShorthandAmbientModuleSymbol (moduleSymbol) ?
10431043 moduleSymbol :
10441044 moduleSymbol.exports["export="] ?
10451045 getPropertyOfType(getTypeOfSymbol(moduleSymbol.exports["export="]), "default") :
@@ -1115,7 +1115,7 @@ namespace ts {
11151115 if (targetSymbol) {
11161116 const name = specifier.propertyName || specifier.name;
11171117 if (name.text) {
1118- if (isShorthandAmbientModule (moduleSymbol.valueDeclaration )) {
1118+ if (isShorthandAmbientModuleSymbol (moduleSymbol)) {
11191119 return moduleSymbol;
11201120 }
11211121
@@ -3369,7 +3369,7 @@ namespace ts {
33693369 function getTypeOfFuncClassEnumModule(symbol: Symbol): Type {
33703370 const links = getSymbolLinks(symbol);
33713371 if (!links.type) {
3372- if (symbol.valueDeclaration.kind === SyntaxKind.ModuleDeclaration && isShorthandAmbientModule(<ModuleDeclaration> symbol.valueDeclaration )) {
3372+ if (symbol.valueDeclaration.kind === SyntaxKind.ModuleDeclaration && isShorthandAmbientModuleSymbol( symbol)) {
33733373 links.type = anyType;
33743374 }
33753375 else {
@@ -18292,8 +18292,8 @@ namespace ts {
1829218292
1829318293 function moduleExportsSomeValue(moduleReferenceExpression: Expression): boolean {
1829418294 let moduleSymbol = resolveExternalModuleName(moduleReferenceExpression.parent, moduleReferenceExpression);
18295- if (!moduleSymbol) {
18296- // module not found - be conservative
18295+ if (!moduleSymbol || isShorthandAmbientModuleSymbol(moduleSymbol) ) {
18296+ // If the module is not found or is shorthand, assume that it may export a value.
1829718297 return true;
1829818298 }
1829918299
0 commit comments