title: How to initialise state with useState hook and Typescript
body: <p>State will be updated using the <code>useState</code> hook with an array of objects at some point in the future which has an interface that looks like this:</p>
  <pre class="lang-js prettyprint-override"><code>export interface DataSource {
    dataPiont: Array&lt;DataPoint&gt;;
  }
  
  export interface DataPoint {
    [key: string]: string | number;
  }
  </code></pre>
  <p>I have the hook set up where I have to initialise state:</p>
  <pre class="lang-js prettyprint-override"><code>const [fetchedData, setFetchedData] = useState&lt;DataSource&gt;([{ key: '' }]);
  </code></pre>
  <p>But I am getting the Typescript error <code>&quot;Argument of type '{ key: string; }[]' is not assignable to parameter of type 'DataSource | (() =&gt; DataSource)'.</code></p>
  <p>I don't want to add <code>null</code> or <code>undefined</code> or <code>[]</code> to my interface as I have to use it throughout the application.</p>
  <p>How can I successfully initialise state in this instance?</p>