| export enum KillSwitchType { |
| Experiment = 'experiment', |
| Deprecated = 'deprecated', |
| InternalKillSwitch = 'internalKillSwitch', |
| export enum OptionContext { |
| Experiments = 'experiments', |
| Deprecated = 'deprecated', |
| export interface OptionConfig<T> { |
| killSwitchType: KillSwitchType; |
| optionalPermissions?: string[]; |
| export class Option<T> implements OptionConfig<T> { |
| public context: OptionContext; |
| public killSwitchType: KillSwitchType; |
| public optionalPermissions: string[]; |
| constructor(config: OptionConfig<T>) { |
| this.codename = config.codename; |
| this.context = config.context; |
| this.defaultValue = config.defaultValue; |
| this.killSwitchType = config.killSwitchType; |
| this.optionalPermissions = config.optionalPermissions ?? []; |