Skip to content

API > @blocksuite/store > Y > AbstractStruct

Class: AbstractStruct ​

Extended By ​

Constructors ​

constructor ​

new AbstractStruct(id, length): AbstractStruct

Parameters ​

ParameterType
idID
lengthnumber

Returns ​

AbstractStruct

Defined In ​

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

Properties ​

id ​

id: ID

Defined In ​

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


length ​

length: number

Defined In ​

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

Accessors ​

deleted ​

get deleted(): boolean

Defined In ​

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

Methods ​

integrate ​

integrate(transaction, offset): void

Parameters ​

ParameterType
transactionTransaction
offsetnumber

Returns ​

void

Defined In ​

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

ParameterType
rightAbstractStruct

Returns ​

boolean

wether this merged with right

Defined In ​

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


write ​

write( encoder, offset, encodingRef): void

Parameters ​

ParameterTypeDescription
encoderUpdateEncoderV1 | UpdateEncoderV2The encoder to write data to.
offsetnumber-
encodingRefnumber-

Returns ​

void

Defined In ​

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