title: TypeScript - specify type while object destructuring with alias
body: <p>He everybody, I'm refactoring an NodeJS app to TypeScript. And I was making always object destructuring and also for the code block below I'm making and alias while object destructuring as you see. And how can I specify type here?</p>
  
  <pre><code>const {length: isRegistered}  = await User.countDocuments({email: emailTo});
  </code></pre>