@@ -69,12 +69,12 @@ export class SymbolAnalyzer {
6969 // 2. Check for any signs that this was imported from an external package
7070 let result : IFollowAliasesResult | undefined ;
7171
72- result = SymbolAnalyzer . _followAliasesForExportDeclaration ( declaration , current ) ;
72+ result = SymbolAnalyzer . _followAliasesForExportDeclaration ( declaration , current , typeChecker ) ;
7373 if ( result ) {
7474 return result ;
7575 }
7676
77- result = SymbolAnalyzer . _followAliasesForImportDeclaration ( declaration , current ) ;
77+ result = SymbolAnalyzer . _followAliasesForImportDeclaration ( declaration , current , typeChecker ) ;
7878 if ( result ) {
7979 return result ;
8080 }
@@ -125,7 +125,7 @@ export class SymbolAnalyzer {
125125 * Helper function for _followAliases(), for handling ts.ExportDeclaration patterns
126126 */
127127 private static _followAliasesForExportDeclaration ( declaration : ts . Declaration ,
128- symbol : ts . Symbol ) : IFollowAliasesResult | undefined {
128+ symbol : ts . Symbol , typeChecker : ts . TypeChecker ) : IFollowAliasesResult | undefined {
129129
130130 const exportDeclaration : ts . ExportDeclaration | undefined
131131 = TypeScriptHelpers . findFirstParent < ts . ExportDeclaration > ( declaration , ts . SyntaxKind . ExportDeclaration ) ;
@@ -165,7 +165,7 @@ export class SymbolAnalyzer {
165165
166166 if ( modulePath ) {
167167 return {
168- followedSymbol : symbol ,
168+ followedSymbol : TypeScriptHelpers . followAliases ( symbol , typeChecker ) ,
169169 localName : exportName ,
170170 astImport : new AstImport ( { modulePath, exportName } ) ,
171171 isAmbient : false
@@ -182,7 +182,7 @@ export class SymbolAnalyzer {
182182 * Helper function for _followAliases(), for handling ts.ImportDeclaration patterns
183183 */
184184 private static _followAliasesForImportDeclaration ( declaration : ts . Declaration ,
185- symbol : ts . Symbol ) : IFollowAliasesResult | undefined {
185+ symbol : ts . Symbol , typeChecker : ts . TypeChecker ) : IFollowAliasesResult | undefined {
186186
187187 const importDeclaration : ts . ImportDeclaration | undefined
188188 = TypeScriptHelpers . findFirstParent < ts . ImportDeclaration > ( declaration , ts . SyntaxKind . ImportDeclaration ) ;
@@ -260,7 +260,7 @@ export class SymbolAnalyzer {
260260
261261 if ( modulePath ) {
262262 return {
263- followedSymbol : symbol ,
263+ followedSymbol : TypeScriptHelpers . followAliases ( symbol , typeChecker ) ,
264264 localName : symbol . name ,
265265 astImport : new AstImport ( { modulePath, exportName } ) ,
266266 isAmbient : false
0 commit comments