UNPKG

@chix/config

Version:

Configuration File Handler

26 lines (25 loc) 865 B
import { PropertyPath } from 'lodash'; export declare type ConfigOptions = { configFile: string; }; export declare type ChixConfig<T> = { version: string; env?: T; access_token?: string; }; export declare class Config<Configuration> { static readonly globalConfigDir: string; static readonly globalConfigFile: string; static hasGlobalConfigFile(): boolean; static createGlobalConfigFile(): void; static writeGlobalConfig<Configuration>(config: ChixConfig<Configuration>): void; static write<Configuration>(path: string, config: ChixConfig<Configuration>): void; path: string; config: ChixConfig<Configuration>; constructor(options?: ConfigOptions); set(path: PropertyPath, value: any): void; get(path: PropertyPath): any; has(path: PropertyPath): boolean; write(): void; private readConfig; }