title: How to fix "Initializer provides no value for this binding element and the binding element has no default value." in TypeScript?
body: <p>I am migrating Apollo GraphQL API project written in JavaScript to TypeScript. And I am having an error at finding a user code block, saying that <code>var idArg: any
  Initializer provides no value for this binding element and the binding element has no default value.ts(2525)</code></p>
  
  <pre><code>  async findOne({ id: idArg } = {}) {
       // Red line here ^^^^^
      const user = await this.knex('users')
        .where('id', idArg)
        .first();
  
      if (!user) return;
      return user;
    }
  </code></pre>
  
  <p>Currently I added <code>any</code> to it without really knowing the actual solution, and the warning is gone.</p>
  
  <pre><code>  async findOne({ id: idArg }: any = {}) {
      const user = await this.knex('users')
        .where('id', idArg)
        .first();
  
      if (!user) return;
      return user;
    }
  </code></pre>
  
  <p>However I'd still like to know the actual solution. Should I add <code>number</code> type instead of <code>any</code>? But when I do that, error is <code>Type '{}' is not assignable to type 'number'.ts(2322)</code>.</p>
  
  <p>Please help.</p>