title: Typescript error using react-cookie setCookie - Type '{ [name: string]: any; }' has no compatible call signatures.ts(2349)
body: <p>I am using react-cookie in a react application with typescript but coming into the error</p>
  
  <pre><code>Cannot invoke an expression whose type lacks a call signature. Type '{ [name: string]: any; }' has no compatible call signatures.ts(2349)
  </code></pre>
  
  <p>when using <code>setCookie</code> as </p>
  
  <pre><code>const [setCookie] = useCookies(['example']);
  const onLanguageSelect = (data: any) =&gt; {
    setCookie('example', data.value, { path: '/' });
  };
  </code></pre>
  
  <p>the error is on the <code>setCookie</code> line.</p>
  
  <p>How can I fix this error? Reading on this issue in other questions hasn't helped but if you know of a resource that can put me in the right direction, that would be great.</p>