Module

x/ts_morph/ts_morph.d.ts>EnumMember

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Very Popular
Go to Latest
class EnumMember
extends EnumMemberBase<ts.EnumMember>
import { EnumMember } from "https://dotland.deno.dev/x/ts_morph@17.0.0/ts_morph.d.ts";

Methods

getParent(): NodeParentType<ts.EnumMember>
getParentOrThrow(message?: string | (() => string)): NonNullable<NodeParentType<ts.EnumMember>>

Gets the structure equivalent to this node.

getValue(): string | number | undefined

Gets the constant value of the enum.

remove(): void

Removes this enum member.

set(structure: Partial<EnumMemberStructure>): this

Sets the node from a structure.

setValue(value: string | number): this

Sets the enum value.

This is a helper method. Use #setInitializer if you want to set the initializer to something other than a string or number.