title: Why can an Array not be used in useState where the generic is of the same type as the array
body: <p>I have defined a data type </p>
  
  <pre><code>interface IOptions {
    name: string
    value: any
    type: string
  }
  </code></pre>
  
  <p>And created an array of that type</p>
  
  <pre><code>let myTableData: IOptions[] = [
      {name: "A string", value: "string to display", type: "string"},
      {name: "A number", value: 42, type: "number"},
      {name: "A combobox Enum style", value: "1", type: "enum"},
      {name: "A bool flag", value: true, type: "bool"},
  ];
  </code></pre>
  
  <p>NowI want to define a state which uses this data type and is typed</p>
  
  <pre><code>let [state, setState] = React.useState&lt;IOptions[]&gt;({
    myTableData
  });
  </code></pre>
  
  <p>However this gives me the error message</p>
  
  <blockquote>
    <p>Argument of type '{ myTableData: IOptions[]; }' is not assignable to parameter of type 'IOptions[] | (() => IOptions[])'.
      Object literal may only specify known properties, and 'myTableData' does not exist in type 'IOptions[] | (() => IOptions[])'.ts(2345)</p>
  </blockquote>
  
  <p>Why is that? How can i fix this? </p>