legal-markdown-js
Version:
Node.js implementation of LegalMarkdown for processing legal documents with markdown and YAML - Complete feature parity with Ruby version
47 lines • 1.4 kB
TypeScript
import { LegalMdConfig } from './schema.js';
export declare const SEARCH_PLACES: string[];
/**
* Load and cache Legal Markdown configuration.
*
* Reads default config, optional global config, and project config using cosmiconfig,
* then validates and caches the merged result.
*
* @returns Promise resolving to validated runtime configuration.
* @throws {Error} When discovered configuration fails schema validation.
* @example
* ```ts
* import { loadConfig } from './config.js';
*
* const config = await loadConfig();
* console.log(config.processing.validationMode);
* ```
*/
export declare function loadConfig(): Promise<LegalMdConfig>;
/**
* Return the current runtime config (cached if loaded).
*
* @returns The active Legal Markdown configuration object.
* @example
* ```ts
* import { getConfig } from './config.js';
*
* const config = getConfig();
* console.log(config.paths.output);
* ```
*/
export declare function getConfig(): LegalMdConfig;
/**
* Clear loaded configuration cache and reset runtime config to defaults.
*
* @example
* ```ts
* import { clearConfigCache, loadConfig } from './config.js';
*
* clearConfigCache();
* await loadConfig();
* ```
*/
export declare function clearConfigCache(): void;
export type { LegalMdConfig } from './schema.js';
export { DEFAULT_CONFIG, validateConfig } from './schema.js';
//# sourceMappingURL=index.d.ts.map