/**
 * Type declarations for Bun's built-in modules
 * These types mirror the bun:sqlite API
 */

declare module 'bun:sqlite' {
  export class Database {
    constructor(path?: string)
    exec(sql: string): void
    prepare(sql: string): Statement
    inTransaction: boolean
    close(): void
  }

  export class Statement {
    run(...params: unknown[]): RunResult
    get(...params: unknown[]): unknown
    all(...params: unknown[]): unknown[]
    bind(...params: unknown[]): Statement
    reset(): void
  }

  export interface RunResult {
    changes: number
    lastInsertRowid: number | bigint
  }
}