title: Typescript: Define type for object param of arrow function
body: <p>I'm trying to define the type for object parameter in a arrow function, i'm new in typescript and i did find any exemple showing this case.
  so:</p>
  
  <pre><code>    const audioElem = Array.from(videoElem.parentNode.childNodes).find(
        (child: {tagName: string}): boolean =&gt; child.tagName === 'AUDIO',
      );
  </code></pre>
  
  <p>I'm just getting an error and that's normal but you got the idea.
  Any idea ? :)</p>
  
  <p>Error: </p>
  
  <pre><code>error TS2345: Argument of type '(child: { tagName: string; }) =&gt; boolean' is not assignable to parameter of type '(value: {}, index: number, obj: {}[]) =&gt; boolean'.
    Types of parameters 'child' and 'value' are incompatible.
      Property 'tagName' is missing in type '{}' but required in type '{ tagName: string; }'.
  
  17       (child: { tagName: string }): boolean =&gt; child.tagName === 'AUDIO',
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
    src/components/Subscriber/Subscriber.tsx:17:17
      17       (child: { tagName: string }): boolean =&gt; child.tagName === 'AUDIO',
                         ~~~~~~~
      'tagName' is declared here.
  </code></pre>