Skip to content

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

Class: AbstractStruct

Extended by

Constructors

new AbstractStruct(id, length)

new AbstractStruct(id, length): AbstractStruct

Parameters

id: ID

length: number

Returns

AbstractStruct

Source

node_modules/.pnpm/yjs@13.6.14/node_modules/yjs/dist/src/structs/AbstractStruct.d.ts:6

Properties

id

id: ID

Source

node_modules/.pnpm/yjs@13.6.14/node_modules/yjs/dist/src/structs/AbstractStruct.d.ts:7


length

length: number

Source

node_modules/.pnpm/yjs@13.6.14/node_modules/yjs/dist/src/structs/AbstractStruct.d.ts:8

Accessors

deleted

get deleted(): boolean

Returns

boolean

Source

node_modules/.pnpm/yjs@13.6.14/node_modules/yjs/dist/src/structs/AbstractStruct.d.ts:12

Methods

integrate()

integrate(transaction, offset): void

Parameters

transaction: Transaction

offset: number

Returns

void

Source

node_modules/.pnpm/yjs@13.6.14/node_modules/yjs/dist/src/structs/AbstractStruct.d.ts:31


mergeWith()

mergeWith(right): boolean

Merge this struct with the item to the right. This method is already assuming that this.id.clock + this.length === this.id.clock. Also this method does not remove right from StructStore!

Parameters

right: AbstractStruct

Returns

boolean

wether this merged with right

Source

node_modules/.pnpm/yjs@13.6.14/node_modules/yjs/dist/src/structs/AbstractStruct.d.ts:20


write()

write(encoder, offset, encodingRef): void

Parameters

encoder: UpdateEncoderV1 | UpdateEncoderV2

The encoder to write data to.

offset: number

encodingRef: number

Returns

void

Source

node_modules/.pnpm/yjs@13.6.14/node_modules/yjs/dist/src/structs/AbstractStruct.d.ts:26