Skip to content

Type Editor


Type Editor / @type-editor/collab / CollabState / CollabState

Class: CollabState

Defined in: CollabState.ts:12

Represents the state of the collaborative editing plugin.

This state field accumulates changes that need to be sent to the central authority and makes it possible to integrate changes made by peers into the local document. It tracks the current version and any unconfirmed local steps.

Constructors

Constructor

ts
new CollabState(version, unconfirmed): CollabState;

Defined in: CollabState.ts:22

Creates a new CollabState instance.

Parameters

ParameterTypeDescription
versionnumberThe version number of the last update received from the central authority. Starts at 0 or the value of the version property in the option object, for the editor's value when the option was enabled.
unconfirmedreadonly Rebaseable[]The local steps that haven't been successfully sent to the server yet.

Returns

CollabState

Properties

PropertyModifierTypeDescriptionDefined in
unconfirmedreadonlyreadonly Rebaseable[]The local steps that haven't been successfully sent to the server yet.CollabState.ts:24
versionreadonlynumberThe version number of the last update received from the central authority. Starts at 0 or the value of the version property in the option object, for the editor's value when the option was enabled.CollabState.ts:23