/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { MatterError, TimeoutError } from "#MatterError.js";
/**
 * Generic error thrown when a stream closes in a context where we expected a value.
 */
export declare class EndOfStreamError extends MatterError {
    constructor(message?: string);
}
/**
 * Timeout specific to cases where we were expecting a value.
 */
export declare class NoResponseTimeoutError extends TimeoutError {
}
/**
 * A generic iterator type that accepts both async and normal iterators.
 */
export type MaybeAsyncIterable<T> = Iterable<T, void, void> | AsyncIterable<T, void, void>;
export declare namespace Stream {
    /**
     * Ponyfill for standard ReadableStream.from().
     *
     * If defined, we use the native implementation.  Otherwise we create the stream ourselves.
     */
    function from<T>(iterable: MaybeAsyncIterable<T>): ReadableStream<T>;
    /**
     * Ponyfill for standard ReadableStream#[Symbol.asyncIterator].
     *
     * If defined, we use the native implementation.  Otherwise we create the iterator ourselves.  Currently only
     * necessary on Safari.
     */
    function iterable<T>(stream: ReadableStream<T>): AsyncGenerator<T, void, void>;
}
//# sourceMappingURL=Streams.d.ts.map