@@ -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
@@ -3381,7 +3381,7 @@ namespace ts {
33813381 function getTypeOfFuncClassEnumModule(symbol: Symbol): Type {
33823382 const links = getSymbolLinks(symbol);
33833383 if (!links.type) {
3384- if (symbol.valueDeclaration.kind === SyntaxKind.ModuleDeclaration && isShorthandAmbientModule(<ModuleDeclaration> symbol.valueDeclaration )) {
3384+ if (symbol.valueDeclaration.kind === SyntaxKind.ModuleDeclaration && isShorthandAmbientModuleSymbol( symbol)) {
33853385 links.type = anyType;
33863386 }
33873387 else {
@@ -18365,8 +18365,8 @@ namespace ts {
1836518365
1836618366 function moduleExportsSomeValue(moduleReferenceExpression: Expression): boolean {
1836718367 let moduleSymbol = resolveExternalModuleName(moduleReferenceExpression.parent, moduleReferenceExpression);
18368- if (!moduleSymbol) {
18369- // module not found - be conservative
18368+ if (!moduleSymbol || isShorthandAmbientModuleSymbol(moduleSymbol) ) {
18369+ // If the module is not found or is shorthand, assume that it may export a value.
1837018370 return true;
1837118371 }
1837218372
0 commit comments