import type { CBORValue } from "./types.js"; import { DecodeOptions, FloatSize } from "./options.js"; export interface AsyncDecodeOptions extends DecodeOptions { onFree?: (chunk: Uint8Array) => void; } export declare class Decoder implements AsyncIterableIterator { readonly allowUndefined: boolean; readonly minFloatSize: (typeof FloatSize)[keyof typeof FloatSize]; private offset; private byteLength; private readonly chunks; private readonly constantBuffer; private readonly constantView; private readonly iter; private readonly onFree?; private readonly touchedChunks; private readonly freedChunks; constructor(source: AsyncIterable, options?: AsyncDecodeOptions); [Symbol.asyncIterator]: () => this; private allocate; private fill; private constant; private float16; private float32; private float64; private uint8; private uint16; private uint32; private uint64; private decodeBytes; private decodeString; private getArgument; next(): Promise<{ done: true; value: undefined; } | { done: false; value: T; }>; private decodeValue; } /** Decode an async iterable of Uint8Array chunks into an async iterable of CBOR values */ export declare function decodeAsyncIterable(source: AsyncIterable, options?: AsyncDecodeOptions): AsyncIterableIterator;