UNPKG

@kitschpatrol/mdat-config

Version:
45 lines (44 loc) 1.52 kB
import { Config, Config as MdatConfig } from "mdat"; //#region src/config.d.ts declare const sharedMdatConfig: Config; /** * **@Kitschpatrol's Shared Mdat Configuration** * * @example * export default mdatConfig({ * test: '**This is a test rule.**', * }) * * @see [@kitschpatrol/mdat-config](https://github.com/kitschpatrol/shared-config/tree/main/packages/mdat-config) * @see [@kitschpatrol/shared-config](https://github.com/kitschpatrol/shared-config) */ declare function mdatConfig(config?: Config): Config; //#endregion //#region src/api.d.ts /** * Expand Mdat comment placeholders in a Markdown string using the shared * configuration. * * @param source - The Markdown source string. * @param config - Optional `MdatConfig` overrides merged on top of the shared * config. * * @returns The expanded Markdown string. */ declare function fix(source: string, config?: MdatConfig): Promise<string>; /** * Expand Mdat comment placeholders in a Markdown file in place using the shared * configuration. * * @param filePath - Path to the Markdown file. * @param config - Optional `MdatConfig` overrides merged on top of the shared * config. */ declare function fixFile(filePath: string, config?: MdatConfig): Promise<void>; /** * Clear the cached Mdat module. Subsequent calls to `fix` or `fixFile` will * re-import Mdat. */ declare function clearCache(): void; //#endregion export { type MdatConfig, clearCache, sharedMdatConfig as default, sharedMdatConfig, fix, fixFile, mdatConfig };