UNPKG

ts-simple-ast

Version:

TypeScript compiler wrapper for AST navigation and code generation.

26 lines (25 loc) 961 B
import * as ts from "typescript"; import { EnumMemberStructure } from "./../../structures"; import { Node } from "./../common"; import { PropertyNamedNode, InitializerExpressionableNode, DocumentationableNode } from "./../base"; export declare const EnumMemberBase: (new (...args: any[]) => DocumentationableNode) & (new (...args: any[]) => InitializerExpressionableNode) & (new (...args: any[]) => PropertyNamedNode) & typeof Node; export declare class EnumMember extends EnumMemberBase<ts.EnumMember> { /** * Fills the node from a structure. * @param structure - Structure to fill. */ fill(structure: Partial<EnumMemberStructure>): this; /** * Gets the constant value of the enum. */ getValue(): string | number | undefined; /** * Sets the enum value. * @param value - Enum value. */ setValue(value: string | number): this; /** * Removes this enum member. */ remove(): void; }