node-sqlite.d.ts 639 Bytes
// Minimal ambient declaration for Node's experimental built-in `node:sqlite`
// module. @types/node does not yet ship these types, but the module is present
// at runtime in Node 22.x. We only declare what this project uses.
declare module 'node:sqlite' {
    export class DatabaseSync {
        constructor(path?: string, options?: Record<string, unknown>);
        exec(sql: string): void;
        prepare(sql: string): {
            run(...params: unknown[]): unknown;
            all(...params: unknown[]): Array<Record<string, unknown>>;
            get(...params: unknown[]): Record<string, unknown> | undefined;
        };
    }
}