title: Types of parameters '__0' and 'value' are incompatible - Typescript
body: <p>I'm not a typescript expert and I am stuck trying to figure out the following error:</p>
  <blockquote>
  <p>Argument of type '({ keys, fire }: { keys?: any; fire: any; }) =&gt; void' is not assignable to parameter of type '(value: unknown, value2: unknown, set: Set) =&gt; void'.
  Types of parameters '__0' and 'value' are incompatible.
  Type 'unknown' is not assignable to type '{ keys?: any; fire: any; }'.</p>
  </blockquote>
  <p>The block of code is:</p>
  <pre><code>listeners.forEach(({ keys, fire }: {keys?: any; fire: any}) =&gt; {
    //some code
  });
  </code></pre>
  <p>Listeners is a set like:</p>
  <pre><code>const listeners = new Set();
  </code></pre>
  <p>and I am pushing an object into it like so:</p>
  <pre><code>const create = (keys) =&gt; {
    //keys can be undefined
    const listener = {
      keys,
      fire: useState()[1],
    };
    listeners.add(listener)
  }
  </code></pre>
  <p>If I remove the fire or the keys from the forEach I still get the same error and I can't figure out why this is happening.</p>