With the `strictFunctionTypes` setting turned on, function parameters are checked contravariantly.
interface Func<T> {
(p: T): unknown
}
declare let b: Func<{p1: string}>
declare let c: Func<{p2: number}>
declare let d: Func<{p3: number, x: boolean, x1: number}>
// e, f, g... like before
let a: Func<U> // What should U be to make all cases assignable to a?
a = b
a = c
a = d
The variable a
should be assignable to all possible cases in the form of Func<{x: 1, y: string}>
. There are infinitely many valid values, with any
being one option for U
. Is there a more constrained value?