import type { TimeoutAbort } from "./timeout-abort.js"; /** * Creates a new `ReadableStream` that monitors and handles timeouts using the provided `TimeoutAbort` instance. * * The stream is wrapped in a `TransformStream` which resets the timeout on each chunk and clears it when the stream is flushed. * * @template T The type of the stream's data. * * @param {ReadableStream} stream The original `ReadableStream` to be monitored. * @param {TimeoutAbort} timeoutAbort An instance of `TimeoutAbort` used to manage timeouts and abort signals. * @param {number | null} [timeout = undefined] The timeout duration in milliseconds to be reset on each chunk. * @param {boolean} [terminateTimeoutAbort = false] Terminate `timeoutAbort` when the stream is at the end. * * @returns {ReadableStream} A new `ReadableStream` that applies the timeout management. */ export declare const createTimeoutReadableStream: (stream: ReadableStream, timeoutAbort: TimeoutAbort, timeout?: number | null, terminateTimeoutAbort?: boolean) => ReadableStream;