/** * Override the default path to load configure files from. * Setting a new path will clear all files loaded before. Reload callbacks will no longer work as well. * @param filePath - Set configuration file loading path. Set to default if it's undefined. * @API */ declare function from(filePath?: string): void; /** * Internal API. Not public. */ declare function removeWatchers(): void; /** * Register a callback which will be called when the file is reloaded. */ declare function register(name: string, onReloaded: () => void): void; export interface Option { /** The default value when configuration item is undefined. */ default?: any; /** * Return `undefined` when the configuration item is undefined and has no default value. * @default `false`. */ undefinable?: boolean; } /** * Get a property or sub tree of properties from configure file. * Configure file will be loaded if it hasn't been load before. * @param file [optional] * @param property * @param options [optional] * @return property value * @API */ declare function get(property: string, options?: Option): any; declare function get(file: string, property: string, options?: Option): any; /** * Get the whole property tree from a configure file. * Configure file will be loaded if it hasn't been load before. * @param file * @return property values * @deprecated Usually you don't need to use `getAll`, use `get` instead. */ declare function getAll(file: string): any; /** * Checks if a configuration can be found in the configuration path * @param {String} name - the name of configuration, may contain relative path, extension is optional. * @return true if file exists, false it doesn't */ declare function exists(name: string): boolean; declare const _default: { get: typeof get; getAll: typeof getAll; from: typeof from; register: typeof register; exists: typeof exists; removeWatchers: typeof removeWatchers; }; export default _default;