title: Typescript dynamic union type of dynamic object properties
body: <p>How can I get a dynamic union type from dynamic object properties.</p>
  <pre><code>const config = {
    devices: {
      Brand1: ['model1'],
      Brand2: ['model2', 'model3'],
    },
  };
  
  export type DeviceBrand = keyof typeof config.devices; // 'Brand1' | 'Brand2'
  
  export type DeviceModel = ___________; // 'model1' | 'model2' | 'model3'
  </code></pre>
  <p>What do I need to do to make DeviceModel the union type of all the models from my brands in my object?</p>