Skip to content

API > @blocksuite/store > Y > YMapEvent

Class: YMapEvent<T> ​

Extends ​

Constructors ​

constructor ​

new YMapEvent<T>( ymap, transaction, subs): YMapEvent< T >

Type parameters ​

Parameter
T

Parameters ​

ParameterTypeDescription
ymapMap< T >The YArray that changed.
transactionTransaction-
subsSet< any >The keys that changed.

Returns ​

YMapEvent< T >

Overrides ​

YEvent.constructor

Defined In ​

node_modules/.pnpm/yjs@13.6.8/node_modules/yjs/dist/src/types/YMap.d.ts:12

Properties ​

_changes ​

_changes: null | Object

Defined In ​

node_modules/.pnpm/yjs@13.6.8/node_modules/yjs/dist/src/utils/YEvent.d.ts:29

Inherited from ​

YEvent._changes


_delta ​

_delta: null | {attributes: {}; delete: number; insert: string | object | any[] | AbstractType< any >; retain: number;}[]

Defined In ​

node_modules/.pnpm/yjs@13.6.8/node_modules/yjs/dist/src/utils/YEvent.d.ts:41

Inherited from ​

YEvent._delta


_keys ​

_keys: null | Map< string, {action: "add" | "update" | "delete"; newValue: any; oldValue: any;} >

Defined In ​

node_modules/.pnpm/yjs@13.6.8/node_modules/yjs/dist/src/utils/YEvent.d.ts:33

Inherited from ​

YEvent._keys


_path ​

_path: null | (string | number)[]

Defined In ​

node_modules/.pnpm/yjs@13.6.8/node_modules/yjs/dist/src/utils/YEvent.d.ts:52

Inherited from ​

YEvent._path


currentTarget ​

currentTarget: AbstractType< any >

The current target on which the observe callback is called.

Defined In ​

node_modules/.pnpm/yjs@13.6.8/node_modules/yjs/dist/src/utils/YEvent.d.ts:20

Inherited from ​

YEvent.currentTarget


keysChanged ​

keysChanged: Set< any >

Defined In ​

node_modules/.pnpm/yjs@13.6.8/node_modules/yjs/dist/src/types/YMap.d.ts:13


target ​

target: Map< T >

The type on which this event was created on.

Defined In ​

node_modules/.pnpm/yjs@13.6.8/node_modules/yjs/dist/src/utils/YEvent.d.ts:15

Inherited from ​

YEvent.target


transaction ​

transaction: Transaction

The transaction that triggered this event.

Defined In ​

node_modules/.pnpm/yjs@13.6.8/node_modules/yjs/dist/src/utils/YEvent.d.ts:25

Inherited from ​

YEvent.transaction

Accessors ​

changes ​

get changes(): object

Defined In ​

node_modules/.pnpm/yjs@13.6.8/node_modules/yjs/dist/src/utils/YEvent.d.ts:117

Inherited from ​

YEvent.changes


delta ​

get delta(): {attributes: {}; delete: number; insert: string | object | any[] | AbstractType< any >; retain: number;}[]

Defined In ​

node_modules/.pnpm/yjs@13.6.8/node_modules/yjs/dist/src/utils/YEvent.d.ts:92

Inherited from ​

YEvent.delta


keys ​

get keys(): Map< string, {action: "add" | "update" | "delete"; newValue: any; oldValue: any;} >

Defined In ​

node_modules/.pnpm/yjs@13.6.8/node_modules/yjs/dist/src/utils/YEvent.d.ts:79

Inherited from ​

YEvent.keys


path ​

get path(): (string | number)[]

Defined In ​

node_modules/.pnpm/yjs@13.6.8/node_modules/yjs/dist/src/utils/YEvent.d.ts:66

Inherited from ​

YEvent.path

Methods ​

adds ​

adds(struct): boolean

Check if a struct is added by this event.

In contrast to change.deleted, this method also returns true if the struct was added and then deleted.

Parameters ​

ParameterType
structAbstractStruct

Returns ​

boolean

Inherited from ​

YEvent.adds

Defined In ​

node_modules/.pnpm/yjs@13.6.8/node_modules/yjs/dist/src/utils/YEvent.d.ts:108


deletes ​

deletes(struct): boolean

Check if a struct is deleted by this event.

In contrast to change.deleted, this method also returns true if the struct was added and then deleted.

Parameters ​

ParameterType
structAbstractStruct

Returns ​

boolean

Inherited from ​

YEvent.deletes

Defined In ​

node_modules/.pnpm/yjs@13.6.8/node_modules/yjs/dist/src/utils/YEvent.d.ts:75