BlockSuite API Documentation / @blocksuite/store / Y / AbstractType
Class: AbstractType<EventType>
Extended by
Type parameters
• EventType
Abstract Yjs Type class
Constructors
new AbstractType()
new AbstractType<
EventType
>():AbstractType
<EventType
>
Returns
AbstractType
<EventType
>
Properties
_dEH
_dEH:
EventHandler
<YEvent
<any
>[],Transaction
>
Deep event handlers
Source
node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/types/AbstractType.d.ts:46
_eH
_eH:
EventHandler
<EventType
,Transaction
>
Event handlers
Source
node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/types/AbstractType.d.ts:41
_item
_item:
null
|Item
Source
node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/types/AbstractType.d.ts:23
_length
_length:
number
Source
node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/types/AbstractType.d.ts:36
_map
_map:
Map
<string
,Item
>
Source
node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/types/AbstractType.d.ts:27
_searchMarker
_searchMarker:
null
|ArraySearchMarker
[]
Source
node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/types/AbstractType.d.ts:50
_start
_start:
null
|Item
Source
node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/types/AbstractType.d.ts:31
doc
doc:
null
|Doc
Source
node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/types/AbstractType.d.ts:35
Accessors
_first
get
_first():null
|Item
The first non-deleted item
Returns
null
| Item
Source
node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/types/AbstractType.d.ts:85
parent
get
parent():null
|AbstractType
<any
>
Returns
null
| AbstractType
<any
>
Source
node_modules/.pnpm/yjs@13.6.15/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
• transaction: Transaction
• _parentSubs: Set
<null
| string
>
Keys changed on this type. null
if list was modified.
Returns
void
Source
node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/types/AbstractType.d.ts:93
_copy()
_copy():
AbstractType
<EventType
>
Returns
AbstractType
<EventType
>
Source
node_modules/.pnpm/yjs@13.6.15/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
• y: Doc
The Yjs instance
• item: null
| Item
Returns
void
Source
node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/types/AbstractType.d.ts:65
_write()
_write(
_encoder
):void
Parameters
• _encoder: UpdateEncoderV1
| UpdateEncoderV2
Returns
void
Source
node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/types/AbstractType.d.ts:81
clone()
clone():
AbstractType
<EventType
>
Makes a copy of this data type that can be included somewhere else.
Note that the content is only readable after it has been included somewhere in the Ydoc.
Returns
AbstractType
<EventType
>
Source
node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/types/AbstractType.d.ts:77
observe()
observe(
f
):void
Observe all events that are created on this type.
Parameters
• f
Observer function
Returns
void
Source
node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/types/AbstractType.d.ts:99
observeDeep()
observeDeep(
f
):void
Observe all events that are created by this type and its children.
Parameters
• f
Observer function
Returns
void
Source
node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/types/AbstractType.d.ts:105
toJSON()
toJSON():
any
Returns
any
Abstract
Source
node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/types/AbstractType.d.ts:122
unobserve()
unobserve(
f
):void
Unregister an observer function.
Parameters
• f
Observer function
Returns
void
Source
node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/types/AbstractType.d.ts:111
unobserveDeep()
unobserveDeep(
f
):void
Unregister an observer function.
Parameters
• f
Observer function
Returns
void
Source
node_modules/.pnpm/yjs@13.6.15/node_modules/yjs/dist/src/types/AbstractType.d.ts:117