npm.io
1.0.4 • Published 1 year ago

@types/sqlite3-promise

Licence
MIT
Version
1.0.4
Deps
1
Size
4 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/sqlite3-promise

Summary

This package contains type definitions for sqlite3-promise (https://github.com/Aminadav/node-sqlite3-promise).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sqlite3-promise.

index.d.ts

import * as sqlite3 from "sqlite3";
export * from "sqlite3";

declare module "sqlite3" {
    interface Database {
        allAsync(sql: string): Promise<any[]>;
        closeAsync(): Promise<void>;
        eachAsync(sql: string, cb?: (this: Statement, err: Error | null, row: any) => void): Promise<number>;
        eachAsync(
            sql: string,
            params: any,
            cb?: (this: Statement, err: Error | null, row: any) => void,
        ): Promise<number>;
        execAsync(sql: string): Promise<Statement>;
        getAsync(sql: string): Promise<any>;
        runAsync(sql: string): Promise<void>;
    }
}

Additional Details

  • Last updated: Sat, 08 Feb 2025 0742 GMT
  • Dependencies: @types/sqlite3

Credits

These definitions were written by Jonathan Bredin.