@xsai/utils-stream 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ interface SimulateReadableStreamOptions<T> {
|
|
|
4
4
|
initialDelay: number;
|
|
5
5
|
}
|
|
6
6
|
/** @experimental */
|
|
7
|
-
declare const simulateReadableStream: <T>({ chunkDelay, chunks, initialDelay }: SimulateReadableStreamOptions<T>) => ReadableStream<
|
|
7
|
+
declare const simulateReadableStream: <T>({ chunkDelay, chunks, initialDelay }: SimulateReadableStreamOptions<T>) => ReadableStream<T>;
|
|
8
8
|
|
|
9
9
|
interface SmoothStreamOptions {
|
|
10
10
|
chunking?: 'line' | 'word' | RegExp;
|
|
@@ -16,6 +16,7 @@ interface SmoothStreamOptions {
|
|
|
16
16
|
*/
|
|
17
17
|
declare const smoothStream: ({ chunking, delay }?: SmoothStreamOptions) => TransformStream<string, string>;
|
|
18
18
|
|
|
19
|
+
/** @see {@link https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream#browser_compatibility} */
|
|
19
20
|
declare function toAsyncIterator<T>(stream: ReadableStream<T>): AsyncGenerator<T, void, unknown>;
|
|
20
21
|
|
|
21
22
|
export { simulateReadableStream, smoothStream, toAsyncIterator };
|