import { File as FilesystemFile } from "../../tools/filesystem/file.js";
export type MultipartParseOptions = {
    preserveBody?: boolean;
};
type ParsedFormData = {
    get: (name: string) => unknown;
    getAll: (name: string) => unknown[];
    entries: () => IterableIterator<[string, unknown]>;
    forEach: (cb: (value: unknown, key: string) => void) => void;
    [Symbol.iterator]: () => IterableIterator<[string, unknown]>;
};
type MultipartRequestLike = {
    body?: ReadableStream<Uint8Array> | null;
    headers?: {
        get: (name: string) => string | null;
    };
    formData: () => Promise<unknown>;
    clone?: () => MultipartRequestLike;
};
export declare class StoredMultipartFile {
    readonly name: string;
    readonly size: number;
    readonly type: string;
    readonly path: string;
    constructor(path: string, name: string, size: number, type: string);
    arrayBuffer(): Promise<ArrayBuffer>;
    bytes(): Promise<Uint8Array>;
    stream(): ReadableStream<Uint8Array>;
    text(): Promise<string>;
    exists(): Promise<boolean>;
    stat(): Promise<import("node:fs").Stats>;
}
export declare function parseMultipartFormData(request: MultipartRequestLike, options?: MultipartParseOptions): Promise<ParsedFormData>;
export declare function cleanupParsedMultipartFormData(request: Request): Promise<void>;
export declare function multipartValueToFilesystemFile(value: unknown): Promise<FilesystemFile | null>;
export {};
