import type { ICerebroConfig, ICerebroConfigParams } from './interfaces'; /** * Wrapper for resolvedConfig that provides convenience methods for checking value types and dehydration * @constructor * @param {Object} resolvedConfig - object created by building context with settings config */ export declare class CerebroConfig = Record> implements ICerebroConfig { private _resolved; private _labels; private _labelResolved; constructor(resolvedConfig: ICerebroConfigParams); /** * Gets the requested value if it is a Boolean. Returns null if the value does not exist. * Throws an error if the requested value is not a Boolean. * * @param {String} name The name of the setting that you want to value of * @return {Boolean|null} The value of the setting */ isEnabled(name: K): boolean; /** * Gets the requested value if it is not a Boolean. Returns null if the value does not exist. * Throws an error if the requested value is a Boolean. * * @param {String} name The name of the setting that you want to value of * @return {!Boolean|*} The value of the setting */ getValue(name: K): Flags[K] | null; /** * Gets the requested value if it is not a Boolean. * Throws an error if the requested value is a Boolean / empty / null / undefined. * * @param {String} name The name of the setting that you want to value of * @return {!Boolean|*} The value of the setting */ getAssertValue(name: K): Flags[K]; /** * Gets the requested value in its raw form. No checks are performed on it. * * @param {String} name The name of the setting that you want to value of * @return {*} The value of the setting */ getRawValue(name: K): Flags[K]; /** * Serializes the object to send to the client. * Intended to be used on the server. * The output of this function must be rehydrated on the client. * * @return {JSON} Map of settings to values. */ dehydrate(): string; /** * Returns the resolved configuration as an object. * NOTE: This does not deep clone the object, which means that clients could abuse this * by changing values. Doing a deep clone will obviously impact performance. * * @return {Object} The resolved config. */ getRawConfig(): Flags; /** * Gets configuration that was categorized under a specific label. * * Returns null if the label does not exist. */ getConfigForLabel(label: string): Record; /** * Gets a value from configuration that was categorized under a specific label. * * Returns null if the label or key does not exist. */ getConfigValueForLabel(label: string, key: string): any; /** * Returns an object in the form of `{ : }`. * * For settings without labels, an empty array is assigned instead. */ getLabels(): Record; }