EnumU32
인터페이스, 값 분류
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'
시그니처, 설명, 예제는 커밋 c66579bf의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.
구문
interface EnumU32<M extends Record<string, number>> { readonly members: { readonly [K in keyof M]: Node<'u32'> }; readonly values: M;}설명
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.
인스턴스 속성
함께 보기
소스
src/core/ir/node.ts, 2337행, 커밋 c66579bf 기준