> For the complete documentation index, see [llms.txt](/llms.txt).
> The full corpus is at [llms-full.txt](/llms-full.txt).

# Behavior

> **Behavior**\<`TBehaviorEventType`, `TGuardResponse`, `TBehaviorEvent`\> = `object`

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

:::caution[Beta]
This API should not be used in production and may be trimmed from a public release.
:::

## Type Parameters

### TBehaviorEventType

`TBehaviorEventType` *extends* `"*"` \| `` `${BehaviorEventTypeNamespace}.*` `` \| [`BehaviorEvent`](/api/behaviors/type-aliases/behaviorevent/)\[`"type"`\] = `"*"` \| `` `${BehaviorEventTypeNamespace}.*` `` \| [`BehaviorEvent`](/api/behaviors/type-aliases/behaviorevent/)\[`"type"`\]

### TGuardResponse

`TGuardResponse` = `true`

### TBehaviorEvent

`TBehaviorEvent` *extends* `ResolveBehaviorEvent`\<`TBehaviorEventType`\> = `ResolveBehaviorEvent`\<`TBehaviorEventType`\>

## Properties

### actions

> **actions**: [`BehaviorActionSet`](/api/behaviors/type-aliases/behavioractionset/)\<`TBehaviorEvent`, `TGuardResponse`\>[]

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

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

***

### guard?

> `optional` **guard**: [`BehaviorGuard`](/api/behaviors/type-aliases/behaviorguard/)\<`TBehaviorEvent`, `TGuardResponse`\>

Defined in: 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: behavior.types.behavior.ts:28

Editor Event that triggers this Behavior.