title: Argument of type '(prev: Phone[]) => Phone[]' is not assignable to parameter of type 'Phone[]'
body: <p>So I' m using useState with callback as an argument: <code>setLikedGadgets((prev: Phone[]) =&gt; [...prev, info]);</code></p>
  <p>but I recieve errors:</p>
  <p><code>Argument of type '(prev: Phone[]) =&gt; Phone[]' is not assignable to parameter of type 'Phone[]'. Type '(prev: Phone[]) =&gt; Phone[]' is missing the following properties from type 'Phone[]': pop, push, concat, join, and 28 more.</code></p>
  <p>on the other hand , if I use instead of <code>prev</code> code:  <code>setLikedGadgets([...likedGadgets, info]);</code>
  it all works.
  But how to make it work in typescript in normal way?</p>
  <pre class="lang-js prettyprint-override"><code>import { useContext } from 'react';
  import { likedContext } from '../context/LikedContext';
  import { Phone } from '../types/Phone';
  
  export const useLikes = () =&gt; {
    const {
      likedGadgets
      arrayOfLiked,
      setLikedGadgets,
      setArrayOfLiked,
    }
      = useContext(likedContext);
  
    const addToLiked = (info: Phone) =&gt; {
      if (arrayOfLiked.includes(info.id)) {
        return;
      }
  
      if (arrayOfLiked.length === 0) {
        setLikedGadgets([info]);
        setArrayOfLiked([info.id]);
      } else {
        setLikedGadgets((prev: Phone[]) =&gt; [...prev, info]);
      }
    };
  
    return { addToLiked };
  };
  </code></pre>
  <p>by the way , type of <code>setLikedGadgets</code> is <code>(value: Phone[]) =&gt; void</code></p>
  <p>which I cannot change , because, thats how I defined it during createContext() initialization.</p>
  <pre><code>type LikedContextInterface = {
    likedGadgets: Phone[];
    setLikedGadgets: (value: Phone[]) =&gt; void;
    arrayOfLiked: string[];
    setArrayOfLiked: (value: string[]) =&gt; void;
  };
  </code></pre>