title: Type 'Promise<void>' is missing the following properties from type
body: <p>I am not quite understanding the following error:</p>
  <pre><code>Type 'Promise&lt;void&gt;' is missing the following properties from type 'InventoryModel[]': length, pop, push, concat, and 28 more.  TS2740
  </code></pre>
  <p>I have the following functional component:</p>
  <pre><code>import React, { useEffect, useState } from &quot;react&quot;;
  import { Grid, TextField } from &quot;@material-ui/core&quot;;
  import InventoryService from &quot;../services/Inventory&quot;;
  import InventoryModel from &quot;../Models/Inventory&quot;;
  import { isThisTypeNode } from &quot;typescript&quot;;
  
  type InventoryState = {
    inventoryItems: InventoryModel[];
  };
  
  const Inventory: React.FC = () =&gt; {
    const [inventory, setInventory] = useState&lt;Partial&lt;InventoryState&gt;&gt;({});
    useEffect(() =&gt; {
      const inventoryService = new InventoryService();
      const results = inventoryService.getByLocation().then((response) =&gt; {
        setInventory({ ...inventory, inventoryItems: response });
      });
    }, []);
    return &lt;div&gt;&lt;/div&gt;
  </code></pre>
  <p>&quot;inventoryItems&quot; is what is highlighted red in this case.</p>