import { EnumDeclaration } from "https://deno.land/x/deno2node@v1.10.0/src/deps.deno.ts";
Methods
addMember(structure: OptionalKind<EnumMemberStructure>): EnumMember
Adds a member to the enum.
addMember(structure: OptionalKind<EnumMemberStructure> | WriterFunction | string): EnumMember | CommentEnumMember
Adds a member to the enum.
addMembers(structures: ReadonlyArray<OptionalKind<EnumMemberStructure>>): EnumMember[]
Adds members to the enum.
addMembers(structures: ReadonlyArray<OptionalKind<EnumMemberStructure> | WriterFunction | string> | string | WriterFunction): (EnumMember | CommentEnumMember)[]
Adds members to the enum.
getConstKeyword(): Node<ts.Node> | undefined
Gets the const enum keyword or undefined if not exists.
getMember(name: string): EnumMember | undefined
Gets an enum member.
getMember(findFunction: (declaration: EnumMember) => boolean): EnumMember | undefined
Gets an enum member.
getMemberOrThrow(name: string): EnumMember
Gets an enum member or throws if not found.
getMemberOrThrow(findFunction: (declaration: EnumMember) => boolean): EnumMember
Gets an enum member or throws if not found.
getMembers(): EnumMember[]
Gets the enum's members.
Gets the enum's members with comment enum members.
getParent(): NodeParentType<ts.EnumDeclaration>
getParentOrThrow(message?: string | (() => string)): NonNullable<NodeParentType<ts.EnumDeclaration>>
Gets the structure equivalent to this node.
insertMember(index: number, structure: OptionalKind<EnumMemberStructure>): EnumMember
Inserts a member to the enum.
insertMember(index: number, structure: OptionalKind<EnumMemberStructure> | WriterFunction | string): EnumMember | CommentEnumMember
Inserts a member to the enum.
insertMembers(index: number, structures: ReadonlyArray<OptionalKind<EnumMemberStructure>>): EnumMember[]
Inserts members to an enum.
insertMembers(index: number, structures: ReadonlyArray<OptionalKind<EnumMemberStructure> | WriterFunction | string> | WriterFunction | string): (EnumMember | CommentEnumMember)[]
Inserts members to an enum.
isConstEnum(): boolean
Gets if it's a const enum.
set(structure: Partial<EnumDeclarationStructure>): this
Sets the node from a structure.
setIsConstEnum(value: boolean): this
Toggle if it's a const enum.