Metakit / @doeixd/metakit/machine
MessageOf
type · packages/metakit/src/machineTypes.ts:39
type MessageOf<Transitions extends Readonly<Record<string, unknown>>> = {
readonly [K in keyof Transitions & string]: {
readonly _tag: K
readonly input: InputOf<Transitions[K]>
} & ([keyof SuppliedOf<Transitions[K]>] extends [never]
? unknown
: {
readonly supplied: SuppliedOf<Transitions[K]>
})
}[keyof Transitions & string]Tagged message union derived from a Record<Tag, Transition> map. A
transition that declares supplied values carries them in its message, so a
replay runs it with the values the first run was given.