View as Markdown

API reference: @salmonui/data/stream

LiveEmitterinterface

import type { LiveEmitter } from '@salmonui/data/stream';

Also exported from @salmonui/data.

interface LiveEmitter<Row> {
    replace(rows: readonly Row[], totalRowCount?: number): void;
    patch(patch: LivePatch<Row>): void;
    message(message: WireLiveMessage): void;
    conflict(conflict: ConflictSnapshot<Row>): void;
    fail(error: unknown): void;
}
LiveEmitter members (5)
NameSignatureDescription
replacereplace(rows: readonly Row[], totalRowCount?: number): void;
patchpatch(patch: LivePatch<Row>): void;
messagemessage(message: WireLiveMessage): void;

Applies a JSON-protocol live message (tuples, dictionaries).

conflictconflict(conflict: ConflictSnapshot<Row>): void;
failfail(error: unknown): void;