export interface QoaEncodeOptions { /** Emit bytes as they encode (metadata in the header); head() gives the final header. */ stream?: boolean; /** The exact length in sample frames, when known upfront: the streamed header goes out exact. */ frames?: number; sampleRate: number; } export interface StreamEncoder { encode(channels: Float32Array[]): Uint8Array; flush(): Uint8Array; free(): void; /** After flush: bytes to write over the start (final totals), or null when exact. */ head?(): Uint8Array | null; } export default function qoa(opts: QoaEncodeOptions): Promise;