/** * Creates a curried function that takes a WebSocket as an input and returns an async iterable queue that generates values from the WebSocket's "message" events. Automatically marks the queue as sealed when the WebSocket is closed. * * @group Adapters * @template T - The type of data contained in the WebSocket messages. * @returns {(input: WebSocket) => IterableQueue>} A function that takes a WebSocket as input and returns an IterableQueue of MessageEvent. * * @example * ```ts * const ws = new WebSocket('ws://example.com'); * const wsQueue = withWebSocketAdapter<{ message: string }>()(ws); * * (async () => { * for await (const event of wsQueue) { * console.log(event.data); // Logs WebSocket messages as they are received * } * })(); * ``` */ export declare const withWebSocketAdapter: () => (input: WebSocket) => import("../../types").ExtendedAsyncIterable>; /** * A non-currying variant of {@link withWebSocketAdapter}. Takes a WebSocket as an input and returns an async iterable queue that generates values from the WebSocket's "message" events. Automatically marks the queue as sealed when the WebSocket is closed. * * @group Adapters * @template T - The type of data contained in the WebSocket messages. * @param {WebSocket} input - The WebSocket to adapt into an iterable queue. * @returns {IterableQueue>} An IterableQueue of MessageEvent generated from the WebSocket's "message" events. * * @example * ```ts * const ws = new WebSocket('ws://example.com'); * const wsQueue = webSocketAdapter<{ message: string }>(ws); * * (async () => { * for await (const event of wsQueue) { * console.log(event.data); // Logs WebSocket messages as they are received * } * })(); * ``` */ export declare const webSocketAdapter: (input: WebSocket) => import("../../types").ExtendedAsyncIterable>;