UNPKG

ai-utils.js

Version:

Build AI applications, chatbots, and agents with JavaScript and TypeScript.

18 lines (17 loc) 418 B
/** * @internal */ export declare class AsyncQueue<T> implements AsyncIterable<T | undefined> { queue: T[]; resolvers: Array<(options: { value: T | undefined; done: boolean; }) => void>; closed: boolean; constructor(); push(value: T): void; close(): void; [Symbol.asyncIterator](): { next: () => Promise<IteratorResult<T | undefined, T | undefined>>; }; }