ts-simple-ast
Version:
TypeScript compiler wrapper for AST navigation and code generation.
25 lines (24 loc) • 882 B
TypeScript
import { Constructor } from "./../../../Constructor";
import { Node } from "./../../common";
import { ModifierableNode } from "./../../base";
export declare type AbstractableNodeExtensionType = Node & ModifierableNode;
export interface AbstractableNode {
/**
* Gets if the node is abstract.
*/
isAbstract(): boolean;
/**
* Gets the abstract keyword or undefined if it doesn't exist.
*/
getAbstractKeyword(): Node | undefined;
/**
* Gets the abstract keyword or throws if it doesn't exist.
*/
getAbstractKeywordOrThrow(): Node;
/**
* Sets if the node is abstract.
* @param isAbstract - If it should be abstract or not.
*/
setIsAbstract(isAbstract: boolean): this;
}
export declare function AbstractableNode<T extends Constructor<AbstractableNodeExtensionType>>(Base: T): Constructor<AbstractableNode> & T;