import { EnumDeclaration } from "https://dotland.deno.dev/x/ts_morph@20.0.0/ts_morph.d.ts";
Methods
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.
getMember(findFunction: (declaration: EnumMember) => boolean): EnumMember | undefined
Gets an enum member.
getMemberOrThrow(findFunction: (declaration: EnumMember) => boolean): EnumMember
Gets an enum member or throws if not found.
getParent(): NodeParentType<ts.EnumDeclaration>
getParentOrThrow(message?: string | (() => string)): NonNullable<NodeParentType<ts.EnumDeclaration>>
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.