import { BamlHandle } from '../native.js'; import type { InvocationOptions } from './invocation.js'; /** * A live `ai.stream.Stream`. A partial and the settled value share the one * type: a partial is `T` parsed from the text received so far. */ export declare class BamlStream { private _handle; private _classFqn; constructor(handle: BamlHandle, classFqn: string); /** Internal: produce a fresh BamlStream from a BamlHandle. Used by proto decode. */ static _fromHandle(handle: BamlHandle, classFqn: string): BamlStream; /** Internal: expose the inner BamlHandle for inbound encode. */ _toHandle(): BamlHandle; next(options?: { $baml?: InvocationOptions | null; }): Promise; /** Blocking twin of `next()`. Throws in Web runtimes (browser, workerd), which cannot block on a stream pull. */ nextSync(options?: { $baml?: InvocationOptions | null; }): T; final(options?: { $baml?: InvocationOptions | null; }): Promise; /** Blocking twin of `final()`. Throws in Web runtimes (browser, workerd), which cannot block on a stream pull. */ finalSync(options?: { $baml?: InvocationOptions | null; }): T; private _callSync; private _callAsync; } //# sourceMappingURL=stream.d.ts.map