API > @blocksuite/store > Y > AbstractType
Class: AbstractType<EventType>
​
Extended By ​
Constructors ​
constructor ​
new AbstractType<
EventType
>():AbstractType
<EventType
>
Type parameters ​
Parameter |
---|
EventType |
Returns ​
AbstractType
< EventType
>
Properties ​
_dEH ​
_dEH:
EventHandler
<YEvent
<any
>[],Transaction
>
Deep event handlers
Defined In ​
node_modules/.pnpm/yjs@13.6.8/node_modules/yjs/dist/src/types/AbstractType.d.ts:46
_eH ​
_eH:
EventHandler
<EventType
,Transaction
>
Event handlers
Defined In ​
node_modules/.pnpm/yjs@13.6.8/node_modules/yjs/dist/src/types/AbstractType.d.ts:41
_item ​
_item:
null
|Item
Defined In ​
node_modules/.pnpm/yjs@13.6.8/node_modules/yjs/dist/src/types/AbstractType.d.ts:23
_length ​
_length:
number
Defined In ​
node_modules/.pnpm/yjs@13.6.8/node_modules/yjs/dist/src/types/AbstractType.d.ts:36
_map ​
_map:
Map
<string
,Item
>
Defined In ​
node_modules/.pnpm/yjs@13.6.8/node_modules/yjs/dist/src/types/AbstractType.d.ts:27
_searchMarker ​
_searchMarker:
null
|ArraySearchMarker
[]
Defined In ​
node_modules/.pnpm/yjs@13.6.8/node_modules/yjs/dist/src/types/AbstractType.d.ts:50
_start ​
_start:
null
|Item
Defined In ​
node_modules/.pnpm/yjs@13.6.8/node_modules/yjs/dist/src/types/AbstractType.d.ts:31
doc ​
doc:
null
|Doc
Defined In ​
node_modules/.pnpm/yjs@13.6.8/node_modules/yjs/dist/src/types/AbstractType.d.ts:35
Accessors ​
_first ​
get
_first():null
|Item
Defined In ​
node_modules/.pnpm/yjs@13.6.8/node_modules/yjs/dist/src/types/AbstractType.d.ts:81
parent ​
get
parent():null
|AbstractType
<any
>
Defined In ​
node_modules/.pnpm/yjs@13.6.8/node_modules/yjs/dist/src/types/AbstractType.d.ts:54
Methods ​
_callObserver ​
_callObserver(
transaction
,_parentSubs
):void
Creates YEvent and calls all type observers. Must be implemented by each type.
Parameters ​
Parameter | Type | Description |
---|---|---|
transaction | Transaction | - |
_parentSubs | Set < null | string > | Keys changed on this type. null if list was modified. |
Returns ​
void
Defined In ​
node_modules/.pnpm/yjs@13.6.8/node_modules/yjs/dist/src/types/AbstractType.d.ts:89
_copy ​
_copy():
AbstractType
<EventType
>
Returns ​
AbstractType
< EventType
>
Defined In ​
node_modules/.pnpm/yjs@13.6.8/node_modules/yjs/dist/src/types/AbstractType.d.ts:69
_integrate ​
_integrate(
y
,item
):void
Integrate this type into the Yjs instance.
- Save this struct in the os
- This type is sent to other client
- Observer functions are fired
Parameters ​
Parameter | Type | Description |
---|---|---|
y | Doc | The Yjs instance |
item | null | Item | - |
Returns ​
void
Defined In ​
node_modules/.pnpm/yjs@13.6.8/node_modules/yjs/dist/src/types/AbstractType.d.ts:65
_write ​
_write(
_encoder
):void
Parameters ​
Parameter | Type |
---|---|
_encoder | UpdateEncoderV1 | UpdateEncoderV2 |
Returns ​
void
Defined In ​
node_modules/.pnpm/yjs@13.6.8/node_modules/yjs/dist/src/types/AbstractType.d.ts:77
clone ​
clone():
AbstractType
<EventType
>
Returns ​
AbstractType
< EventType
>
Defined In ​
node_modules/.pnpm/yjs@13.6.8/node_modules/yjs/dist/src/types/AbstractType.d.ts:73
observe ​
observe(
f
):void
Observe all events that are created on this type.
Parameters ​
Parameter | Type | Description |
---|---|---|
f | function | Observer function |
Returns ​
void
Defined In ​
node_modules/.pnpm/yjs@13.6.8/node_modules/yjs/dist/src/types/AbstractType.d.ts:95
observeDeep ​
observeDeep(
f
):void
Observe all events that are created by this type and its children.
Parameters ​
Parameter | Type | Description |
---|---|---|
f | function | Observer function |
Returns ​
void
Defined In ​
node_modules/.pnpm/yjs@13.6.8/node_modules/yjs/dist/src/types/AbstractType.d.ts:101
toJSON ​
toJSON():
any
Returns ​
any
Abstract ​
Defined In ​
node_modules/.pnpm/yjs@13.6.8/node_modules/yjs/dist/src/types/AbstractType.d.ts:118
unobserve ​
unobserve(
f
):void
Unregister an observer function.
Parameters ​
Parameter | Type | Description |
---|---|---|
f | function | Observer function |
Returns ​
void
Defined In ​
node_modules/.pnpm/yjs@13.6.8/node_modules/yjs/dist/src/types/AbstractType.d.ts:107
unobserveDeep ​
unobserveDeep(
f
):void
Unregister an observer function.
Parameters ​
Parameter | Type | Description |
---|---|---|
f | function | Observer function |
Returns ​
void
Defined In ​
node_modules/.pnpm/yjs@13.6.8/node_modules/yjs/dist/src/types/AbstractType.d.ts:113