Remove deprecated escapeidentifier and unescapeidentifier functions (#25333)

This commit is contained in:
Wesley Wigham
2018-07-02 10:47:24 -07:00
committed by GitHub
parent 38d649111b
commit 656f356495
3 changed files with 0 additions and 37 deletions
-18
View File
@@ -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
-12
View File
@@ -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 & {
-7
View File
@@ -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;
/**