ts-simple-ast
Version:
TypeScript compiler wrapper for AST navigation and code generation.
43 lines (42 loc) • 1.68 kB
TypeScript
import { Constructor } from "./../../Constructor";
import { Node } from "./../common";
import { HeritageClauseableNode } from "./HeritageClauseableNode";
import { ExpressionWithTypeArguments } from "./../type/ExpressionWithTypeArguments";
export declare type ExtendsClauseableNodeExtensionType = Node & HeritageClauseableNode;
export interface ExtendsClauseableNode {
/**
* Gets the extends clauses.
*/
getExtends(): ExpressionWithTypeArguments[];
/**
* Adds multiple extends clauses.
* @param texts - Texts to add for the extends clause.
*/
addExtends(texts: string[]): ExpressionWithTypeArguments[];
/**
* Adds an extends clause.
* @param text - Text to add for the extends clause.
*/
addExtends(text: string): ExpressionWithTypeArguments;
/**
* Inserts multiple extends clauses.
* @param texts - Texts to insert for the extends clause.
*/
insertExtends(index: number, texts: string[]): ExpressionWithTypeArguments[];
/**
* Inserts an extends clause.
* @param text - Text to insert for the extends clause.
*/
insertExtends(index: number, text: string): ExpressionWithTypeArguments;
/**
* Removes the extends at the specified index.
* @param index - Index to remove.
*/
removeExtends(index: number): this;
/**
* Removes the specified extends.
* @param extendsNode - Node of the extend to remove.
*/
removeExtends(extendsNode: ExpressionWithTypeArguments): this;
}
export declare function ExtendsClauseableNode<T extends Constructor<ExtendsClauseableNodeExtensionType>>(Base: T): Constructor<ExtendsClauseableNode> & T;