import { Sender } from './sender.mjs'; import { Receiver } from './receiver.mjs'; /** An unbounded asynchronous channel. */ export declare class Channel implements Sender, Receiver { #private; /** Creates a new Channel */ constructor(); /** Async iterator for this channel */ [Symbol.asyncIterator](): AsyncGenerator & undefined> | Awaited & {}>, void, unknown>; /** Returns the number of values buffered in this channel */ get bufferedAmount(): number; /** Sends the given value to this channel. If channel has ended no action. */ send(value: T): void; /** Sends the given error to this channel causing the receiver to throw on next(). If channel has ended no action. */ error(error: Error): void; /** Ends this channel. */ end(): void; /** Returns the next value from this channel or null if EOF. */ next(): Promise; }