In order to ensure that any generic type
Foo<T> is at least co-variant with respect to
T no matter how
T, TypeScript relates parameters bi-variantly (given that parameters are input positions, they naturally relate only contra-variantly). However, when source and target parameters both have function types with a single call signature, we know we are relating two callback parameters. In that case it is sufficient to only relate the parameters of the signatures co-variantly because, similar to return values, callback parameters are output positions. With this PR we introduce that change. This means that a
T is used only in callback parameter positions, will be co-variant (as opposed to bi-variant) with respect to
T, which solves a commonly reported issue.