title: What does the [type] mean in typescript/flow?
body: <p>I've recently stumbled upon an old code of mine, I noticed I had incorrect typing there.</p>
  
  <pre><code>interface OptionType {
     label: string,
     value: OptionValueType
  }
  
  interface Props {
    options: [OptionType] // &lt; this is wrong
  }
  </code></pre>
  
  <p>Now obviously, this should have been <code>OptionType[]</code> or <code>Array&lt;OptionType&gt;</code>, but curiously enough, the code here, at least according to both linter (<a href="/questions/tagged/eslint" class="post-tag" title="show questions tagged &#39;eslint&#39;" rel="tag">eslint</a>) and compiler is valid syntax.</p>
  
  <p><strong>So, what exactly does <code>[OptionType]</code> represent?</strong></p>
  
  <p><em>My best guess would be an index/element of an array, akin to destructuring, but that feels odd as there's no original array reference in the syntax</em></p>