import {Database, Statement} from "sqlite"; export async function init(): Promise {} export class MockStatement implements Statement { constructor() {} readonly changes: number = 0; readonly lastID: number = 0; readonly sql: string = ""; async all(): Promise; async all(...params: any[]): Promise; async all(): Promise; async all(...params: any[]): Promise; all(...params: any[]): any { } async bind(): Promise; async bind(...params: any[]): Promise; async bind(...params: any[]): Promise { return mockStatement(); } async each(callback?: (err: Error, row: any) => void): Promise; async each(...params: any[]): Promise; async each(...callback: (((err: Error, row: any) => void) | any)[]): Promise { return 0; } async finalize(): Promise {} get(): Promise; get(...params: any[]): Promise; get(): Promise; get(...params: any[]): Promise; get(...params: any[]): any { } async reset(): Promise { return mockStatement(); } async run(): Promise; async run(...params: any[]): Promise; async run(...params: any[]): Promise { return mockStatement(); } } function mockStatement(): Statement { return new MockStatement(); } export class MockDatabase implements Database { constructor() {} async close(): Promise {} async run(...args: any): Promise { return mockStatement(); } async get(...args: any): Promise {} async all(...args: any): Promise { return []; } async exec(...args: any): Promise { return this; } async each(...args: any): Promise { return 0; } async prepare(...args: any): Promise { return mockStatement(); } configure(...args: any): void {} async migrate(...args: any): Promise { return this; } on(...args: any): void {} } export const db: MockDatabase = new MockDatabase(); export {Database, Statement}