Host subscription contract for ordered versioned operations. Sources that
can pause intake should await the listener promise to preserve backpressure.
- Package
@sheetwrite/core
- Source
packages/core/src/types/transaction.ts#L128
Members 1
subscribe
subscribe( listener: (operation: VersionedOperationinterface VersionedOperation {
version: number;
readonly operations: readonly DocumentOp[];
clientMutationId?: string;
}interface VersionedOperation {
version: number;
readonly operations: readonly DocumentOp[];
clientMutationId?: string;
}interface VersionedOperation {
version: number;
readonly operations: readonly DocumentOp[];
clientMutationId?: string;
}Remote document operations paired with a contiguous server version.API reference →) => void | Promise<void>, signal?: AbortSignal, ): undefined | (() => void);
Declaration
View full TypeScript declaration
export interface RemoteOperationSource {
listener: (operation: VersionedOperationinterface VersionedOperation {
version: number;
readonly operations: readonly DocumentOp[];
clientMutationId?: string;
}interface VersionedOperation {
version: number;
readonly operations: readonly DocumentOp[];
clientMutationId?: string;
}interface VersionedOperation {
version: number;
readonly operations: readonly DocumentOp[];
clientMutationId?: string;
}Remote document operations paired with a contiguous server version.API reference →) => void | Promise<void>, ): undefined | (() => void);