import type { QueryExecResult, SqlValue } from "./database"; declare module "@jlongster/sql.js" { interface SQL { Database: new (path: string, options?: { filename: boolean }) => AbsurdSqlDatabase; FS: { mkdir: (path: string) => void; mount: (fs: any, options: any, path: string) => void; open: (path: string, flags: string) => any; close: (stream: any) => void; }; register_for_idb: (fs: any) => void; } interface AbsurdSqlDatabase { exec: (sql: string, params?: unknown[]) => Promise; run: ( sql: string, params?: unknown[], ) => Promise<{ changes: number; lastId?: number }>; } const initSqlJs: (options?: { locateFile?: (file: string) => string; }) => Promise; export default initSqlJs; } declare module "absurd-sql" { import type { SQL } from "@jlongster/sql.js"; export class SQLiteFS { constructor(fs: any, backend: any); } } declare module "absurd-sql/dist/indexeddb-backend" { export default class IndexedDBBackend { constructor(); } } declare module "absurd-sql/dist/indexeddb-main-thread" { export interface SQLiteOptions { filename?: string; autoLoad?: boolean; debug?: boolean; } export interface SQLiteDatabase { exec: (sql: string, params?: unknown[]) => Promise; close: () => Promise; } export function initSqlJs(options?: any): Promise; export function createDatabase(options?: SQLiteOptions): Promise; export function openDatabase(options?: SQLiteOptions): Promise; }