=== tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignatures2.ts ===
// checking subtype relations for function types as it relates to contextual signature instantiation
class Base { foo: string; }
>Base : Base
>foo : string
class Derived extends Base { bar: string; }
>Derived : Derived
>Base : Base
>bar : string
class Derived2 extends Derived { baz: string; }
>Derived2 : Derived2
>Derived : Derived
>baz : string
class OtherDerived extends Base { bing: string; }
>OtherDerived : OtherDerived
>Base : Base
>bing : string
declare function foo1(a: (x: number) => number[]): typeof a;
>foo1 : { (a: (x: number) => number[]): (x: number) => number[]; (a: any): any; }
>a : (x: number) => number[]
>x : number
>a : (x: number) => number[]
declare function foo1(a: any): any;
>foo1 : { (a: (x: number) => number[]): (x: number) => number[]; (a: any): any; }
>a : any
declare function foo2(a: (x: number) => string[]): typeof a;
>foo2 : { (a: (x: number) => string[]): (x: number) => string[]; (a: any): any; }
>a : (x: number) => string[]
>x : number
>a : (x: number) => string[]
declare function foo2(a: any): any;
>foo2 : { (a: (x: number) => string[]): (x: number) => string[]; (a: any): any; }
>a : any
declare function foo3(a: (x: number) => void): typeof a;
>foo3 : { (a: (x: number) => void): (x: number) => void; (a: any): any; }
>a : (x: number) => void
>x : number
>a : (x: number) => void
declare function foo3(a: any): any;
>foo3 : { (a: (x: number) => void): (x: number) => void; (a: any): any; }
>a : any
declare function foo4(a: (x: string, y: number) => string): typeof a;
>foo4 : { (a: (x: string, y: number) => string): (x: string, y: number) => string; (a: any): any; }
>a : (x: string, y: number) => string
>x : string
>y : number
>a : (x: string, y: number) => string
declare function foo4(a: any): any;
>foo4 : { (a: (x: string, y: number) => string): (x: string, y: number) => string; (a: any): any; }
>a : any
declare function foo5(a: (x: (arg: string) => number) => string): typeof a;
>foo5 : { (a: (x: (arg: string) => number) => string): (x: (arg: string) => number) => string; (a: any): any; }
>a : (x: (arg: string) => number) => string
>x : (arg: string) => number
>arg : string
>a : (x: (arg: string) => number) => string
declare function foo5(a: any): any;
>foo5 : { (a: (x: (arg: string) => number) => string): (x: (arg: string) => number) => string; (a: any): any; }
>a : any
declare function foo6(a: (x: (arg: Base) => Derived) => Base): typeof a;
>foo6 : { (a: (x: (arg: Base) => Derived) => Base): (x: (arg: Base) => Derived) => Base; (a: any): any; }
>a : (x: (arg: Base) => Derived) => Base
>x : (arg: Base) => Derived
>arg : Base
>Base : Base
>Derived : Derived
>Base : Base
>a : (x: (arg: Base) => Derived) => Base
declare function foo6(a: any): any;
>foo6 : { (a: (x: (arg: Base) => Derived) => Base): (x: (arg: Base) => Derived) => Base; (a: any): any; }
>a : any
declare function foo7(a: (x: (arg: Base) => Derived) => (r: Base) => Derived): typeof a;
>foo7 : { (a: (x: (arg: Base) => Derived) => (r: Base) => Derived): (x: (arg: Base) => Derived) => (r: Base) => Derived; (a: any): any; }
>a : (x: (arg: Base) => Derived) => (r: Base) => Derived
>x : (arg: Base) => Derived
>arg : Base
>Base : Base
>Derived : Derived
>r : Base
>Base : Base
>Derived : Derived
>a : (x: (arg: Base) => Derived) => (r: Base) => Derived
declare function foo7(a: any): any;
>foo7 : { (a: (x: (arg: Base) => Derived) => (r: Base) => Derived): (x: (arg: Base) => Derived) => (r: Base) => Derived; (a: any): any; }
>a : any
declare function foo8(a: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived): typeof a;
>foo8 : { (a: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived): (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; (a: any): any; }
>a : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
>x : (arg: Base) => Derived
>arg : Base
>Base : Base
>Derived : Derived
>y : (arg2: Base) => Derived
>arg2 : Base
>Base : Base
>Derived : Derived
>r : Base
>Base : Base
>Derived : Derived
>a : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
declare function foo8(a: any): any;
>foo8 : { (a: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived): (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; (a: any): any; }
>a : any
declare function foo9(a: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived): typeof a;
>foo9 : { (a: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived): (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; (a: any): any; }
>a : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
>x : (arg: Base) => Derived
>arg : Base
>Base : Base
>Derived : Derived
>y : (arg2: Base) => Derived
>arg2 : Base
>Base : Base
>Derived : Derived
>r : Base
>Base : Base
>Derived : Derived
>a : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
declare function foo9(a: any): any;
>foo9 : { (a: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived): (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; (a: any): any; }
>a : any
declare function foo10(a: (...x: Derived[]) => Derived): typeof a;
>foo10 : { (a: (...x: Derived[]) => Derived): (...x: Derived[]) => Derived; (a: any): any; }
>a : (...x: Derived[]) => Derived
>x : Derived[]
>Derived : Derived
>Derived : Derived
>a : (...x: Derived[]) => Derived
declare function foo10(a: any): any;
>foo10 : { (a: (...x: Derived[]) => Derived): (...x: Derived[]) => Derived; (a: any): any; }
>a : any
declare function foo11(a: (x: { foo: string }, y: { foo: string; bar: string }) => Base): typeof a;
>foo11 : { (a: (x: { foo: string; }, y: { foo: string; bar: string; }) => Base): (x: { foo: string; }, y: { foo: string; bar: string; }) => Base; (a: any): any; }
>a : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base
>x : { foo: string; }
>foo : string
>y : { foo: string; bar: string; }
>foo : string
>bar : string
>Base : Base
>a : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base
declare function foo11(a: any): any;
>foo11 : { (a: (x: { foo: string; }, y: { foo: string; bar: string; }) => Base): (x: { foo: string; }, y: { foo: string; bar: string; }) => Base; (a: any): any; }
>a : any
declare function foo12(a: (x: Array, y: Array) => Array): typeof a;
>foo12 : { (a: (x: Base[], y: Derived2[]) => Derived[]): (x: Base[], y: Derived2[]) => Derived[]; (a: any): any; }
>a : (x: Base[], y: Derived2[]) => Derived[]
>x : Base[]
>Array : T[]
>Base : Base
>y : Derived2[]
>Array : T[]
>Derived2 : Derived2
>Array : T[]
>Derived : Derived
>a : (x: Base[], y: Derived2[]) => Derived[]
declare function foo12(a: any): any;
>foo12 : { (a: (x: Base[], y: Derived2[]) => Derived[]): (x: Base[], y: Derived2[]) => Derived[]; (a: any): any; }
>a : any
declare function foo13(a: (x: Array, y: Array) => Array): typeof a;
>foo13 : { (a: (x: Base[], y: Derived[]) => Derived[]): (x: Base[], y: Derived[]) => Derived[]; (a: any): any; }
>a : (x: Base[], y: Derived[]) => Derived[]
>x : Base[]
>Array : T[]
>Base : Base
>y : Derived[]
>Array : T[]
>Derived : Derived
>Array : T[]
>Derived : Derived
>a : (x: Base[], y: Derived[]) => Derived[]
declare function foo13(a: any): any;
>foo13 : { (a: (x: Base[], y: Derived[]) => Derived[]): (x: Base[], y: Derived[]) => Derived[]; (a: any): any; }
>a : any
declare function foo14(a: (x: { a: string; b: number }) => Object): typeof a;
>foo14 : { (a: (x: { a: string; b: number; }) => Object): (x: { a: string; b: number; }) => Object; (a: any): any; }
>a : (x: { a: string; b: number; }) => Object
>x : { a: string; b: number; }
>a : string
>b : number
>Object : Object
>a : (x: { a: string; b: number; }) => Object
declare function foo14(a: any): any;
>foo14 : { (a: (x: { a: string; b: number; }) => Object): (x: { a: string; b: number; }) => Object; (a: any): any; }
>a : any
declare function foo15(a: {
>foo15 : { (a: { (x: number): number[]; (x: string): string[]; }): { (x: number): number[]; (x: string): string[]; }; (a: any): any; }
>a : { (x: number): number[]; (x: string): string[]; }
(x: number): number[];
>x : number
(x: string): string[];
>x : string
}): typeof a;
>a : { (x: number): number[]; (x: string): string[]; }
declare function foo15(a: any): any;
>foo15 : { (a: { (x: number): number[]; (x: string): string[]; }): { (x: number): number[]; (x: string): string[]; }; (a: any): any; }
>a : any
declare function foo16(a: {
>foo16 : { (a: { (x: T): number[]; (x: U): number[]; }): { (x: T): number[]; (x: U): number[]; }; (a: any): any; }
>a : { (x: T): number[]; (x: U): number[]; }
(x: T): number[];
>T : T
>Derived : Derived
>x : T
>T : T
(x: U): number[];
>U : U
>Base : Base
>x : U
>U : U
}): typeof a;
>a : { (x: T): number[]; (x: U): number[]; }
declare function foo16(a: any): any;
>foo16 : { (a: { (x: T): number[]; (x: U): number[]; }): { (x: T): number[]; (x: U): number[]; }; (a: any): any; }
>a : any
declare function foo17(a: {
>foo17 : { (a: { (x: (a: number) => number): number[]; (x: (a: string) => string): string[]; }): { (x: (a: number) => number): number[]; (x: (a: string) => string): string[]; }; (a: any): any; }
>a : { (x: (a: number) => number): number[]; (x: (a: string) => string): string[]; }
(x: (a: number) => number): number[];
>x : (a: number) => number
>a : number
(x: (a: string) => string): string[];
>x : (a: string) => string
>a : string
}): typeof a;
>a : { (x: (a: number) => number): number[]; (x: (a: string) => string): string[]; }
declare function foo17(a: any): any;
>foo17 : { (a: { (x: (a: number) => number): number[]; (x: (a: string) => string): string[]; }): { (x: (a: number) => number): number[]; (x: (a: string) => string): string[]; }; (a: any): any; }
>a : any
declare function foo18(a: {
>foo18 : { (a: { (x: { (a: number): number; (a: string): string; }): any[]; (x: { (a: boolean): boolean; (a: Date): Date; }): any[]; }): { (x: { (a: number): number; (a: string): string; }): any[]; (x: { (a: boolean): boolean; (a: Date): Date; }): any[]; }; (a: any): any; }
>a : { (x: { (a: number): number; (a: string): string; }): any[]; (x: { (a: boolean): boolean; (a: Date): Date; }): any[]; }
(x: {
>x : { (a: number): number; (a: string): string; }
(a: number): number;
>a : number
(a: string): string;
>a : string
}): any[];
(x: {
>x : { (a: boolean): boolean; (a: Date): Date; }
(a: boolean): boolean;
>a : boolean
(a: Date): Date;
>a : Date
>Date : Date
>Date : Date
}): any[];
}): typeof a;
>a : { (x: { (a: number): number; (a: string): string; }): any[]; (x: { (a: boolean): boolean; (a: Date): Date; }): any[]; }
declare function foo18(a: any): any;
>foo18 : { (a: { (x: { (a: number): number; (a: string): string; }): any[]; (x: { (a: boolean): boolean; (a: Date): Date; }): any[]; }): { (x: { (a: number): number; (a: string): string; }): any[]; (x: { (a: boolean): boolean; (a: Date): Date; }): any[]; }; (a: any): any; }
>a : any
var r1arg1 = (x: T) => [x];
>r1arg1 : (x: T) => T[]
>(x: T) => [x] : (x: T) => T[]
>T : T
>x : T
>T : T
>[x] : T[]
>x : T
var r1arg2 = (x: number) => [1];
>r1arg2 : (x: number) => number[]
>(x: number) => [1] : (x: number) => number[]
>x : number
>[1] : number[]
var r1 = foo1(r1arg1); // any, return types are not subtype of first overload
>r1 : any
>foo1(r1arg1) : any
>foo1 : { (a: (x: number) => number[]): (x: number) => number[]; (a: any): any; }
>r1arg1 : (x: T) => T[]
var r1a = [r1arg2, r1arg1]; // generic signature, subtype in both directions
>r1a : ((x: T) => T[])[]
>[r1arg2, r1arg1] : ((x: T) => T[])[]
>r1arg2 : (x: number) => number[]
>r1arg1 : (x: T) => T[]
var r1b = [r1arg1, r1arg2]; // generic signature, subtype in both directions
>r1b : ((x: T) => T[])[]
>[r1arg1, r1arg2] : ((x: T) => T[])[]
>r1arg1 : (x: T) => T[]
>r1arg2 : (x: number) => number[]
var r2arg1 = (x: T) => [''];
>r2arg1 : (x: T) => string[]
>(x: T) => [''] : (x: T) => string[]
>T : T
>x : T
>T : T
>[''] : string[]
var r2arg2 = (x: number) => [''];
>r2arg2 : (x: number) => string[]
>(x: number) => [''] : (x: number) => string[]
>x : number
>[''] : string[]
var r2 = foo2(r2arg1);
>r2 : (x: number) => string[]
>foo2(r2arg1) : (x: number) => string[]
>foo2 : { (a: (x: number) => string[]): (x: number) => string[]; (a: any): any; }
>r2arg1 : (x: T) => string[]
var r2a = [r2arg1, r2arg2];
>r2a : ((x: T) => string[])[]
>[r2arg1, r2arg2] : ((x: T) => string[])[]
>r2arg1 : (x: T) => string[]
>r2arg2 : (x: number) => string[]
var r2b = [r2arg2, r2arg1];
>r2b : ((x: T) => string[])[]
>[r2arg2, r2arg1] : ((x: T) => string[])[]
>r2arg2 : (x: number) => string[]
>r2arg1 : (x: T) => string[]
var r3arg1 = (x: T) => x;
>r3arg1 : (x: T) => T
>(x: T) => x : (x: T) => T
>T : T
>x : T
>T : T
>x : T
var r3arg2 = (x: number) => { };
>r3arg2 : (x: number) => void
>(x: number) => { } : (x: number) => void
>x : number
var r3 = foo3(r3arg1);
>r3 : (x: number) => void
>foo3(r3arg1) : (x: number) => void
>foo3 : { (a: (x: number) => void): (x: number) => void; (a: any): any; }
>r3arg1 : (x: T) => T
var r3a = [r3arg1, r3arg2];
>r3a : ((x: T) => T)[]
>[r3arg1, r3arg2] : ((x: T) => T)[]
>r3arg1 : (x: T) => T
>r3arg2 : (x: number) => void
var r3b = [r3arg2, r3arg1];
>r3b : ((x: T) => T)[]
>[r3arg2, r3arg1] : ((x: T) => T)[]
>r3arg2 : (x: number) => void
>r3arg1 : (x: T) => T
var r4arg1 = (x: T, y: U) => x;
>r4arg1 : (x: T, y: U) => T
>(x: T, y: U) => x : (x: T, y: U) => T
>T : T
>U : U
>x : T
>T : T
>y : U
>U : U
>x : T
var r4arg2 = (x: string, y: number) => '';
>r4arg2 : (x: string, y: number) => string
>(x: string, y: number) => '' : (x: string, y: number) => string
>x : string
>y : number
var r4 = foo4(r4arg1); // any
>r4 : any
>foo4(r4arg1) : any
>foo4 : { (a: (x: string, y: number) => string): (x: string, y: number) => string; (a: any): any; }
>r4arg1 : (x: T, y: U) => T
var r4a = [r4arg1, r4arg2];
>r4a : ((x: T, y: U) => T)[]
>[r4arg1, r4arg2] : ((x: T, y: U) => T)[]
>r4arg1 : (x: T, y: U) => T
>r4arg2 : (x: string, y: number) => string
var r4b = [r4arg2, r4arg1];
>r4b : ((x: T, y: U) => T)[]
>[r4arg2, r4arg1] : ((x: T, y: U) => T)[]
>r4arg2 : (x: string, y: number) => string
>r4arg1 : (x: T, y: U) => T
var r5arg1 = (x: (arg: T) => U) => null;
>r5arg1 : (x: (arg: T) => U) => T
>(x: (arg: T) => U) => null : (x: (arg: T) => U) => T
>T : T
>U : U
>x : (arg: T) => U
>arg : T
>T : T
>U : U
>null : T
>T : T
var r5arg2 = (x: (arg: string) => number) => '';
>r5arg2 : (x: (arg: string) => number) => string
>(x: (arg: string) => number) => '' : (x: (arg: string) => number) => string
>x : (arg: string) => number
>arg : string
var r5 = foo5(r5arg1); // any
>r5 : any
>foo5(r5arg1) : any
>foo5 : { (a: (x: (arg: string) => number) => string): (x: (arg: string) => number) => string; (a: any): any; }
>r5arg1 : (x: (arg: T) => U) => T
var r5a = [r5arg1, r5arg2];
>r5a : ((x: (arg: T) => U) => T)[]
>[r5arg1, r5arg2] : ((x: (arg: T) => U) => T)[]
>r5arg1 : (x: (arg: T) => U) => T
>r5arg2 : (x: (arg: string) => number) => string
var r5b = [r5arg2, r5arg1];
>r5b : ((x: (arg: T) => U) => T)[]
>[r5arg2, r5arg1] : ((x: (arg: T) => U) => T)[]
>r5arg2 : (x: (arg: string) => number) => string
>r5arg1 : (x: (arg: T) => U) => T
var r6arg1 = (x: (arg: T) => U) => null;
>r6arg1 : (x: (arg: T) => U) => T
>(x: (arg: T) => U) => null : (x: (arg: T) => U) => T
>T : T
>Base : Base
>U : U
>Derived : Derived
>x : (arg: T) => U
>arg : T
>T : T
>U : U
>null : T
>T : T
var r6arg2 = (x: (arg: Base) => Derived) => null;
>r6arg2 : (x: (arg: Base) => Derived) => Base
>(x: (arg: Base) => Derived) => null : (x: (arg: Base) => Derived) => Base
>x : (arg: Base) => Derived
>arg : Base
>Base : Base
>Derived : Derived
>null : Base
>Base : Base
var r6 = foo6(r6arg1); // any
>r6 : any
>foo6(r6arg1) : any
>foo6 : { (a: (x: (arg: Base) => Derived) => Base): (x: (arg: Base) => Derived) => Base; (a: any): any; }
>r6arg1 : (x: (arg: T) => U) => T
var r6a = [r6arg1, r6arg2];
>r6a : ((x: (arg: T) => U) => T)[]
>[r6arg1, r6arg2] : ((x: (arg: T) => U) => T)[]
>r6arg1 : (x: (arg: T) => U) => T
>r6arg2 : (x: (arg: Base) => Derived) => Base
var r6b = [r6arg2, r6arg1];
>r6b : ((x: (arg: T) => U) => T)[]
>[r6arg2, r6arg1] : ((x: (arg: T) => U) => T)[]
>r6arg2 : (x: (arg: Base) => Derived) => Base
>r6arg1 : (x: (arg: T) => U) => T
var r7arg1 = (x: (arg: T) => U) => (r: T) => null;
>r7arg1 : (x: (arg: T) => U) => (r: T) => U
>(x: (arg: T) => U) => (r: T) => null : (x: (arg: T) => U) => (r: T) => U
>T : T
>Base : Base
>U : U
>Derived : Derived
>x : (arg: T) => U
>arg : T
>T : T
>U : U
>(r: T) => null : (r: T) => U
>r : T
>T : T
>null : U
>U : U
var r7arg2 = (x: (arg: Base) => Derived) => (r: Base) => null;
>r7arg2 : (x: (arg: Base) => Derived) => (r: Base) => Derived
>(x: (arg: Base) => Derived) => (r: Base) => null : (x: (arg: Base) => Derived) => (r: Base) => Derived
>x : (arg: Base) => Derived
>arg : Base
>Base : Base
>Derived : Derived
>(r: Base) => null : (r: Base) => Derived
>r : Base
>Base : Base
>null : Derived
>Derived : Derived
var r7 = foo7(r7arg1); // any
>r7 : any
>foo7(r7arg1) : any
>foo7 : { (a: (x: (arg: Base) => Derived) => (r: Base) => Derived): (x: (arg: Base) => Derived) => (r: Base) => Derived; (a: any): any; }
>r7arg1 : (x: (arg: T) => U) => (r: T) => U
var r7a = [r7arg1, r7arg2];
>r7a : ((x: (arg: T) => U) => (r: T) => U)[]
>[r7arg1, r7arg2] : ((x: (arg: T) => U) => (r: T) => U)[]
>r7arg1 : (x: (arg: T) => U) => (r: T) => U
>r7arg2 : (x: (arg: Base) => Derived) => (r: Base) => Derived
var r7b = [r7arg2, r7arg1];
>r7b : ((x: (arg: T) => U) => (r: T) => U)[]
>[r7arg2, r7arg1] : ((x: (arg: T) => U) => (r: T) => U)[]
>r7arg2 : (x: (arg: Base) => Derived) => (r: Base) => Derived
>r7arg1 : (x: (arg: T) => U) => (r: T) => U
var r8arg1 = (x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => null;
>r8arg1 : (x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U
>(x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => null : (x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U
>T : T
>Base : Base
>U : U
>Derived : Derived
>x : (arg: T) => U
>arg : T
>T : T
>U : U
>y : (arg2: T) => U
>arg2 : T
>T : T
>U : U
>(r: T) => null : (r: T) => U
>r : T
>T : T
>null : U
>U : U
var r8arg2 = (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => null;
>r8arg2 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
>(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => null : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
>x : (arg: Base) => Derived
>arg : Base
>Base : Base
>Derived : Derived
>y : (arg2: Base) => Derived
>arg2 : Base
>Base : Base
>Derived : Derived
>(r: Base) => null : (r: Base) => Derived
>r : Base
>Base : Base
>null : Derived
>Derived : Derived
var r8 = foo8(r8arg1); // any
>r8 : any
>foo8(r8arg1) : any
>foo8 : { (a: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived): (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; (a: any): any; }
>r8arg1 : (x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U
var r8a = [r8arg1, r8arg2];
>r8a : ((x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U)[]
>[r8arg1, r8arg2] : ((x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U)[]
>r8arg1 : (x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U
>r8arg2 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
var r8b = [r8arg2, r8arg1];
>r8b : ((x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U)[]
>[r8arg2, r8arg1] : ((x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U)[]
>r8arg2 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
>r8arg1 : (x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U
var r9arg1 = (x: (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => (r: T) => null;
>r9arg1 : (x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U
>(x: (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => (r: T) => null : (x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U
>T : T
>Base : Base
>U : U
>Derived : Derived
>x : (arg: T) => U
>arg : T
>T : T
>U : U
>y : (arg2: { foo: string; bing: number; }) => U
>arg2 : { foo: string; bing: number; }
>foo : string
>bing : number
>U : U
>(r: T) => null : (r: T) => U
>r : T
>T : T
>null : U
>U : U
var r9arg2 = (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => null;
>r9arg2 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
>(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => null : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
>x : (arg: Base) => Derived
>arg : Base
>Base : Base
>Derived : Derived
>y : (arg2: Base) => Derived
>arg2 : Base
>Base : Base
>Derived : Derived
>(r: Base) => null : (r: Base) => Derived
>r : Base
>Base : Base
>null : Derived
>Derived : Derived
var r9 = foo9(r9arg1); // any
>r9 : any
>foo9(r9arg1) : any
>foo9 : { (a: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived): (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; (a: any): any; }
>r9arg1 : (x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U
var r9a = [r9arg1, r9arg2];
>r9a : ((x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U)[]
>[r9arg1, r9arg2] : ((x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U)[]
>r9arg1 : (x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U
>r9arg2 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
var r9b = [r9arg2, r9arg1];
>r9b : ((x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U)[]
>[r9arg2, r9arg1] : ((x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U)[]
>r9arg2 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
>r9arg1 : (x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U
var r10arg1 = (...x: T[]) => x[0];
>r10arg1 : (...x: T[]) => T
>(...x: T[]) => x[0] : (...x: T[]) => T
>T : T
>Derived : Derived
>x : T[]
>T : T
>x[0] : T
>x : T[]
var r10arg2 = (...x: Derived[]) => null;
>r10arg2 : (...x: Derived[]) => Derived
>(...x: Derived[]) => null : (...x: Derived[]) => Derived
>x : Derived[]
>Derived : Derived
>null : Derived
>Derived : Derived
var r10 = foo10(r10arg1); // any
>r10 : any
>foo10(r10arg1) : any
>foo10 : { (a: (...x: Derived[]) => Derived): (...x: Derived[]) => Derived; (a: any): any; }
>r10arg1 : (...x: T[]) => T
var r10a = [r10arg1, r10arg2];
>r10a : ((...x: T[]) => T)[]
>[r10arg1, r10arg2] : ((...x: T[]) => T)[]
>r10arg1 : (...x: T[]) => T
>r10arg2 : (...x: Derived[]) => Derived
var r10b = [r10arg2, r10arg1];
>r10b : ((...x: T[]) => T)[]
>[r10arg2, r10arg1] : ((...x: T[]) => T)[]
>r10arg2 : (...x: Derived[]) => Derived
>r10arg1 : (...x: T[]) => T
var r11arg1 = (x: T, y: T) => x;
>r11arg1 : (x: T, y: T) => T
>(x: T, y: T) => x : (x: T, y: T) => T
>T : T
>Base : Base
>x : T
>T : T
>y : T
>T : T
>x : T
var r11arg2 = (x: { foo: string }, y: { foo: string; bar: string }) => null;
>r11arg2 : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base
>(x: { foo: string }, y: { foo: string; bar: string }) => null : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base
>x : { foo: string; }
>foo : string
>y : { foo: string; bar: string; }
>foo : string
>bar : string
>null : Base
>Base : Base
var r11 = foo11(r11arg1); // any
>r11 : any
>foo11(r11arg1) : any
>foo11 : { (a: (x: { foo: string; }, y: { foo: string; bar: string; }) => Base): (x: { foo: string; }, y: { foo: string; bar: string; }) => Base; (a: any): any; }
>r11arg1 : (x: T, y: T) => T
var r11a = [r11arg1, r11arg2];
>r11a : ((x: T, y: T) => T)[]
>[r11arg1, r11arg2] : ((x: T, y: T) => T)[]
>r11arg1 : (x: T, y: T) => T
>r11arg2 : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base
var r11b = [r11arg2, r11arg1];
>r11b : ((x: T, y: T) => T)[]
>[r11arg2, r11arg1] : ((x: T, y: T) => T)[]
>r11arg2 : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base
>r11arg1 : (x: T, y: T) => T
var r12arg1 = >(x: Array, y: T) => >null;
>r12arg1 : (x: Base[], y: T) => Derived[]
>>(x: Array, y: T) => >null : (x: Base[], y: T) => Derived[]
>T : T
>Array : T[]
>Base : Base
>x : Base[]
>Array : T[]
>Base : Base
>y : T
>T : T
>>null : Derived[]
>Array : T[]
>Derived : Derived
var r12arg2 = (x: Array, y: Array) => >null;
>r12arg2 : (x: Base[], y: Derived2[]) => Derived[]
>(x: Array, y: Array) => >null : (x: Base[], y: Derived2[]) => Derived[]
>x : Base[]
>Array : T[]
>Base : Base
>y : Derived2[]
>Array : T[]
>Derived2 : Derived2
>>null : Derived[]
>Array : T[]
>Derived : Derived
var r12 = foo12(r12arg1); // any
>r12 : (x: Base[], y: Derived2[]) => Derived[]
>foo12(r12arg1) : (x: Base[], y: Derived2[]) => Derived[]
>foo12 : { (a: (x: Base[], y: Derived2[]) => Derived[]): (x: Base[], y: Derived2[]) => Derived[]; (a: any): any; }
>r12arg1 : (x: Base[], y: T) => Derived[]
var r12a = [r12arg1, r12arg2];
>r12a : ((x: Base[], y: T) => Derived[])[]
>[r12arg1, r12arg2] : ((x: Base[], y: T) => Derived[])[]
>r12arg1 : (x: Base[], y: T) => Derived[]
>r12arg2 : (x: Base[], y: Derived2[]) => Derived[]
var r12b = [r12arg2, r12arg1];
>r12b : ((x: Base[], y: T) => Derived[])[]
>[r12arg2, r12arg1] : ((x: Base[], y: T) => Derived[])[]
>r12arg2 : (x: Base[], y: Derived2[]) => Derived[]
>r12arg1 : (x: Base[], y: T) => Derived[]
var r13arg1 = >(x: Array, y: T) => y;
>r13arg1 : (x: Base[], y: T) => T
>>(x: Array, y: T) => y : (x: Base[], y: T) => T
>T : T
>Array : T[]
>Derived : Derived
>x : Base[]
>Array : T[]
>Base : Base
>y : T
>T : T
>y : T
var r13arg2 = (x: Array, y: Array) => >null;
>r13arg2 : (x: Base[], y: Derived[]) => Derived[]
>(x: Array, y: Array) => >null : (x: Base[], y: Derived[]) => Derived[]
>x : Base[]
>Array : T[]
>Base : Base
>y : Derived[]
>Array : T[]
>Derived : Derived
>>null : Derived[]
>Array : T[]
>Derived : Derived
var r13 = foo13(r13arg1); // any
>r13 : any
>foo13(r13arg1) : any
>foo13 : { (a: (x: Base[], y: Derived[]) => Derived[]): (x: Base[], y: Derived[]) => Derived[]; (a: any): any; }
>r13arg1 : (x: Base[], y: T) => T
var r13a = [r13arg1, r13arg2];
>r13a : ((x: Base[], y: T) => T)[]
>[r13arg1, r13arg2] : ((x: Base[], y: T) => T)[]
>r13arg1 : (x: Base[], y: T) => T
>r13arg2 : (x: Base[], y: Derived[]) => Derived[]
var r13b = [r13arg2, r13arg1];
>r13b : ((x: Base[], y: T) => T)[]
>[r13arg2, r13arg1] : ((x: Base[], y: T) => T)[]
>r13arg2 : (x: Base[], y: Derived[]) => Derived[]
>r13arg1 : (x: Base[], y: T) => T
var r14arg1 = (x: { a: T; b: T }) => x.a;
>r14arg1 : (x: { a: T; b: T; }) => T
>(x: { a: T; b: T }) => x.a : (x: { a: T; b: T; }) => T
>T : T
>x : { a: T; b: T; }
>a : T
>T : T
>b : T
>T : T
>x.a : T
>x : { a: T; b: T; }
>a : T
var r14arg2 = (x: { a: string; b: number }) =>