import Option from './Option' export interface OptionState { key: string options: Array defaultValue?: string available: number } export type OptionContextState = { [index: string]: OptionState } export default class OptionContext { private stateChangeListeners = new Set() private valueChangeListeners = new Set() private _state: OptionContextState = {} private _data: { [index: string]: string } = {} private readonly _options: Array