import type { FileInput } from './index.js'; /** A file input once read: where it came from, and its bytes. */ export interface ReadInput { source: string; bytes: Uint8Array; } /** Every input as a list, so one file and many are called the same way. */ export declare function inputsOf(inputs: FileInput | Iterable): Iterable; /** Where an input came from, without reading it. */ export declare function sourceOf(input: FileInput): string; /** * Reads an input. Content held in memory is used as it is; a path or file URL is read from disk, and * `node:fs` is imported only then, so a runtime without a filesystem can still load in-memory content. */ export declare function readInput(input: FileInput): Promise; /** Reads an input as text, dropping a UTF-8 byte-order mark. */ export declare function readText(input: FileInput): Promise<{ source: string; text: string; }>; /** * An input's text a piece at a time, so a large file is never held whole: a path or file URL read from * disk in chunks of 64 KiB, a stream as it arrives, and content in memory as it is. A character split * between two chunks is decoded whole, and a byte-order mark is dropped. */ export declare function textChunks(input: FileInput): AsyncGenerator;