enum Stage {
STARTED = 1,
COMPLETED
}
const SystemState = {
Stage,
}
Can a type be defined by extracting the enum from the SystemState
object like so?
type stageType -> 1 | 2 (equivalent to the integral values of the Stage enum)
I attempted to use
keyof typeof SystemState['Stage']
, but this resulted in a string union type instead: "STARTED" | "COMPLETED"
.