declare type Map = { [K]: V }; declare type Topic = { state: string, command: string, value: any, values: Map, parseState?: (msg: Object) => any }; declare type Topics = Map; declare type ControlUI = { type: "toggle", text: string, topic: string }; declare type Control = { name: string, position: Array, icon: string, ui: Array }; declare type Controls = Map; declare type Config = { topics: Topics, controls: Controls }; declare type State = { mqtt: ?any, ui: ?string, values: Map };