import Database from 'better-sqlite3';
export declare class ReadonlyDbError extends Error {
    code: 'PROJECT_NOT_FOUND' | 'SCHEMA_OUT_OF_DATE';
    hint?: string | undefined;
    constructor(code: 'PROJECT_NOT_FOUND' | 'SCHEMA_OUT_OF_DATE', message: string, hint?: string | undefined);
}
export interface OpenDbReadonlyResult {
    handle: Database.Database;
    dbPath: string;
    close: () => void;
}
export declare function openDbReadonly(projectDir: string): OpenDbReadonlyResult;
