# OfflineDataSource (@salmonui/data/local)

> The OfflineDataSource interface of @salmonui/data/local.

Canonical: https://salmonui.dev/docs/reference/data/local/OfflineDataSource

```ts
import type { OfflineDataSource } from '@salmonui/data/local';
```

Also exported from `@salmonui/data`.

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

## Reference

Kind: interface

```ts
interface OfflineDataSource<Row> extends DataSource<Row> {
    readonly mode: 'local';
    read(request: DataSourceRequest): DataSourceResult<Row>;
    subscribe(listener: (event: DataSourceEvent<Row>) => void): () => void;
    load(): Promise<readonly Row[]>;
    readonly status: 'idle' | 'loading' | 'ready' | 'error';
}
```

Members (7):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `mode` | `readonly mode: 'local';` |  |  |
| `read` | `read(request: DataSourceRequest): DataSourceResult<Row>;` |  |  |
| `subscribe` | `subscribe(listener: (event: DataSourceEvent<Row>) => void): () => void;` |  |  |
| `load` | `load(): Promise<readonly Row[]>;` |  | (Re)loads the set; emits one `reset`. The first `read` starts it automatically. |
| `status` | `readonly status: 'idle' \| 'loading' \| 'ready' \| 'error';` |  |  |
| `write` | `write?: ((request: WriteRequest<Row>) => Promise<WriteResult<Row>>);` | optional, inherited |  |
| `capabilities` | `capabilities?: Partial<DataSourceCapabilities>;` | optional, inherited |  |
