Skip to content

@ue-too/being / index / EventGuards

型別別名: EventGuards<EventPayloadMapping, States, Context, T> ​

EventGuards<EventPayloadMapping, States, Context, T> = { [K in keyof EventPayloadMapping]: GuardMapping<Context, T, States>[] }

定義於: interface.ts:553

型別參數 ​

EventPayloadMapping ​

EventPayloadMapping

States ​

States extends string

Context ​

Context extends BaseContext

T ​

T extends Guard<Context>

Description ​

This is a mapping of an event to a guard evaluation.

Generic parameters:

  • EventPayloadMapping: A mapping of events to their payloads.
  • States: All of the possible states that the state machine can be in. e.g. a string literal union like "IDLE" | "SELECTING" | "PAN" | "ZOOM"
  • Context: The context of the state machine. (which can be used by each state to do calculations that would persist across states)
  • T: The guard type.

You probably don't need to use this type directly. This is a mapping of an event to a guard evaluation.

參閱 ​

['eventGuards']