@@ -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
@@ -3371,7 +3371,7 @@ namespace ts {
33713371 function getTypeOfFuncClassEnumModule(symbol: Symbol): Type {
33723372 const links = getSymbolLinks(symbol);
33733373 if (!links.type) {
3374- if (symbol.valueDeclaration.kind === SyntaxKind.ModuleDeclaration && isShorthandAmbientModule(<ModuleDeclaration> symbol.valueDeclaration )) {
3374+ if (symbol.valueDeclaration.kind === SyntaxKind.ModuleDeclaration && isShorthandAmbientModuleSymbol( symbol)) {
33753375 links.type = anyType;
33763376 }
33773377 else {
@@ -18295,8 +18295,8 @@ namespace ts {
1829518295
1829618296 function moduleExportsSomeValue(moduleReferenceExpression: Expression): boolean {
1829718297 let moduleSymbol = resolveExternalModuleName(moduleReferenceExpression.parent, moduleReferenceExpression);
18298- if (!moduleSymbol) {
18299- // module not found - be conservative
18298+ if (!moduleSymbol || isShorthandAmbientModuleSymbol(moduleSymbol) ) {
18299+ // If the module is not found or is shorthand, assume that it may export a value.
1830018300 return true;
1830118301 }
1830218302
0 commit comments