File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -577,17 +577,17 @@ namespace ts.FindAllReferences {
577577
578578 function getExportEqualsLocalSymbol ( importedSymbol : Symbol , checker : TypeChecker ) : Symbol {
579579 if ( importedSymbol . flags & SymbolFlags . Alias ) {
580- return checker . getImmediateAliasedSymbol ( importedSymbol ) ;
580+ return Debug . assertDefined ( checker . getImmediateAliasedSymbol ( importedSymbol ) ) ;
581581 }
582582
583583 const decl = importedSymbol . valueDeclaration ;
584584 if ( isExportAssignment ( decl ) ) { // `export = class {}`
585- return decl . expression . symbol ;
585+ return Debug . assertDefined ( decl . expression . symbol ) ;
586586 }
587587 else if ( isBinaryExpression ( decl ) ) { // `module.exports = class {}`
588- return decl . right . symbol ;
588+ return Debug . assertDefined ( decl . right . symbol ) ;
589589 }
590- Debug . fail ( ) ;
590+ return Debug . fail ( ) ;
591591 }
592592
593593 // If a reference is a class expression, the exported node would be its parent.
You can’t perform that action at this time.
0 commit comments