Skip to main content
Module

x/ts_morph/mod.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://deno.land/x/ts_morph@15.1.0/mod.ts";

Methods

getParent(): NodeParentType<ts.EnumMember>
getParentOrThrow(): 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.