# LiveEmitter (@salmonui/data/stream)

> The LiveEmitter interface of @salmonui/data/stream.

Canonical: https://salmonui.dev/docs/reference/data/stream/LiveEmitter

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

Also exported from `@salmonui/data`.

Entry index: https://salmonui.dev/docs/reference/data/stream (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/data/stream.md).

## Reference

Kind: interface

```ts
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;
}
```

Members (5):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `replace` | `replace(rows: readonly Row[], totalRowCount?: number): void;` |  |  |
| `patch` | `patch(patch: LivePatch<Row>): void;` |  |  |
| `message` | `message(message: WireLiveMessage): void;` |  | Applies a JSON-protocol live message (tuples, dictionaries). |
| `conflict` | `conflict(conflict: ConflictSnapshot<Row>): void;` |  |  |
| `fail` | `fail(error: unknown): void;` |  |  |
