@@ -1043,7 +1043,7 @@ namespace ts {
10431043 const moduleSymbol = resolveExternalModuleName(node, (<ImportDeclaration>node.parent).moduleSpecifier);
10441044
10451045 if (moduleSymbol) {
1046- const exportDefaultSymbol = isShorthandAmbientModule (moduleSymbol.valueDeclaration ) ?
1046+ const exportDefaultSymbol = isShorthandAmbientModuleSymbol (moduleSymbol) ?
10471047 moduleSymbol :
10481048 moduleSymbol.exports["export="] ?
10491049 getPropertyOfType(getTypeOfSymbol(moduleSymbol.exports["export="]), "default") :
@@ -1119,7 +1119,7 @@ namespace ts {
11191119 if (targetSymbol) {
11201120 const name = specifier.propertyName || specifier.name;
11211121 if (name.text) {
1122- if (isShorthandAmbientModule (moduleSymbol.valueDeclaration )) {
1122+ if (isShorthandAmbientModuleSymbol (moduleSymbol)) {
11231123 return moduleSymbol;
11241124 }
11251125
@@ -3382,7 +3382,7 @@ namespace ts {
33823382 function getTypeOfFuncClassEnumModule(symbol: Symbol): Type {
33833383 const links = getSymbolLinks(symbol);
33843384 if (!links.type) {
3385- if (symbol.valueDeclaration.kind === SyntaxKind.ModuleDeclaration && isShorthandAmbientModule(<ModuleDeclaration> symbol.valueDeclaration )) {
3385+ if (symbol.valueDeclaration.kind === SyntaxKind.ModuleDeclaration && isShorthandAmbientModuleSymbol( symbol)) {
33863386 links.type = anyType;
33873387 }
33883388 else {
@@ -18371,8 +18371,8 @@ namespace ts {
1837118371
1837218372 function moduleExportsSomeValue(moduleReferenceExpression: Expression): boolean {
1837318373 let moduleSymbol = resolveExternalModuleName(moduleReferenceExpression.parent, moduleReferenceExpression);
18374- if (!moduleSymbol) {
18375- // module not found - be conservative
18374+ if (!moduleSymbol || isShorthandAmbientModuleSymbol(moduleSymbol) ) {
18375+ // If the module is not found or is shorthand, assume that it may export a value.
1837618376 return true;
1837718377 }
1837818378
0 commit comments