export { createReceiver }; export type { StreamedValueType }; import { type Reviver } from '@brillout/json-serializer/parse'; import type { Line } from '../../../shared-server-client/streamedValues.js'; import '../../assertEnvClient.js'; type StreamedValueType = { marker: string; /** `parseValue()` parses the value of a `v` line, which can contain further streamed values */ revive: (parseValue: (value: unknown) => unknown) => StreamedValue; }; type StreamedValue = { value: unknown; push: (line: Line) => void; fail: (err: unknown) => void; }; declare function createReceiver(abortSignal?: AbortSignal): { reviver: Reviver; onLine(lineStr: string): void; /** The response failed or ended: the values that didn't end fail */ fail(err: unknown): void; };