StreamHandle
The reactive view of a stream: what it last received, its status, and how to close it.
The reactive view of a stream: what it last received, its status, and how to close it.
Import#
ts
import type { StreamHandle } from "@shadow-js/dusk/client";
Signature#
ts
interface StreamHandle<T> {
/** The last data received, if any. */
readonly data: Accessor<T | undefined>;
/** The status. */
readonly status: Accessor<StreamStatus>;
/** Closes the stream. Also done when the owning component is disposed. */
close(): void;
}
Members#
| Name | Type | Description |
|---|---|---|
T |
T |
|
data |
readonly data: Accessor<T | undefined> |
The last data received, if any. |
status |
readonly status: Accessor<StreamStatus> |
The status. |
close |
close(): void |
Closes the stream. Also done when the owning component is disposed. |