UNPKG

ts-simple-ast

Version:

TypeScript compiler wrapper for AST navigation and code generation.

36 lines (35 loc) 999 B
import * as ts from "typescript"; import { Node } from "./Node"; import { Type } from "./../type"; import { ReferencedSymbol, DefinitionInfo, ImplementationLocation } from "./../tools"; export declare class Identifier extends Node<ts.Identifier> { /** * Gets the text for the identifier. */ getText(): string; /** * Renames the identifier. * @param newName - New name of the identifier. */ rename(newName: string): void; /** * Finds all the references of this identifier. */ findReferences(): ReferencedSymbol[]; /** * Gets the definitions of the current identifier. * * This is similar to "go to definition." */ getDefinitions(): DefinitionInfo[]; /** * Gets the implementations of the current identifier. * * This is similar to "go to implementation." */ getImplementations(): ImplementationLocation[]; /** * Gets the type of the identifier. */ getType(): Type; }