import { Database as Db, Options } from "better-sqlite3"; import { SessionStore } from "./types"; interface NewDatabaseOpts { /** Filename to use for SQLite sessions. */ filename: string; /** * Better-SQLite3 new Database options. * * Remember to install the db driver `'better-sqlite3'`. * * @see {@link https://github.com/WiseLibs/better-sqlite3/blob/master/docs/api.md#new-databasepath-options Better-SQLite3 | new Database} * */ config?: Options; /** Called on fatal connection or setup errors */ onInitError?: (err: unknown) => void; } interface ExistingDatabaseOpts { /** If passed, we'll reuse this instance of Better-SQLite3 Database instead of creating our own. */ database: Db; /** Called on fatal connection or setup errors */ onInitError?: (err: unknown) => void; } /** @unstable */ export declare function SQLite(opts: NewDatabaseOpts): SessionStore; export declare function SQLite(opts: ExistingDatabaseOpts): SessionStore; export {};