title: Property 'map' does not exist on type Object
body: <pre><code>type MyStructure = Object[] | Object;
  
  const myStructure: MyStructure = [{ foo: "bar" }];
  
  myStructure.map(); // Property 'map' does not exist on type 'MyStructure'. any
  </code></pre>
  
  <p>The library either delivers an object or an array of this object. How can I type this?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>And how can I access properties like <code>myStructure["foo"]</code> in case of <code>myStructure</code> will be an object?</p>