diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index c1ce6869380..7435fd095b6 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -74,7 +74,6 @@ module ts { isImplementationOfOverload, getAliasedSymbol: resolveAlias, getEmitResolver, - getExportsOfImportDeclaration, getExportsOfModule: moduleSymbol => symbolsToArray(getExportsOfModule(moduleSymbol)), }; diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 609baef833e..6a2677fe720 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1127,7 +1127,6 @@ module ts { getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number; isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean; getAliasedSymbol(symbol: Symbol): Symbol; - getExportsOfImportDeclaration(node: ImportDeclaration): Symbol[]; getExportsOfModule(moduleSymbol: Symbol): Symbol[]; // Should not be called directly. Should only be accessed through the Program instance. diff --git a/src/services/services.ts b/src/services/services.ts index 6a0925460a1..44c0d2d8206 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -2581,8 +2581,16 @@ module ts { let importDeclaration = getAncestor(contextToken, SyntaxKind.ImportDeclaration); Debug.assert(importDeclaration !== undefined); - let exports = typeInfoResolver.getExportsOfImportDeclaration(importDeclaration); - symbols = filterModuleExports(exports, importDeclaration); + let exports: Symbol[]; + if (importDeclaration.moduleSpecifier) { + let moduleSpecifierSymbol = typeInfoResolver.getSymbolAtLocation(importDeclaration.moduleSpecifier); + if (moduleSpecifierSymbol) { + exports = typeInfoResolver.getExportsOfModule(moduleSpecifierSymbol); + } + } + + //let exports = typeInfoResolver.getExportsOfImportDeclaration(importDeclaration); + symbols = exports ? filterModuleExports(exports, importDeclaration) : emptyArray; } } else {