@mdfriday/foundry
Version:
The core engine of MDFriday. Convert Markdown and shortcodes into fully themed static sites – Hugo-style, powered by TypeScript.
26 lines (25 loc) • 1.02 kB
TypeScript
import { Provider } from '../type';
export declare class DefaultConfigProvider implements Provider {
private root;
private keyCache;
constructor(params?: Record<string, any>);
private prepareParams;
private getNestedKeyAndMap;
getString(key: string): string;
getInt(key: string): number;
getBool(key: string): boolean;
getParams(key: string): Record<string, any>;
getStringMap(key: string): Record<string, any>;
getStringMapString(key: string): Record<string, string>;
getStringSlice(key: string): string[];
get(key: string): any;
set(key: string, value: any): void;
keys(): string[];
merge(key: string, value: any): void;
setDefaults(params: Record<string, any>): void;
setDefaultMergeStrategy(): void;
walkParams(walkFn: (params: Record<string, any>) => boolean): void;
isSet(key: string): boolean;
}
export declare function newFromParams(params: Record<string, any>): Provider;
export declare function newDefaultProvider(): Provider;