Skip to content

SyntheticBehaviorEvent

SyntheticBehaviorEvent = { annotation: { name: string; value: {[prop: string]: unknown; }; }; type: StrictExtract<SyntheticBehaviorEventType, "annotation.add">; } | { annotation: { name: string; }; type: StrictExtract<SyntheticBehaviorEventType, "annotation.remove">; } | { at: [KeyedSegment]; props: Record<string, unknown>; type: StrictExtract<SyntheticBehaviorEventType, "block.set">; } | { at: [KeyedSegment]; props: string[]; type: StrictExtract<SyntheticBehaviorEventType, "block.unset">; } | { at: { anchor: BlockOffset; focus: BlockOffset; }; decorator: string; type: StrictExtract<SyntheticBehaviorEventType, "decorator.add">; } | { decorator: string; type: StrictExtract<SyntheticBehaviorEventType, "decorator.remove">; } | { at: NonNullable<EditorSelection>; direction: "backward" | "forward"; type: StrictExtract<SyntheticBehaviorEventType, "delete">; unit: "character" | "word" | "line" | "block"; } | { type: StrictExtract<SyntheticBehaviorEventType, "history.redo">; } | { type: StrictExtract<SyntheticBehaviorEventType, "history.undo">; } | { inlineObject: { name: string; value: {[prop: string]: unknown; }; }; type: StrictExtract<SyntheticBehaviorEventType, "insert.inline object">; } | { block: BlockWithOptionalKey; placement: InsertPlacement; select: "start" | "end" | "none"; type: StrictExtract<SyntheticBehaviorEventType, "insert.block">; } | { annotations: object[]; decorators: string[]; text: string; type: StrictExtract<SyntheticBehaviorEventType, "insert.span">; } | { text: string; type: StrictExtract<SyntheticBehaviorEventType, "insert.text">; } | { distance: number; type: StrictExtract<SyntheticBehaviorEventType, "move.backward">; } | { at: [KeyedSegment]; to: [KeyedSegment]; type: StrictExtract<SyntheticBehaviorEventType, "move.block">; } | { distance: number; type: StrictExtract<SyntheticBehaviorEventType, "move.forward">; } | { at: EditorSelection; type: StrictExtract<SyntheticBehaviorEventType, "select">; } | AbstractBehaviorEvent

Defined in: behavior.types.event.ts:91

Type declaration

{ annotation: { name: string; value: {[prop: string]: unknown; }; }; type: StrictExtract<SyntheticBehaviorEventType, "annotation.add">; }

annotation

annotation: object

annotation.name

name: string

annotation.value

value: object

Index Signature

[prop: string]: unknown

type

type: StrictExtract<SyntheticBehaviorEventType, "annotation.add">

{ annotation: { name: string; }; type: StrictExtract<SyntheticBehaviorEventType, "annotation.remove">; }

annotation

annotation: object

annotation.name

name: string

type

type: StrictExtract<SyntheticBehaviorEventType, "annotation.remove">

{ at: [KeyedSegment]; props: Record<string, unknown>; type: StrictExtract<SyntheticBehaviorEventType, "block.set">; }

at

at: [KeyedSegment]

props

props: Record<string, unknown>

type

type: StrictExtract<SyntheticBehaviorEventType, "block.set">

{ at: [KeyedSegment]; props: string[]; type: StrictExtract<SyntheticBehaviorEventType, "block.unset">; }

at

at: [KeyedSegment]

props

props: string[]

type

type: StrictExtract<SyntheticBehaviorEventType, "block.unset">

{ at: { anchor: BlockOffset; focus: BlockOffset; }; decorator: string; type: StrictExtract<SyntheticBehaviorEventType, "decorator.add">; }

at?

optional at: object

at.anchor

anchor: BlockOffset

at.focus

focus: BlockOffset

decorator

decorator: string

type

type: StrictExtract<SyntheticBehaviorEventType, "decorator.add">

{ decorator: string; type: StrictExtract<SyntheticBehaviorEventType, "decorator.remove">; }

decorator

decorator: string

type

type: StrictExtract<SyntheticBehaviorEventType, "decorator.remove">

{ at: NonNullable<EditorSelection>; direction: "backward" | "forward"; type: StrictExtract<SyntheticBehaviorEventType, "delete">; unit: "character" | "word" | "line" | "block"; }

at

at: NonNullable<EditorSelection>

direction?

optional direction: "backward" | "forward"

Defaults to forward deletion.

type

type: StrictExtract<SyntheticBehaviorEventType, "delete">

unit?

optional unit: "character" | "word" | "line" | "block"

Defaults to character deletion.

{ type: StrictExtract<SyntheticBehaviorEventType, "history.redo">; }

type

type: StrictExtract<SyntheticBehaviorEventType, "history.redo">

{ type: StrictExtract<SyntheticBehaviorEventType, "history.undo">; }

type

type: StrictExtract<SyntheticBehaviorEventType, "history.undo">

{ inlineObject: { name: string; value: {[prop: string]: unknown; }; }; type: StrictExtract<SyntheticBehaviorEventType, "insert.inline object">; }

inlineObject

inlineObject: object

inlineObject.name

name: string

inlineObject.value?

optional value: object

Index Signature

[prop: string]: unknown

type

type: StrictExtract<SyntheticBehaviorEventType, "insert.inline object">

{ block: BlockWithOptionalKey; placement: InsertPlacement; select: "start" | "end" | "none"; type: StrictExtract<SyntheticBehaviorEventType, "insert.block">; }

block

block: BlockWithOptionalKey

placement

placement: InsertPlacement

select?

optional select: "start" | "end" | "none"

type

type: StrictExtract<SyntheticBehaviorEventType, "insert.block">

{ annotations: object[]; decorators: string[]; text: string; type: StrictExtract<SyntheticBehaviorEventType, "insert.span">; }

annotations?

optional annotations: object[]

decorators?

optional decorators: string[]

text

text: string

type

type: StrictExtract<SyntheticBehaviorEventType, "insert.span">

{ text: string; type: StrictExtract<SyntheticBehaviorEventType, "insert.text">; }

text

text: string

type

type: StrictExtract<SyntheticBehaviorEventType, "insert.text">

{ distance: number; type: StrictExtract<SyntheticBehaviorEventType, "move.backward">; }

distance

distance: number

type

type: StrictExtract<SyntheticBehaviorEventType, "move.backward">

{ at: [KeyedSegment]; to: [KeyedSegment]; type: StrictExtract<SyntheticBehaviorEventType, "move.block">; }

at

at: [KeyedSegment]

to

to: [KeyedSegment]

type

type: StrictExtract<SyntheticBehaviorEventType, "move.block">

{ distance: number; type: StrictExtract<SyntheticBehaviorEventType, "move.forward">; }

distance

distance: number

type

type: StrictExtract<SyntheticBehaviorEventType, "move.forward">

{ at: EditorSelection; type: StrictExtract<SyntheticBehaviorEventType, "select">; }

at

at: EditorSelection

type

type: StrictExtract<SyntheticBehaviorEventType, "select">

AbstractBehaviorEvent