UNPKG

ts-simple-ast

Version:

TypeScript compiler wrapper for AST navigation and code generation.

43 lines (42 loc) 1.75 kB
import { Constructor } from "./../../Constructor"; import { Node } from "./../common"; import { HeritageClauseableNode } from "./HeritageClauseableNode"; import { ExpressionWithTypeArguments } from "./../type/ExpressionWithTypeArguments"; export declare type ImplementsClauseableNodeExtensionType = Node & HeritageClauseableNode; export interface ImplementsClauseableNode { /** * Gets the implements clauses. */ getImplements(): ExpressionWithTypeArguments[]; /** * Adds an implements clause. * @param text - Text to add for the implements clause. */ addImplements(text: string): ExpressionWithTypeArguments; /** * Adds multiple implements clauses. * @param text - Texts to add for the implements clause. */ addImplements(text: string[]): ExpressionWithTypeArguments[]; /** * Inserts an implements clause. * @param text - Text to insert for the implements clause. */ insertImplements(index: number, texts: string[]): ExpressionWithTypeArguments[]; /** * Inserts multiple implements clauses. * @param text - Texts to insert for the implements clause. */ insertImplements(index: number, text: string): ExpressionWithTypeArguments; /** * Removes the implements at the specified index. * @param index - Index to remove. */ removeImplements(index: number): this; /** * Removes the specified implements. * @param implementsNode - Node of the implements to remove. */ removeImplements(implementsNode: ExpressionWithTypeArguments): this; } export declare function ImplementsClauseableNode<T extends Constructor<ImplementsClauseableNodeExtensionType>>(Base: T): Constructor<ImplementsClauseableNode> & T;