Skip to content

@ue-too/being / index / EventResultCallback

型別別名: EventResultCallback()<EventPayloadMapping, Context, States> ​

EventResultCallback<EventPayloadMapping, Context, States> = (args, result, context) => void

定義於: interface.ts:322

Callback invoked after a state has handled an event, with the event's full EventResult.

型別參數 ​

EventPayloadMapping ​

EventPayloadMapping

Context ​

Context extends BaseContext

States ​

States extends string

參數 ​

args ​

EventArgs<EventPayloadMapping, keyof EventPayloadMapping | string>

result ​

EventResult<States, unknown>

context ​

Context

回傳 ​

void

備註 ​

Unlike StateChangeCallback, this fires for every dispatch that reaches a state — including a precondition veto ({ handled: false }) and a self-transition, neither of which triggers a state change. Intended for tooling/introspection; do not mutate the context from here.