Use a type for labs

pull/21833/head
Travis Ralston 2020-07-30 08:44:34 -06:00
parent 1aaedb527d
commit 4cf6b7174b
1 changed files with 3 additions and 1 deletions

View File

@ -85,6 +85,8 @@ interface IHandlerMap {
[level: SettingLevel]: SettingsHandler; [level: SettingLevel]: SettingsHandler;
} }
export type LabsFeatureState = "labs" | "disable" | "enable" | string;
/** /**
* Controls and manages application settings by providing varying levels at which the * 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 * 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; return handlers;
} }
private static getFeatureState(settingName: string): "labs" | "disable" | "enable" | string { private static getFeatureState(settingName: string): LabsFeatureState {
const featuresConfig = SdkConfig.get()['features']; const featuresConfig = SdkConfig.get()['features'];
const enableLabs = SdkConfig.get()['enableLabs']; // we'll honour the old flag const enableLabs = SdkConfig.get()['enableLabs']; // we'll honour the old flag