File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -571,7 +571,11 @@ namespace ts {
571
571
572
572
export interface Identifier extends PrimaryExpression {
573
573
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 ;
575
579
originalKeywordKind ?: SyntaxKind ; // Original syntaxKind which get set so that we can report an error later
576
580
/*@internal */ autoGenerateKind ?: GeneratedIdentifierKind ; // Specifies whether to auto-generate the text for an identifier.
577
581
/*@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 {
694
694
// Compare the length so we filter out strict superstrings of the symbol we are looking for
695
695
switch ( node && node . kind ) {
696
696
case SyntaxKind . Identifier :
697
- return ( node as Identifier ) . text . length === searchSymbolName . length ;
697
+ return unescapeIdentifier ( ( node as Identifier ) . text ) . length === searchSymbolName . length ;
698
698
699
699
case SyntaxKind . StringLiteral :
700
700
return ( isLiteralNameOfPropertyDeclarationOrIndexAccess ( node ) || isNameOfExternalModuleImportOrDeclaration ( node ) ) &&
You can’t perform that action at this time.
0 commit comments