Skip to content

Home > @liquidrazor/list-display > StreamSourceOptions

StreamSourceOptions interface

Signature:

typescript
export interface StreamSourceOptions<TRow = any, TRowId extends RowId = RowId>

Properties

Property

Modifiers

Type

Description

bootstrap?

() => Promise<StreamBootstrapResult<TRow>> | StreamBootstrapResult<TRow>

(Optional) Optional bootstrap function to get an initial snapshot.

destroy?

() => void

(Optional) Optional cleanup hook for shutting down the low-level stream.

label?

string

(Optional)

refresh?

() => Promise<void> | void

(Optional) Optional refresh hook (may trigger a new bootstrap or cause the underlying stream to re-emit data).

subscribe

StreamSubscribeFn<TRow, TRowId>

Function that wires the low-level stream (SSE/WS/RTSK/etc.) to the library via patches.