Skip to content

Commit

Permalink
Add auto-generated type definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
giovannibenussi committed Jun 12, 2024
1 parent d79e397 commit a25f48d
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 0 deletions.
58 changes: 58 additions & 0 deletions types/promise.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
export = Database;
/**
* Database represents a connection that can prepare and execute SQL statements.
*/
declare class Database {
/**
* Creates a new database connection. If the database file pointed to by `path` does not exists, it will be created.
*
* @constructor
* @param {string} path - Path to the database file.
*/
constructor(path: string, opts: any);
db: any;
memory: boolean;
readonly: boolean;
name: string;
open: boolean;
sync(): void;
/**
* Prepares a SQL statement for execution.
*
* @param {string} sql - The SQL statement string to prepare.
*/
prepare(sql: string): any;
/**
* Returns a function that executes the given function in a transaction.
*
* @param {function} fn - The function to wrap in a transaction.
*/
transaction(fn: Function): (...bindParameters: any[]) => Promise<any>;
pragma(source: any, options: any): any;
backup(filename: any, options: any): void;
serialize(options: any): void;
function(name: any, options: any, fn: any): void;
aggregate(name: any, options: any): void;
table(name: any, factory: any): void;
loadExtension(...args: any[]): void;
/**
* Executes a SQL statement.
*
* @param {string} sql - The SQL statement string to execute.
*/
exec(sql: string): any;
/**
* Closes the database connection.
*/
close(): void;
/**
* Toggle 64-bit integer support.
*/
defaultSafeIntegers(toggle: any): this;
unsafeMode(...args: any[]): void;
}
declare namespace Database {
export { SqliteError };
}
import SqliteError = require("./sqlite-error");
//# sourceMappingURL=promise.d.ts.map
1 change: 1 addition & 0 deletions types/promise.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions types/sqlite-error.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export = SqliteError;
declare function SqliteError(message: any, code: any, rawCode: any): SqliteError;
declare class SqliteError {
constructor(message: any, code: any, rawCode: any);
code: string;
rawCode: any;
name: string;
}
//# sourceMappingURL=sqlite-error.d.ts.map
1 change: 1 addition & 0 deletions types/sqlite-error.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a25f48d

Please sign in to comment.