export { LazyBlob }; export { LazyFile }; export { isLazyBlob }; export { isLazyFile }; declare const LAZY_BLOB_BRAND: unique symbol; declare const LAZY_FILE_BRAND: unique symbol; declare function isLazyBlob(value: unknown): value is LazyBlob; declare function isLazyFile(value: unknown): value is LazyFile; type GetStream = () => ReadableStream>; /** Shared Blob implementation — subclasses only provide `stream()`. */ declare abstract class BaseStreamBlob implements Blob { abstract readonly size: number; abstract readonly type: string; abstract stream(): ReadableStream>; arrayBuffer(): Promise; bytes(): Promise>; text(): Promise; slice(start?: number, end?: number, contentType?: string): Blob; get [Symbol.toStringTag](): string; } /** * A Blob backed by a stream callback that resolves a `ReadableStream` on first access. * * `size` and `type` are available immediately. Body data is pulled from the stream on * demand — no background pump. Each instance is **one-shot**: once consumed, further * reads throw. Subclasses that consume via a different path (e.g. StreamSource.bytes) * must call `_markConsumed()` to enforce the guard. */ declare class LazyBlob extends BaseStreamBlob { readonly size: number; readonly type: string; readonly [LAZY_BLOB_BRAND] = true; private getStream; protected _consumed: boolean; static [Symbol.hasInstance](value: unknown): boolean; constructor(size: number, type: string, getStream: GetStream); /** Subclasses overriding `bytes`/etc. that consume the source via a different path * must call this to keep the one-shot guard honest. */ protected _markConsumed(): void; stream(): ReadableStream>; } /** * A File implementation backed by a stream callback. Extends LazyBlob with `name`, * `lastModified`, and `webkitRelativePath`. */ declare class LazyFile extends LazyBlob { readonly name: string; readonly lastModified: number; readonly webkitRelativePath: string; readonly [LAZY_FILE_BRAND] = true; static [Symbol.hasInstance](value: unknown): boolean; constructor(size: number, type: string, name: string, lastModified: number, getStream: GetStream); get [Symbol.toStringTag](): string; }