export interface BetterSqlite3RuntimeInfo {
    nodeVersion: string;
    nodeMajor: number | null;
    abi: string;
    platform: NodeJS.Platform;
    arch: string;
    isBun: boolean;
}
export interface BetterSqlite3ValidationOptions {
    context: string;
    loadModule?: () => Promise<{
        default: new (path: string) => BetterSqlite3DatabaseLike;
    }>;
}
interface BetterSqlite3DatabaseLike {
    pragma(sql: string): unknown;
    close(): void;
}
export declare function getBetterSqlite3RuntimeInfo(): BetterSqlite3RuntimeInfo;
export declare function buildBetterSqlite3ValidationMessage(cause: unknown, info: BetterSqlite3RuntimeInfo, context: string): string;
/**
 * Detect whether an error is caused by a missing or incompatible better-sqlite3
 * native binding (.node file) rather than a normal SQLite operational error.
 *
 * Common patterns:
 * - "Could not locate the bindings file" (node-gyp / node-bindings)
 * - "better_sqlite3.node" in the message (missing prebuilt)
 * - "MODULE_NOT_FOUND" code (Node can't resolve the addon)
 * - "was compiled against a different Node.js version" (ABI mismatch)
 * - "A dynamic link library (DLL) initialization routine failed" (Windows ABI issue)
 * - "isexe" / "which.js" (bun node-gyp compatibility issues)
 */
export declare function isBetterSqlite3NativeError(error: unknown): boolean;
/**
 * If the given error is a native binding error, throw a user-friendly error
 * with actionable fix steps. Otherwise re-throw the original error.
 */
export declare function throwIfNativeBindingError(error: unknown, context: string): void;
export declare function validateBetterSqlite3NativeBinding(options: BetterSqlite3ValidationOptions): Promise<void>;
export {};
