Use a type for labs

This commit is contained in:
Travis Ralston 2020-07-30 08:44:34 -06:00
parent 1aaedb527d
commit 4cf6b7174b

View file

@ -85,6 +85,8 @@ interface IHandlerMap {
[level: SettingLevel]: SettingsHandler;
}
export type LabsFeatureState = "labs" | "disable" | "enable" | string;
/**
* Controls and manages application settings by providing varying levels at which the
* setting value may be specified. The levels are then used to determine what the setting
@ -610,7 +612,7 @@ export default class SettingsStore {
return handlers;
}
private static getFeatureState(settingName: string): "labs" | "disable" | "enable" | string {
private static getFeatureState(settingName: string): LabsFeatureState {
const featuresConfig = SdkConfig.get()['features'];
const enableLabs = SdkConfig.get()['enableLabs']; // we'll honour the old flag