import { Transaction } from './component/transaction.js'; import { Database } from './component/database.js'; export type MigrationVersion = number; export interface MigrationInterface { version: MigrationVersion; migration: (migrationCtx: { db: Database; transaction: Transaction; dbOldVersion: number; dbNewVersion: number; migrationVersion: MigrationVersion; }) => Promise; } export type OnBlocked = (ctx: { oldVersion: number; newVersion: number; }) => Promise; export declare class DatabaseFactory { private static _factory; private static readonly factory; static cmp(a: T, b: T): number; static databases(): Promise; static deleteDatabase(name: string): Promise; static open(name: string, version?: number, migrations?: MigrationInterface[], onBlocked?: OnBlocked): Promise; }