/** * config-loader.ts * * Hardcoded configuration loader for OptiPrune. * * Resolution order (first match wins): * 1. optiprune.json – plain JSON * 2. optiprune.jsonc – JSON with // and /* … *\/ comments + trailing commas * 3. optiprune.config.ts – TypeScript ESM default export * 4. optiprune.config.js – JavaScript ESM default export * 5. optiprune.config.mjs – JavaScript ESM default export * 6. package.json "optiprune" field * * All sources are normalised through `mergeConfig` so the rest of the * codebase only ever sees a fully-resolved `ResolvedOptions` object. */ import type { Config, ResolvedOptions } from "./types.js"; export declare const DEFAULT_CONFIG: ResolvedOptions; /** * Load user configuration from the project root. * * The function is intentionally synchronous-first for JSON/JSONC sources so * that the config is available as early as possible in the analysis pipeline. * TypeScript/JS config files are loaded via jiti. */ export declare function loadConfig(rootDir: string): Promise; /** * Merge a base `ResolvedOptions` with a user-supplied `Config`. */ export declare function mergeConfig(base: ResolvedOptions, userConfig: Config): ResolvedOptions;