Metakit / @doeixd/metakit/machine
PhaseEnv
type · packages/metakit/src/machinePhaseTypes.ts:92
type PhaseEnv<State, Input, H> = TransitionPaths<State, Input, NoSupplied> & {
readonly variant: PathAccessor<TransitionEnv<State, Input>, H, true>
}What a transition's callbacks are given: the paths of { state, input },
and variant, the phase field as it is in the phases the transition
leaves. Where those are variants of a union, variant reaches their own
fields (variant.draft), which the union's path does not.