Skip to content

BlockSuite API Documentation / @blocksuite/store / Y / AbstractType

Class: AbstractType<EventType>

Extended by

Type parameters

EventType

Abstract Yjs Type class

Constructors

new AbstractType(undefined)

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.11/node_modules/yjs/dist/src/types/AbstractType.d.ts:46


_eH

_eH: EventHandler<EventType, Transaction>

Event handlers

Source

node_modules/.pnpm/yjs@13.6.11/node_modules/yjs/dist/src/types/AbstractType.d.ts:41


_item

_item: null | Item

Source

node_modules/.pnpm/yjs@13.6.11/node_modules/yjs/dist/src/types/AbstractType.d.ts:23


_length

_length: number

Source

node_modules/.pnpm/yjs@13.6.11/node_modules/yjs/dist/src/types/AbstractType.d.ts:36


_map

_map: Map<string, Item>

Source

node_modules/.pnpm/yjs@13.6.11/node_modules/yjs/dist/src/types/AbstractType.d.ts:27


_searchMarker

_searchMarker: null | ArraySearchMarker[]

Source

node_modules/.pnpm/yjs@13.6.11/node_modules/yjs/dist/src/types/AbstractType.d.ts:50


_start

_start: null | Item

Source

node_modules/.pnpm/yjs@13.6.11/node_modules/yjs/dist/src/types/AbstractType.d.ts:31


doc

doc: null | Doc

Source

node_modules/.pnpm/yjs@13.6.11/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.11/node_modules/yjs/dist/src/types/AbstractType.d.ts:81


parent

get parent(): null | AbstractType<any>

Returns

null | AbstractType<any>

Source

node_modules/.pnpm/yjs@13.6.11/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.11/node_modules/yjs/dist/src/types/AbstractType.d.ts:89


_copy()

_copy(): AbstractType<EventType>

Returns

AbstractType<EventType>

Source

node_modules/.pnpm/yjs@13.6.11/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.11/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.11/node_modules/yjs/dist/src/types/AbstractType.d.ts:77


clone()

clone(): AbstractType<EventType>

Returns

AbstractType<EventType>

Source

node_modules/.pnpm/yjs@13.6.11/node_modules/yjs/dist/src/types/AbstractType.d.ts:73


observe()

observe(f): void

Observe all events that are created on this type.

Parameters

f: (arg0, arg1) => void

Observer function

Returns

void

Source

node_modules/.pnpm/yjs@13.6.11/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

f: (arg0, arg1) => void

Observer function

Returns

void

Source

node_modules/.pnpm/yjs@13.6.11/node_modules/yjs/dist/src/types/AbstractType.d.ts:101


toJSON()

toJSON(): any

Returns

any

Abstract

Source

node_modules/.pnpm/yjs@13.6.11/node_modules/yjs/dist/src/types/AbstractType.d.ts:118


unobserve()

unobserve(f): void

Unregister an observer function.

Parameters

f: (arg0, arg1) => void

Observer function

Returns

void

Source

node_modules/.pnpm/yjs@13.6.11/node_modules/yjs/dist/src/types/AbstractType.d.ts:107


unobserveDeep()

unobserveDeep(f): void

Unregister an observer function.

Parameters

f: (arg0, arg1) => void

Observer function

Returns

void

Source

node_modules/.pnpm/yjs@13.6.11/node_modules/yjs/dist/src/types/AbstractType.d.ts:113


Generated using TypeDoc and typedoc-plugin-markdown.