Repository: TypeScript
Issue: `void` parameter type produced from generic inference doesn't allow skipping as argument
Labels: Bug

<!--
Please try to reproduce the issue with the latest published version. It may have already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly
-->
**TypeScript Version:**  3.7.2, 3.9.6, 4.0.0-beta

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** overload, void, indexed void, implicit void

**Code**

```ts
class Hooks<TMap extends Record<string, any>> { 
    one(a: keyof TMap, b: void) { }
    two<K extends keyof TMap>(a: K, b: TMap[K]) { }
}
const h = new Hooks<{foo: void}>()
h.one('foo'); // OK
h.two('foo'); // Expected 2 arguments, but got 1.(2554)
```


**Expected behavior:** both methods can be called with only one argument

**Actual behavior:** `TMap[K]` that is resolved to `void` does not allow skip argument

Although, this one works as expected:

```ts
// v1 works
interface EvtMap {
    one: string;
    two: void;
}

const createMethod = <N extends keyof EvtMap>(eventName: N) =>
    (ctx: EvtMap[N]) => null;

createMethod('one')('');
createMethod('two')();

// v2 fails
interface EvtMap {
    one: string;
    two: void;
}

const createMethod = <EvtMap>() =>
    <N extends keyof EvtMap>(eventName: N, ctx: EvtMap[N]) => null;

createMethod<EvtMap>()('one', '');
createMethod<EvtMap>()('two');

// generic method fails
interface TMap { 
    foo: void
}
class Hooks { 
    one(a: keyof TMap, b: void) { }
    two<K extends keyof TMap>(a: K, b: TMap[K]) { }
}
const h = new Hooks()
h.one('foo'); // OK
h.two('foo'); // Expected 2 arguments, but got 1.(2554)
```

**Playground Link:** 
- [generic class](https://www.typescriptlang.org/play/?target=1&ts=4.0.0-beta#code/MYGwhgzhAEASD28DWEA8AVAsmADtApgB4Au+AdgCYwBK+w8AThahMQwJZkDmANNGGQCeAPmHQA3tACwAKGjzo8MvgAUYAFzQk+QfABm0LLj4AjTQDd47CgEoJ0AL6yF0YgHd4qANIES5Klo6+obYOMJqml6mmkY4ANpeALp2kk4yabL0ZKzQABbQALzQym5wiCioknqIFlYUjuE2srK5AHRKqgDk1fCdNgDcLa3u8CrdiH39QA) fails

- [generic method](https://www.typescriptlang.org/play/?target=1&ts=4.0.0-beta&ssl=4&ssc=12&pln=4&pc=46#code/JYOwLgpgTgZghgYwgAgCoFk4AdkG9kCwAUMqcjAPYUBcyAbhcACbEC+xCANnAM4-IAJKgGt++YmWQUQEABRxawiAE8KMNJiwAaZACNaDZgEo8ydiTJgA7hQA8AaWQQAHpBBN+S1eozYAfPK09jr6GtgA2vYAuib45uYI0jxgyAAWyAC8yDJWgiI8skbEqQB00nIA5JQUFUYA3MgA9I3IAPL2xSXWFLJVVLUNzcgAos5YEAiQTMgATMhwUADmAK4AthDgPCHLKYsUKQCMJbIzAKynACxGQA) fails

- [Creator function v1](https://www.typescriptlang.org/play/?target=1&ts=4.0.0-beta#code/JYOwLgpgTgZghgYwgAgKIDcwFk4AdkDeAsAFDLnID2IEAXMgM5hSgDmA3KRcmAO6X10lYABNOJAL6lSCak2QIoEOJCwQwAC0ojkAXmQAeAHLIIAD0ggRDZAGsIAT0ow0mHLgB8ACgjoI4IzgAWzpkIwBKPQ8uCi8EMDN6DGw8AG0jAF1I3Q9kEABXABtC8RklFQg1TW0vAHJqCFrwuqbxRWVVdS0ROr5KJq9w9iA) works

- [Creator function v2](https://www.typescriptlang.org/play/index.html?ssl=10&ssc=31&pln=1&pc=1#code/JYOwLgpgTgZghgYwgAgKIDcwFk4AdkDeAsAFDLnID2IEAXMgM5hSgDmA3KRcmAO6X10lYABNOJAL6lSCak2QIoEOJCwQwAC0ojkAXmQAeDNjwA+ABQBKPaa4UDAOWQQAHpBAiGyANYQAnpQwaJg4uBYQ6BDgDnAAtnTIDgA0CmAu9MahANoOALrWuqbIIACuADZl4jJKKhBqmtpGIWZW5gDk1BBtKW1tluKKyqrqWiJNJmGtbXyUfexAA) fails

**Related Issues:** <!-- Did you find other bugs that looked similar? --> Not found

My [StackOverflow question](https://stackoverflow.com/questions/62884329/typescript-method-overloads)

Rationale for the pattern: semi-dynamic event management engine. [Example](https://www.typescriptlang.org/play/#code/MYGwhgzhAEASD28DWEA8AVAsmADtApgB4Au+AdgCYwBK+w8AThahMQwJZkDmANNGGQCeAPmHQA3tACwAKGjzoEAK4AjCMA4r8qANIES5KtCT5B8AGbQsuYQAp8AN3LEAcmAC2+AFzQdfYGAgICpgwEg+tvRkpCQ+1jgA2joAugCU0AC8Yg7w7BTpkgC+sgrQFOwQOGDEwAAWuvqklDAmZpbxdo7Obp4+ftBRMcRx2IkpBdDFMlOynKQM5qH40JiCAKJO0TDiJQog8GAUAMrEYAzD0Dl5u-L7hwBiYOwgPpL4DAyMmPhQYFzeijYnC4kxu0DuFDWlFeZWqYB8AEEPmBBAAhJTmczvUHTWSyKKsaC1TLQMj4ADucEQKFQqw2zggdlSeJktQAdMo1Bp2FpbAByCEnM7EPl8WzpLISSapADcsnZnPUmnw-IhUIoougtjAErEkgJ8BA+DZ+y42rZFDh6UKspZ7PKlWqdVVB2Op3OfNtrItFSqNVqLsO6s1kktpx8ZMpSIYKPRmPetgAjAAmADM1q9sgA9FnoPAyABaCj4dwCCiNQzQObvRbAZYWAibYgQWbRGtLFbrJvbMECdil4jsfNC84wwe9UlKdxaBh8HCfHA+Vgcbh8ByBJQApRkJBkeDksg40p9gdDsjqsf9gFkKczucLpdA1eXDdbnd7g84mbexXc3l8k9qjPEcRTFHVMj1AZ8wgQ1jVNc153gHA+DANl1xATcMzlH9VCVHkVQAsh+yA-NgzA3UpQNI0TXgM1UPHfAsNkIA)