Skip to content

@ue-too/being / index / GuardMapping

型別別名: GuardMapping<Context, G, States>

GuardMapping<Context, G, States> = object

定義於: interface.ts:457

Description

This is a mapping of a guard to a target state.

Generic parameters:

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

You probably don't need to use this type directly.

參閱

['eventGuards']

型別參數

Context

Context extends BaseContext

G

G

States

States extends string

屬性

guard

guard: G extends Guard<Context, infer K> ? K : never

定義於: interface.ts:462


target

target: States

定義於: interface.ts:463