diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 192e718f8e0fc..081ea6215772f 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -559,14 +559,6 @@ namespace ts { return (identifier.length >= 2 && identifier.charCodeAt(0) === CharacterCodes._ && identifier.charCodeAt(1) === CharacterCodes._ ? "_" + identifier : identifier) as __String; } - /** - * @deprecated Use `id.escapedText` to get the escaped text of an Identifier. - * @param identifier The identifier to escape - */ - export function escapeIdentifier(identifier: string): string { - return identifier; - } - // Make an identifier from an external module name by extracting the string after the last "/" and replacing // all non-alphanumeric characters with underscores export function makeIdentifierFromModuleName(moduleName: string): string { @@ -4787,16 +4779,6 @@ namespace ts { return unescapeLeadingUnderscores(symbol.escapedName); } - /** - * Remove extra underscore from escaped identifier text content. - * @deprecated Use `id.text` for the unescaped text. - * @param identifier The escaped identifier text. - * @returns The unescaped identifier text. - */ - export function unescapeIdentifier(id: string): string { - return id; - } - /** * A JSDocTypedef tag has an _optional_ name field - if a name is not directly present, we should * attempt to draw the name from the node the declaration is on (as that declaration is what its' symbol diff --git a/tests/baselines/reference/api/tsserverlibrary.d.ts b/tests/baselines/reference/api/tsserverlibrary.d.ts index 4f2ddb59326e9..38a1b230d87b3 100644 --- a/tests/baselines/reference/api/tsserverlibrary.d.ts +++ b/tests/baselines/reference/api/tsserverlibrary.d.ts @@ -6129,11 +6129,6 @@ declare namespace ts { function getLiteralText(node: LiteralLikeNode, sourceFile: SourceFile): string; function getTextOfConstantValue(value: string | number): string; function escapeLeadingUnderscores(identifier: string): __String; - /** - * @deprecated Use `id.escapedText` to get the escaped text of an Identifier. - * @param identifier The identifier to escape - */ - function escapeIdentifier(identifier: string): string; function makeIdentifierFromModuleName(moduleName: string): string; function isBlockOrCatchScoped(declaration: Declaration): boolean; function isCatchClauseVariableDeclarationOrBindingElement(declaration: Declaration): boolean; @@ -6731,13 +6726,6 @@ declare namespace ts { function unescapeLeadingUnderscores(identifier: __String): string; function idText(identifier: Identifier): string; function symbolName(symbol: Symbol): string; - /** - * Remove extra underscore from escaped identifier text content. - * @deprecated Use `id.text` for the unescaped text. - * @param identifier The escaped identifier text. - * @returns The unescaped identifier text. - */ - function unescapeIdentifier(id: string): string; function getNameOfJSDocTypedef(declaration: JSDocTypedefTag): Identifier | undefined; /** @internal */ function isNamedDeclaration(node: Node): node is NamedDeclaration & { diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index fb2d636059dc7..b3bd84f9b8167 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -3225,13 +3225,6 @@ declare namespace ts { function unescapeLeadingUnderscores(identifier: __String): string; function idText(identifier: Identifier): string; function symbolName(symbol: Symbol): string; - /** - * Remove extra underscore from escaped identifier text content. - * @deprecated Use `id.text` for the unescaped text. - * @param identifier The escaped identifier text. - * @returns The unescaped identifier text. - */ - function unescapeIdentifier(id: string): string; function getNameOfJSDocTypedef(declaration: JSDocTypedefTag): Identifier | undefined; function getNameOfDeclaration(declaration: Declaration | Expression): DeclarationName | undefined; /**