[]
        
(Showing Draft Content)

ISharedDocEvents

Interface: ISharedDocEvents<S, T>

Events emitted by the SharedDoc.

Type parameters

Name Description
S The type of snapshot data.
T The type of operation data.

Table of contents

Methods

Methods

beforeOp

beforeOp(op, source?): void

Triggered before an operation is applied.

Parameters

Name Type
op T
source? unknown

Returns

void


create

create(source?): void

Parameters

Name Type
source? unknown

Returns

void


del

del(data, source?): void

Parameters

Name Type
data S
source? unknown

Returns

void


error

error(err): void

Triggered when an error occurs.

Parameters

Name Type
err OTError

Returns

void


hardRollback

hardRollback(): void

Returns

void


load

load(): void

Triggered after a client fetches or subscribes to the snapshot.

Returns

void


op

op(op, source?): void

Triggered after an operation is applied.

Parameters

Name Type
op T
source? unknown

Returns

void