ts-simple-ast
Version:
TypeScript compiler wrapper for AST navigation and code generation.
17 lines (16 loc) • 581 B
TypeScript
import * as ts from "typescript";
import { Constructor } from "./../../../Constructor";
import { Node, Identifier } from "./../../common";
export declare type BindingNamedNodeExtensionType = Node<ts.Declaration & {
name: ts.BindingName;
}>;
export interface BindingNamedNode {
getNameNode(): Identifier;
getName(): string;
/**
* Renames the name.
* @param text - New name.
*/
rename(text: string): this;
}
export declare function BindingNamedNode<T extends Constructor<BindingNamedNodeExtensionType>>(Base: T): Constructor<BindingNamedNode> & T;