title: Vue 3 + Typescript emit function "No overload matches this call" even if the function name is defined. It looks like order matters
body: <p>I found a weird error message in Vue 3 emit function when i use it with TypeScript.
  example code to reproduce:</p>
  <pre><code>export default defineComponent({
    emits: {
      emit1: (payload: number) =&gt; payload,
      emit2: (payload: string) =&gt; payload
    },
    methods: {
     ...
    }
  }
  </code></pre>
  <p>when i try to call the emit1 like the following, it compiles without an error:
  <code>this.$emit(&quot;emit1&quot;, 1);</code></p>
  <p>but if i do the following there is weird error:
  <code>this.$emit(&quot;emit1&quot;, &quot;test&quot;);</code></p>
  <pre><code>TS2769: No overload matches this call.
    The last overload gave the following error.
      Argument of type '&quot;emit1&quot;' is not assignable to parameter of type '&quot;emit2&quot;'.
  </code></pre>
  <p>if i change the order of the emit functions like so:</p>
  <pre><code>export default defineComponent({
    emits: {
      emit2: (payload: string) =&gt; payload,
      emit1: (payload: number) =&gt; payload
    },
    methods: {
     ...
    }
  }
  </code></pre>
  <p>Of course also a error appears, but this one make more sense at least:</p>
  <pre><code>TS2769: No overload matches this call.
    The last overload gave the following error.
      Argument of type 'boolean' is not assignable to parameter of type 'number'.
  </code></pre>
  <p>since the function name is defined in both cases the error message #1 makes no sense but #2 does.</p>
  <p>My Questions:</p>
  <ul>
  <li>why does the order of the functions has an impact on the error message?</li>
  <li>should / can this be fixed in vue so that the error makes sense in both cases? Mybe this is also a issue with TypeScript itself?</li>
  </ul>