blob: 2e6415651af89e5d8d0b4edcef282504e8e045e2 [file] [log] [blame]
import { OptionsConfiguration } from '../../common/options/OptionsConfiguration';
import {
OptionCodename,
OptionsValues,
} from '../../common/options/optionsPrototype';
export interface OptionsProviderPort {
/**
* Returns the value of option |option|.
*/
getOptionValue<O extends OptionCodename>(
option: O,
): Promise<OptionsValues[O]>;
/**
* Returns whether |feature| is enabled.
*/
isEnabled(option: OptionCodename): Promise<boolean>;
getOptionsValues(): Promise<OptionsValues>;
/**
* Adds a listener for changes in the options configuration.
*/
addListener(listener: OptionsChangeListener): void;
}
export type OptionsChangeListener = (
previousOptionValues: OptionsConfiguration,
currentOptionValues: OptionsConfiguration,
) => void;