title: TypeScript: How to set type of destructured object?
body: <p><strong>Problem</strong></p>
  
  <p>For example, the parameter has the following type <code>{ component: any; element: ElementRef; }</code>, of which I only want the element:</p>
  
  <pre><code>onTextBoxInit({ element }) { }
  </code></pre>
  
  <p><strong>Question:</strong> How can I set the type of this destructured element?</p>
  
  <p><strong>Tried</strong></p>
  
  <p>I thought of something like this: <code>onTextBoxInit({ element: ElementRef }) { }</code>, however this is not working.</p>