preact-missing-hooks
Version:
A lightweight, extendable collection of missing React-like hooks for Preact — plus fresh, powerful new ones designed specifically for modern Preact apps.
12 lines (11 loc) • 471 B
TypeScript
/**
* Opens IndexedDB and runs onupgradeneeded to create stores and indexes.
* Singleton per (name, version).
* @module indexedDB/openDB
*/
import type { IndexedDBConfig } from "./types";
/**
* Opens the database and creates/upgrades object stores and indexes from config.
* Uses a singleton cache per (name, version); repeated calls with the same config reuse the same connection.
*/
export declare function openDB(config: IndexedDBConfig): Promise<IDBDatabase>;