2025-05-12 05:38:44 +09:00

82 lines
2.3 KiB
TypeScript

import Immutable from "immutable";
import PluginDependency from "./pluginDependency";
declare const Config_base: Immutable.Record.Class;
declare class Config extends Config_base {
getFile(): any;
getValues(): any;
/**
* Return minimum version of configuration,
* Basically it returns the current config minus the default one
* @return {Map}
*/
toReducedVersion(): any;
/**
* Render config as text
* @return {Promise<String>}
*/
toText(): string;
/**
* Change the file for the configuration
* @param {File} file
* @return {Config}
*/
setFile(file: any): Immutable.Map<string, any>;
/**
* Return a configuration value by its key path
*/
getValue(keyPath: string | string[], def?: any): any;
/**
* Update a configuration value
* @return {Config}
*/
setValue(keyPath: string | string[], value: any): Config;
/**
* Return a list of plugin dependencies
* @return {List<PluginDependency>}
*/
getPluginDependencies(): Immutable.Iterable<number, PluginDependency>;
/**
* Return a plugin dependency by its name
* @param {string} name
* @return {PluginDependency}
*/
getPluginDependency(name: string): PluginDependency;
/**
* Update the list of plugins dependencies
* @param {List<PluginDependency>}
* @return {Config}
*/
setPluginDependencies(deps: any): Config;
/**
* Update values for an existing configuration
* @param {Object} values
* @returns {Config}
*/
updateValues(values: any): Immutable.Map<string, any>;
/**
* Update values for an existing configuration
* @param {Config} config
* @param {Object} values
* @returns {Config}
*/
mergeValues(values: any): Immutable.Map<string, any>;
/**
* Create a new config for a file
* @param {File} file
* @param {Object} values
* @returns {Config}
*/
static create(file: any, values: any): Config;
/**
* Create a new config
* @param {Object} values
* @returns {Config}
*/
static createWithValues(values: any): Config;
/**
* Convert a keyPath to an array of keys
*/
static keyToKeyPath(keyPath: string | string[]): string[];
}
export default Config;
//# sourceMappingURL=config.d.ts.map