export interface Options { /** * Timeout for SQL operations (must take HTTP transfers into account) * @default 30000 */ timeout?: number; /** * Maximum supported page size * @default 4096 */ maxPageSize?: number; /** * Cache size in Kb * @default 4096 */ cacheSize?: number; /** * Optional custom headers to be used when requesting data */ headers?: Record; /** * Force the type of backend */ backendType?: 'sync' | 'shared'; } export declare const defaultOptions: { timeout: number; maxPageSize: number; cacheSize: number; headers: Record; }; export interface BackendChannel { port: MessagePort; shm: SharedArrayBuffer; } export interface Backend { /** * The backend type */ type: 'shared' | 'sync'; /** * @private */ worker: Worker | null; /** * @private */ createNewChannel: () => Promise; /** * Close the HTTP backend waiting for clean shutdown */ close: () => Promise; /** * Synchronously kill the HTTP backend */ terminate: () => void; /** * The options object */ options?: Options; } export type Operation = 'xOpen' | 'xAccess' | 'xRead' | 'xFilesize'; export interface Message { msg: Operation; url: string; offset?: bigint; n?: number; [key: string]: string | number | bigint | undefined; } export declare const debugSys: readonly ["threads", "vfs", "cache", "http"]; export declare const debug: Record<"http" | "threads" | "vfs" | "cache", (...args: unknown[]) => void>;