baa-conductor


baa-conductor / packages / db / src
im_wower  ·  2026-03-22

node-shims.d.ts

 1declare module "node:fs" {
 2  export function mkdirSync(
 3    path: string,
 4    options?: {
 5      recursive?: boolean;
 6    }
 7  ): void;
 8}
 9
10declare module "node:path" {
11  export function dirname(path: string): string;
12}
13
14declare module "node:sqlite" {
15  export interface DatabaseColumnDefinition {
16    name: string;
17  }
18
19  export interface StatementRunResult {
20    changes?: number;
21    lastInsertRowid?: number | bigint;
22  }
23
24  export class StatementSync {
25    all(...params: unknown[]): unknown[];
26    columns(): DatabaseColumnDefinition[];
27    get(...params: unknown[]): unknown;
28    run(...params: unknown[]): StatementRunResult;
29    setReturnArrays(enabled: boolean): void;
30  }
31
32  export class DatabaseSync {
33    constructor(path: string);
34    close(): void;
35    exec(query: string): void;
36    prepare(query: string): StatementSync;
37  }
38}