/** @internal */ /** The various different types of IO errors. */ export declare type ErrorCode = "other" | "resource-not-found" | "unexpected-end-of-file" | "write-zero"; /** Represents an error during an I/O operation. */ export declare class IoError extends Error { /** The error's code. */ readonly code: ErrorCode; } /** The result from calling for another buffer a single time. */ declare type NextCallbackResult = { done: true; } | { done: false; value: Uint8Array; }; /** * A generic implementation of a read-to-end algorithm. * * Reused for resource keys and readable streams. */ export declare const readToEndImpl: (nextCallback: () => Promise, finallyCallback: () => Promise | void, sizeHint?: number) => Promise; export {};