UNPKG

turbo-stream

Version:

A streaming data transport format that aims to support built-in features such as Promises, Dates, RegExps, Maps, Sets and more.

8 lines (7 loc) 288 B
export type DecodePlugin = (type: string, ...data: unknown[]) => { value: unknown; } | false | null | undefined; export type DecodeOptions = { plugins?: DecodePlugin[]; }; export declare function decode<T>(stream: ReadableStream<string>, { plugins }?: DecodeOptions): Promise<T>;