File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -571,7 +571,11 @@ namespace ts {
571571
572572 export interface Identifier extends PrimaryExpression {
573573 kind : SyntaxKind . Identifier ;
574- text : string ; // Text of identifier (with escapes converted to characters)
574+ /**
575+ * Text of identifier (with escapes converted to characters).
576+ * If the identifier begins with two underscores, this will begin with three.
577+ */
578+ text : string ;
575579 originalKeywordKind ?: SyntaxKind ; // Original syntaxKind which get set so that we can report an error later
576580 /*@internal */ autoGenerateKind ?: GeneratedIdentifierKind ; // Specifies whether to auto-generate the text for an identifier.
577581 /*@internal */ autoGenerateId ?: number ; // Ensures unique generated identifiers get unique names, but clones get the same name.
Original file line number Diff line number Diff line change @@ -694,7 +694,7 @@ namespace ts.FindAllReferences.Core {
694694 // Compare the length so we filter out strict superstrings of the symbol we are looking for
695695 switch ( node && node . kind ) {
696696 case SyntaxKind . Identifier :
697- return ( node as Identifier ) . text . length === searchSymbolName . length ;
697+ return unescapeIdentifier ( ( node as Identifier ) . text ) . length === searchSymbolName . length ;
698698
699699 case SyntaxKind . StringLiteral :
700700 return ( isLiteralNameOfPropertyDeclarationOrIndexAccess ( node ) || isNameOfExternalModuleImportOrDeclaration ( node ) ) &&
You can’t perform that action at this time.
0 commit comments