Appearance
Home > @liquidrazor/list-display > DataSource
DataSource interface
Generic, technology-agnostic data source contract. Wraps parent-provided data, streams, queries etc.
Signature:
typescript
export interface DataSource<TRow = any, TRowId = RowId>Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
() => void | (Optional) Optional cleanup hook (unsubscribe, close sockets, etc.). | ||
() => Promise<DataSourceInitResult<TRow>> | Initial load. Must resolve with at least the initial rows. | ||
() => Promise<void> | void | (Optional) Optional refresh hook (refetch / reload). | ||
(listener: DataPatchListener<TRow, TRowId>) => Unsubscribe | (Optional) Optional stream of patches for incremental updates. |