UNPKG

ts-simple-ast

Version:

TypeScript compiler wrapper for AST navigation and code generation.

25 lines (24 loc) 829 B
import { Constructor } from "./../../Constructor"; import { Node } from "./../common"; import { ModifierableNode } from "./ModifierableNode"; export declare type StaticableNodeExtensionType = Node & ModifierableNode; export interface StaticableNode { /** * Gets if it's static. */ isStatic(): boolean; /** * Gets the static keyword, or undefined if none exists. */ getStaticKeyword(): Node | undefined; /** * Gets the static keyword, or throws if none exists. */ getStaticKeywordOrThrow(): Node; /** * Sets if the node is static. * @param value - If it should be static or not. */ setIsStatic(value: boolean): this; } export declare function StaticableNode<T extends Constructor<StaticableNodeExtensionType>>(Base: T): Constructor<StaticableNode> & T;