Skip to content

Commit

Permalink
Prepare tsutils for a future where the noop unescapeIdentifier func…
Browse files Browse the repository at this point in the history
…tion is removed (#66)
  • Loading branch information
weswigham authored and ajafff committed Jul 3, 2018
1 parent da91339 commit 627c9fe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion util/util.ts
Expand Up @@ -949,7 +949,8 @@ export function isReassignmentTarget(node: ts.Expression): boolean {
* @param node The identifier to get the text of
*/
export function getIdentifierText(node: ts.Identifier) {
return ts.unescapeIdentifier(node.text); // wotan-disable-line no-unstable-api-use
// wotan-disable-next-line no-unstable-api-use, no-useless-predicate
return ts.unescapeIdentifier ? ts.unescapeIdentifier(node.text) : node.text;
}

export function canHaveJsDoc(node: ts.Node): node is ts.HasJSDoc {
Expand Down

0 comments on commit 627c9fe

Please sign in to comment.