[]
Events emitted by the SharedDoc.
Name | Description |
---|---|
S |
The type of snapshot data. |
T |
The type of operation data. |
▸ beforeOp(op
, source?
): void
Triggered before an operation is applied.
Name | Type |
---|---|
op |
T |
source? |
unknown |
void
▸ create(source?
): void
Name | Type |
---|---|
source? |
unknown |
void
▸ del(data
, source?
): void
Name | Type |
---|---|
data |
S |
source? |
unknown |
void
▸ error(err
): void
Triggered when an error occurs.
Name | Type |
---|---|
err |
OTError |
void
▸ hardRollback(): void
void
▸ load(): void
Triggered after a client fetches or subscribes to the snapshot.
void
▸ op(op
, source?
): void
Triggered after an operation is applied.
Name | Type |
---|---|
op |
T |
source? |
unknown |
void