import { EnumDeclaration } from "https://deno.land/x/ts_morph@16.0.0/ts_morph.d.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(): 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.