Skip to content

Behavior

Behavior<TBehaviorEventType, TGuardResponse, TBehaviorEvent> = object

Defined in: behaviors/behavior.types.behavior.ts:13

Type Parameters

TBehaviorEventType

TBehaviorEventType extends "*" | `${BehaviorEventTypeNamespace}.*` | BehaviorEvent["type"] = "*" | `${BehaviorEventTypeNamespace}.*` | BehaviorEvent["type"]

TGuardResponse

TGuardResponse = true

TBehaviorEvent

TBehaviorEvent extends ResolveBehaviorEvent<TBehaviorEventType> = ResolveBehaviorEvent<TBehaviorEventType>

Properties

actions

actions: BehaviorActionSet<TBehaviorEvent, TGuardResponse>[]

Defined in: behaviors/behavior.types.behavior.ts:39

Array of Behavior Action sets. Each set represents a step in the history stack.


guard?

optional guard: BehaviorGuard<TBehaviorEvent, TGuardResponse>

Defined in: behaviors/behavior.types.behavior.ts:34

Predicate function that determines if the Behavior should be executed. Returning a non-nullable value from the guard will pass the value to the actions and execute them.


on

on: TBehaviorEventType

Defined in: behaviors/behavior.types.behavior.ts:28

Editor Event that triggers this Behavior.