export type DsvOptions = { delimiter?: string; array?: boolean; typed?: "auto" | boolean; }; export type DsvResult = (Record[] | any[][]) & { columns: string[]; }; export interface FileAttachment { /** The URL of the file. */ href: string; /** The name of the file (not including the path), such as "test.csv". */ name: string; /** The MIME type, such as "text/csv". */ mimeType: string; /** The time this file was most-recently modified, as milliseconds since epoch, if known. */ lastModified?: number; /** The size of this file in bytes, if known. */ size?: number; /** @deprecated use FileAttachment.href instead */ url(): Promise; /** Returns the contents of this file as a Blob. */ blob(): Promise; /** Returns the contents of this file as an ArrayBuffer. */ arrayBuffer(): Promise; /** Returns the contents of this file as a string with the given encoding. */ text(encoding?: string): Promise; /** Returns the contents of this file as JSON. */ json(): Promise; /** Returns a byte stream to the contents of this file. */ stream(): Promise>>; /** Returns the contents of this file as delimiter-separated values. */ dsv(options?: DsvOptions): Promise; /** Returns the contents of this file as comma-separated values. */ csv(options?: Omit): Promise; /** Returns the contents of this file as tab-separated values. */ tsv(options?: Omit): Promise; /** Returns the contents of this file as an image. */ image(props?: Partial): Promise; /** Returns the contents of this Arrow IPC file as an Apache Arrow table. */ arrow(): Promise; /** Returns the contents of this file as an Arquero table. */ arquero(options?: any): Promise; /** Returns the contents of this Parquet file as an Apache Arrow table. */ parquet(): Promise; /** Returns the contents of this file as an XML document. */ xml(mimeType?: DOMParserSupportedType): Promise; /** Returns the contents of this file as an HTML document. */ html(): Promise; } export declare const FileAttachment: { (name: string, base?: string): FileAttachment; prototype: FileAttachmentImpl; }; export interface FileInfo { path: string; mimeType?: string; lastModified?: number; size?: number; } export declare function requireFileRegistration(value: boolean): void; export declare function registerFile(name: string, info: FileInfo | null, base?: string | URL): FileAttachmentImpl | undefined; export declare abstract class AbstractFile implements FileAttachment { name: string; mimeType: string; lastModified: number | undefined; size: number | undefined; abstract href: string; constructor(name: string, mimeType?: string, lastModified?: number, size?: number); url(): Promise; blob(): Promise; arrayBuffer(): Promise; text(encoding?: string): Promise; json(): Promise; stream(): Promise>>; dsv({ delimiter, array, typed }?: DsvOptions): Promise; csv(options?: Omit): Promise; tsv(options?: Omit): Promise; image(props?: Partial): Promise; arrow(): Promise; arquero(options?: any): Promise; parquet(): Promise; zip(): Promise; xml(mimeType?: DOMParserSupportedType): Promise; html(): Promise; xlsx(): Promise; } declare class FileAttachmentImpl extends AbstractFile { href: string; constructor(href: string, name: string, mimeType?: string, lastModified?: number, size?: number); } type FileResolver = (name: string) => { url: string; mimeType?: string; } | string | null; export declare function fileAttachments(resolve: FileResolver): (name: string) => FileAttachment; export {};