On<D, P, G>: [keyof Get<D, P>] extends [never] ? { [NEVER]?: never; } : IsStringLiteral<keyof Get<D, P>> extends false ? "Error: Event types must be literal strings." : { readonly [T in keyof Get<D, P>]: T extends ReservedKeyword ? `Error: Event type '${T}' is reserved.` : Extends<T, _EventTypeConstraint<D>> extends false ? "Error: Event type is not defined in `$schema.events`." : Transition<D, G> } Type Parameters
- D
- P extends ReadonlyArray<keyof any>
- G extends string
The type of definition how a state machine will transition when it receives a specific event.