title: Typescript and destructuring array
body: <p>I have this problem with typescript and can not understand what is wrong:</p>
  <pre><code>type Dogs = {bark: true};
  type Cats = {meow: true};
  
  ........
  .then((data: [Dogs, Cats][]) =&gt; {
    const [dogs, cats] = data;
    display(dogs, cats));
  })
  ........
  
  const display = (dogs: any, cats: any) =&gt; {
    return ....
  }
  </code></pre>
  <p>For now, everything is ok. When <em>display</em> function is written like this (dogs: any, cats: any) everything is fine, but if I change <em>display</em> function to:</p>
  <pre><code>const display = (dogs: Dogs, cats: Cats) =&gt; {
    return ....
  }
  </code></pre>
  <p>I receive an error in destructuring line (const [dogs, cats] = data;) that &quot;dogs doesn't have meow key and cats doesn't have bark key&quot;???</p>
  <p>What I'm doing wrong?</p>