EnumU32
Interface in Values
A typed u32 enum: a name-to-value map whose members are Node<'u32'> literals, plus the raw value map.
import type { EnumU32 } from 'typeshade'
The signature, the description and the examples come from the compiler's own source at commit 26de7be8.
Syntax
interface EnumU32<M extends Record<string, number>> { readonly members: { readonly [K in keyof M]: Node<'u32'> }; readonly values: M;}Description
Pair it with matchEnum for exhaustive integer dispatch: the arms object
must cover every member, and a missing or unknown key is a tsc error, so a forgotten case
is caught at compile time instead of falling through the switch default.
Instance properties
See also
Source
src/core/ir/node.ts, line 2337, at commit 26de7be8