File tree 1 file changed +10
-5
lines changed
1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -398,11 +398,6 @@ namespace ts {
398
398
return identifier . length >= 2 && identifier . charCodeAt ( 0 ) === CharacterCodes . _ && identifier . charCodeAt ( 1 ) === CharacterCodes . _ ? "_" + identifier : identifier ;
399
399
}
400
400
401
- // Remove extra underscore from escaped identifier
402
- export function unescapeIdentifier ( identifier : string ) : string {
403
- return identifier . length >= 3 && identifier . charCodeAt ( 0 ) === CharacterCodes . _ && identifier . charCodeAt ( 1 ) === CharacterCodes . _ && identifier . charCodeAt ( 2 ) === CharacterCodes . _ ? identifier . substr ( 1 ) : identifier ;
404
- }
405
-
406
401
// Make an identifier from an external module name by extracting the string after the last "/" and replacing
407
402
// all non-alphanumeric characters with underscores
408
403
export function makeIdentifierFromModuleName ( moduleName : string ) : string {
@@ -4548,4 +4543,14 @@ namespace ts {
4548
4543
4549
4544
return undefined ;
4550
4545
}
4546
+
4547
+ /**
4548
+ * Remove extra underscore from escaped identifier text content.
4549
+ *
4550
+ * @param identifier The escaped identifier text.
4551
+ * @returns The unescaped identifier text.
4552
+ */
4553
+ export function unescapeIdentifier ( identifier : string ) : string {
4554
+ return identifier . length >= 3 && identifier . charCodeAt ( 0 ) === CharacterCodes . _ && identifier . charCodeAt ( 1 ) === CharacterCodes . _ && identifier . charCodeAt ( 2 ) === CharacterCodes . _ ? identifier . substr ( 1 ) : identifier ;
4555
+ }
4551
4556
}
You can’t perform that action at this time.
0 commit comments