From 656f35649593353d654806032dd3c412262b0299 Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Mon, 2 Jul 2018 10:47:24 -0700 Subject: [PATCH] Remove deprecated escapeidentifier and unescapeidentifier functions (#25333) --- src/compiler/utilities.ts | 18 ------------------ .../reference/api/tsserverlibrary.d.ts | 12 ------------ tests/baselines/reference/api/typescript.d.ts | 7 ------- 3 files changed, 37 deletions(-) diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 618526fada1..ab2ea4498dd 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 { @@ -4792,16 +4784,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 a58523852cb..8389028a8fc 100644 --- a/tests/baselines/reference/api/tsserverlibrary.d.ts +++ b/tests/baselines/reference/api/tsserverlibrary.d.ts @@ -6104,11 +6104,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; @@ -6707,13 +6702,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 99cc7989375..6b63e3febda 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -3180,13 +3180,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; /**