=== tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignatures3.ts ===
// checking subtype relations for function types as it relates to contextual signature instantiation
// error cases, so function calls will all result in 'any'
module Errors {
>Errors : typeof Errors
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 foo2(a2: (x: number) => string[]): typeof a2;
>foo2 : { (a2: (x: number) => string[]): (x: number) => string[]; (a2: any): any; }
>a2 : (x: number) => string[]
>x : number
>a2 : (x: number) => string[]
declare function foo2(a2: any): any;
>foo2 : { (a2: (x: number) => string[]): (x: number) => string[]; (a2: any): any; }
>a2 : any
declare function foo7(a2: (x: (arg: Base) => Derived) => (r: Base) => Derived2): typeof a2;
>foo7 : { (a2: (x: (arg: Base) => Derived) => (r: Base) => Derived2): (x: (arg: Base) => Derived) => (r: Base) => Derived2; (a2: any): any; }
>a2 : (x: (arg: Base) => Derived) => (r: Base) => Derived2
>x : (arg: Base) => Derived
>arg : Base
>Base : Base
>Derived : Derived
>r : Base
>Base : Base
>Derived2 : Derived2
>a2 : (x: (arg: Base) => Derived) => (r: Base) => Derived2
declare function foo7(a2: any): any;
>foo7 : { (a2: (x: (arg: Base) => Derived) => (r: Base) => Derived2): (x: (arg: Base) => Derived) => (r: Base) => Derived2; (a2: any): any; }
>a2 : any
declare function foo8(a2: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived): typeof a2;
>foo8 : { (a2: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived): (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; (a2: any): any; }
>a2 : (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
>a2 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
declare function foo8(a2: any): any;
>foo8 : { (a2: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived): (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; (a2: any): any; }
>a2 : any
declare function foo10(a2: (...x: Base[]) => Base): typeof a2;
>foo10 : { (a2: (...x: Base[]) => Base): (...x: Base[]) => Base; (a2: any): any; }
>a2 : (...x: Base[]) => Base
>x : Base[]
>Base : Base
>Base : Base
>a2 : (...x: Base[]) => Base
declare function foo10(a2: any): any;
>foo10 : { (a2: (...x: Base[]) => Base): (...x: Base[]) => Base; (a2: any): any; }
>a2 : any
declare function foo11(a2: (x: { foo: string }, y: { foo: string; bar: string }) => Base): typeof a2;
>foo11 : { (a2: (x: { foo: string; }, y: { foo: string; bar: string; }) => Base): (x: { foo: string; }, y: { foo: string; bar: string; }) => Base; (a2: any): any; }
>a2 : (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
>a2 : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base
declare function foo11(a2: any): any;
>foo11 : { (a2: (x: { foo: string; }, y: { foo: string; bar: string; }) => Base): (x: { foo: string; }, y: { foo: string; bar: string; }) => Base; (a2: any): any; }
>a2 : any
declare function foo12(a2: (x: Array, y: Array) => Array): typeof a2;
>foo12 : { (a2: (x: Base[], y: Derived2[]) => Derived[]): (x: Base[], y: Derived2[]) => Derived[]; (a2: any): any; }
>a2 : (x: Base[], y: Derived2[]) => Derived[]
>x : Base[]
>Array : T[]
>Base : Base
>y : Derived2[]
>Array : T[]
>Derived2 : Derived2
>Array : T[]
>Derived : Derived
>a2 : (x: Base[], y: Derived2[]) => Derived[]
declare function foo12(a2: any): any;
>foo12 : { (a2: (x: Base[], y: Derived2[]) => Derived[]): (x: Base[], y: Derived2[]) => Derived[]; (a2: any): any; }
>a2 : any
declare function foo15(a2: (x: { a: string; b: number }) => number): typeof a2;
>foo15 : { (a2: (x: { a: string; b: number; }) => number): (x: { a: string; b: number; }) => number; (a2: any): any; }
>a2 : (x: { a: string; b: number; }) => number
>x : { a: string; b: number; }
>a : string
>b : number
>a2 : (x: { a: string; b: number; }) => number
declare function foo15(a2: any): any;
>foo15 : { (a2: (x: { a: string; b: number; }) => number): (x: { a: string; b: number; }) => number; (a2: any): any; }
>a2 : any
declare function foo16(a2: {
>foo16 : { (a2: { (x: { (a: number): number; (a?: number): number; }): number[]; (x: { (a: boolean): boolean; (a?: boolean): boolean; }): boolean[]; }): { (x: { (a: number): number; (a?: number): number; }): number[]; (x: { (a: boolean): boolean; (a?: boolean): boolean; }): boolean[]; }; (a2: any): any; }
>a2 : { (x: { (a: number): number; (a?: number): number; }): number[]; (x: { (a: boolean): boolean; (a?: boolean): boolean; }): boolean[]; }
// type of parameter is overload set which means we can't do inference based on this type
(x: {
>x : { (a: number): number; (a?: number): number; }
(a: number): number;
>a : number
(a?: number): number;
>a : number
}): number[];
(x: {
>x : { (a: boolean): boolean; (a?: boolean): boolean; }
(a: boolean): boolean;
>a : boolean
(a?: boolean): boolean;
>a : boolean
}): boolean[];
}): typeof a2;
>a2 : { (x: { (a: number): number; (a?: number): number; }): number[]; (x: { (a: boolean): boolean; (a?: boolean): boolean; }): boolean[]; }
declare function foo16(a2: any): any;
>foo16 : { (a2: { (x: { (a: number): number; (a?: number): number; }): number[]; (x: { (a: boolean): boolean; (a?: boolean): boolean; }): boolean[]; }): { (x: { (a: number): number; (a?: number): number; }): number[]; (x: { (a: boolean): boolean; (a?: boolean): boolean; }): boolean[]; }; (a2: any): any; }
>a2 : any
declare function foo17(a2: {
>foo17 : { (a2: { (x: { (a: T): T; (a: T): T; }): any[]; (x: { (a: T): T; (a: T): T; }): any[]; }): { (x: { (a: T): T; (a: T): T; }): any[]; (x: { (a: T): T; (a: T): T; }): any[]; }; (a2: any): any; }
>a2 : { (x: { (a: T): T; (a: T): T; }): any[]; (x: { (a: T): T; (a: T): T; }): any[]; }
(x: {
>x : { (a: T): T; (a: T): T; }
(a: T): T;
>T : T
>Derived : Derived
>a : T
>T : T
>T : T
(a: T): T;
>T : T
>Base : Base
>a : T
>T : T
>T : T
}): any[];
(x: {
>x : { (a: T): T; (a: T): T; }
(a: T): T;
>T : T
>Derived2 : Derived2
>a : T
>T : T
>T : T
(a: T): T;
>T : T
>Base : Base
>a : T
>T : T
>T : T
}): any[];
}): typeof a2;
>a2 : { (x: { (a: T): T; (a: T): T; }): any[]; (x: { (a: T): T; (a: T): T; }): any[]; }
declare function foo17(a2: any): any;
>foo17 : { (a2: { (x: { (a: T): T; (a: T): T; }): any[]; (x: { (a: T): T; (a: T): T; }): any[]; }): { (x: { (a: T): T; (a: T): T; }): any[]; (x: { (a: T): T; (a: T): T; }): any[]; }; (a2: any): any; }
>a2 : any
var r1 = foo2((x: T) => null); // any
>r1 : any
>foo2((x: T) => null) : any
>foo2 : { (a2: (x: number) => string[]): (x: number) => string[]; (a2: any): any; }
>(x: T) => null : (x: T) => U[]
>T : T
>U : U
>x : T
>T : T
>null : U[]
>U : U
var r1a = [(x: number) => [''], (x: T) => null];
>r1a : ((x: T) => U[])[]
>[(x: number) => [''], (x: T) => null] : ((x: T) => U[])[]
>(x: number) => [''] : (x: number) => string[]
>x : number
>[''] : string[]
>(x: T) => null : (x: T) => U[]
>T : T
>U : U
>x : T
>T : T
>null : U[]
>U : U
var r1b = [(x: T) => null, (x: number) => ['']];
>r1b : ((x: T) => U[])[]
>[(x: T) => null, (x: number) => ['']] : ((x: T) => U[])[]
>(x: T) => null : (x: T) => U[]
>T : T
>U : U
>x : T
>T : T
>null : U[]
>U : U
>(x: number) => [''] : (x: number) => string[]
>x : number
>[''] : string[]
var r2arg = (x: (arg: T) => U) => (r: T) => null;
>r2arg : (x: (arg: T) => U) => (r: T) => V
>(x: (arg: T) => U) => (r: T) => null : (x: (arg: T) => U) => (r: T) => V
>T : T
>Base : Base
>U : U
>Derived : Derived
>V : V
>Derived2 : Derived2
>x : (arg: T) => U
>arg : T
>T : T
>U : U
>(r: T) => null : (r: T) => V
>r : T
>T : T
>null : V
>V : V
var r2arg2 = (x: (arg: Base) => Derived) => (r: Base) => null;
>r2arg2 : (x: (arg: Base) => Derived) => (r: Base) => Derived2
>(x: (arg: Base) => Derived) => (r: Base) => null : (x: (arg: Base) => Derived) => (r: Base) => Derived2
>x : (arg: Base) => Derived
>arg : Base
>Base : Base
>Derived : Derived
>(r: Base) => null : (r: Base) => Derived2
>r : Base
>Base : Base
>null : Derived2
>Derived2 : Derived2
var r2 = foo7(r2arg); // any
>r2 : any
>foo7(r2arg) : any
>foo7 : { (a2: (x: (arg: Base) => Derived) => (r: Base) => Derived2): (x: (arg: Base) => Derived) => (r: Base) => Derived2; (a2: any): any; }
>r2arg : (x: (arg: T) => U) => (r: T) => V
var r2a = [r2arg2, r2arg];
>r2a : ((x: (arg: T) => U) => (r: T) => V)[]
>[r2arg2, r2arg] : ((x: (arg: T) => U) => (r: T) => V)[]
>r2arg2 : (x: (arg: Base) => Derived) => (r: Base) => Derived2
>r2arg : (x: (arg: T) => U) => (r: T) => V
var r2b = [r2arg, r2arg2];
>r2b : ((x: (arg: T) => U) => (r: T) => V)[]
>[r2arg, r2arg2] : ((x: (arg: T) => U) => (r: T) => V)[]
>r2arg : (x: (arg: T) => U) => (r: T) => V
>r2arg2 : (x: (arg: Base) => Derived) => (r: Base) => Derived2
var r3arg = (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => null;
>r3arg : (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U
>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => null : (x: (arg: T) => U, y: (arg2: { foo: 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: number; }) => U
>arg2 : { foo: number; }
>foo : number
>U : U
>(r: T) => null : (r: T) => U
>r : T
>T : T
>null : U
>U : U
var r3arg2 = (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => null;
>r3arg2 : (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 r3 = foo8(r3arg); // any
>r3 : any
>foo8(r3arg) : any
>foo8 : { (a2: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived): (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; (a2: any): any; }
>r3arg : (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U
var r3a = [r3arg2, r3arg];
>r3a : (((x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U) | ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived))[]
>[r3arg2, r3arg] : (((x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U) | ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived))[]
>r3arg2 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
>r3arg : (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U
var r3b = [r3arg, r3arg2];
>r3b : (((x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U) | ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived))[]
>[r3arg, r3arg2] : (((x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U) | ((x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived))[]
>r3arg : (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U
>r3arg2 : (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived
var r4arg = (...x: T[]) => null;
>r4arg : (...x: T[]) => T
>(...x: T[]) => null : (...x: T[]) => T
>T : T
>Derived : Derived
>x : T[]
>T : T
>null : T
>T : T
var r4arg2 = (...x: Base[]) => null;
>r4arg2 : (...x: Base[]) => Base
>(...x: Base[]) => null : (...x: Base[]) => Base
>x : Base[]
>Base : Base
>null : Base
>Base : Base
var r4 = foo10(r4arg); // any
>r4 : any
>foo10(r4arg) : any
>foo10 : { (a2: (...x: Base[]) => Base): (...x: Base[]) => Base; (a2: any): any; }
>r4arg : (...x: T[]) => T
var r4a = [r4arg2, r4arg];
>r4a : ((...x: T[]) => T)[]
>[r4arg2, r4arg] : ((...x: T[]) => T)[]
>r4arg2 : (...x: Base[]) => Base
>r4arg : (...x: T[]) => T
var r4b = [r4arg, r4arg2];
>r4b : ((...x: T[]) => T)[]
>[r4arg, r4arg2] : ((...x: T[]) => T)[]
>r4arg : (...x: T[]) => T
>r4arg2 : (...x: Base[]) => Base
var r5arg = (x: T, y: T) => null;
>r5arg : (x: T, y: T) => T
>(x: T, y: T) => null : (x: T, y: T) => T
>T : T
>Derived : Derived
>x : T
>T : T
>y : T
>T : T
>null : T
>T : T
var r5arg2 = (x: { foo: string }, y: { foo: string; bar: string }) => null;
>r5arg2 : (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 r5 = foo11(r5arg); // any
>r5 : any
>foo11(r5arg) : any
>foo11 : { (a2: (x: { foo: string; }, y: { foo: string; bar: string; }) => Base): (x: { foo: string; }, y: { foo: string; bar: string; }) => Base; (a2: any): any; }
>r5arg : (x: T, y: T) => T
var r5a = [r5arg2, r5arg];
>r5a : ((x: T, y: T) => T)[]
>[r5arg2, r5arg] : ((x: T, y: T) => T)[]
>r5arg2 : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base
>r5arg : (x: T, y: T) => T
var r5b = [r5arg, r5arg2];
>r5b : ((x: T, y: T) => T)[]
>[r5arg, r5arg2] : ((x: T, y: T) => T)[]
>r5arg : (x: T, y: T) => T
>r5arg2 : (x: { foo: string; }, y: { foo: string; bar: string; }) => Base
var r6arg = (x: Array, y: Array) => >null;
>r6arg : (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 r6arg2 = >(x: Array, y: Array) => null;
>r6arg2 : (x: Base[], y: Base[]) => T
>>(x: Array, y: Array) => null : (x: Base[], y: Base[]) => T
>T : T
>Array : T[]
>Derived2 : Derived2
>x : Base[]
>Array : T[]
>Base : Base
>y : Base[]
>Array : T[]
>Base : Base
>null : T
>T : T
var r6 = foo12(r6arg); // (x: Array, y: Array) => Array
>r6 : (x: Base[], y: Derived2[]) => Derived[]
>foo12(r6arg) : (x: Base[], y: Derived2[]) => Derived[]
>foo12 : { (a2: (x: Base[], y: Derived2[]) => Derived[]): (x: Base[], y: Derived2[]) => Derived[]; (a2: any): any; }
>r6arg : (x: Base[], y: Derived2[]) => Derived[]
var r6a = [r6arg2, r6arg];
>r6a : ((x: Base[], y: Base[]) => T)[]
>[r6arg2, r6arg] : ((x: Base[], y: Base[]) => T)[]
>r6arg2 : (x: Base[], y: Base[]) => T
>r6arg : (x: Base[], y: Derived2[]) => Derived[]
var r6b = [r6arg, r6arg2];
>r6b : ((x: Base[], y: Base[]) => T)[]
>[r6arg, r6arg2] : ((x: Base[], y: Base[]) => T)[]
>r6arg : (x: Base[], y: Derived2[]) => Derived[]
>r6arg2 : (x: Base[], y: Base[]) => T
var r7arg = (x: { a: T; b: T }) => null;
>r7arg : (x: { a: T; b: T; }) => T
>(x: { a: T; b: T }) => null : (x: { a: T; b: T; }) => T
>T : T
>x : { a: T; b: T; }
>a : T
>T : T
>b : T
>T : T
>null : T
>T : T
var r7arg2 = (x: { a: string; b: number }) => 1;
>r7arg2 : (x: { a: string; b: number; }) => number
>(x: { a: string; b: number }) => 1 : (x: { a: string; b: number; }) => number
>x : { a: string; b: number; }
>a : string
>b : number
var r7 = foo15(r7arg); // any
>r7 : any
>foo15(r7arg) : any
>foo15 : { (a2: (x: { a: string; b: number; }) => number): (x: { a: string; b: number; }) => number; (a2: any): any; }
>r7arg : (x: { a: T; b: T; }) => T
var r7a = [r7arg2, r7arg];
>r7a : ((x: { a: T; b: T; }) => T)[]
>[r7arg2, r7arg] : ((x: { a: T; b: T; }) => T)[]
>r7arg2 : (x: { a: string; b: number; }) => number
>r7arg : (x: { a: T; b: T; }) => T
var r7b = [r7arg, r7arg2];
>r7b : ((x: { a: T; b: T; }) => T)[]
>[r7arg, r7arg2] : ((x: { a: T; b: T; }) => T)[]
>r7arg : (x: { a: T; b: T; }) => T
>r7arg2 : (x: { a: string; b: number; }) => number
var r7arg3 = (x: { a: T; b: T }) => 1;
>r7arg3 : (x: { a: T; b: T; }) => number
>(x: { a: T; b: T }) => 1 : (x: { a: T; b: T; }) => number
>T : T
>Base : Base
>x : { a: T; b: T; }
>a : T
>T : T
>b : T
>T : T
var r7c = foo15(r7arg3); // (x: { a: string; b: number }) => number): number;
>r7c : (x: { a: string; b: number; }) => number
>foo15(r7arg3) : (x: { a: string; b: number; }) => number
>foo15 : { (a2: (x: { a: string; b: number; }) => number): (x: { a: string; b: number; }) => number; (a2: any): any; }
>r7arg3 : (x: { a: T; b: T; }) => number
var r7d = [r7arg2, r7arg3];
>r7d : ((x: { a: string; b: number; }) => number)[]
>[r7arg2, r7arg3] : ((x: { a: string; b: number; }) => number)[]
>r7arg2 : (x: { a: string; b: number; }) => number
>r7arg3 : (x: { a: T; b: T; }) => number
var r7e = [r7arg3, r7arg2];
>r7e : ((x: { a: string; b: number; }) => number)[]
>[r7arg3, r7arg2] : ((x: { a: string; b: number; }) => number)[]
>r7arg3 : (x: { a: T; b: T; }) => number
>r7arg2 : (x: { a: string; b: number; }) => number
var r8arg = (x: (a: T) => T) => null;
>r8arg : (x: (a: T) => T) => T[]
>(x: (a: T) => T) => null : (x: (a: T) => T) => T[]
>T : T
>x : (a: T) => T
>a : T
>T : T
>T : T
>null : T[]
>T : T
var r8 = foo16(r8arg); // any
>r8 : any
>foo16(r8arg) : any
>foo16 : { (a2: { (x: { (a: number): number; (a?: number): number; }): number[]; (x: { (a: boolean): boolean; (a?: boolean): boolean; }): boolean[]; }): { (x: { (a: number): number; (a?: number): number; }): number[]; (x: { (a: boolean): boolean; (a?: boolean): boolean; }): boolean[]; }; (a2: any): any; }
>r8arg : (x: (a: T) => T) => T[]
var r9arg = (x: (a: T) => T) => null;
>r9arg : (x: (a: T) => T) => any[]
>(x: (a: T) => T) => null : (x: (a: T) => T) => any[]
>T : T
>x : (a: T) => T
>a : T
>T : T
>T : T
>null : any[]
var r9 = foo17(r9arg); // (x: { (a: T): T; (a: T): T; }): any[]; (x: { (a: T): T; (a: T): T; }): any[];
>r9 : { (x: { (a: T): T; (a: T): T; }): any[]; (x: { (a: T): T; (a: T): T; }): any[]; }
>foo17(r9arg) : { (x: { (a: T): T; (a: T): T; }): any[]; (x: { (a: T): T; (a: T): T; }): any[]; }
>foo17 : { (a2: { (x: { (a: T): T; (a: T): T; }): any[]; (x: { (a: T): T; (a: T): T; }): any[]; }): { (x: { (a: T): T; (a: T): T; }): any[]; (x: { (a: T): T; (a: T): T; }): any[]; }; (a2: any): any; }
>r9arg : (x: (a: T) => T) => any[]
}
module WithGenericSignaturesInBaseType {
>WithGenericSignaturesInBaseType : typeof WithGenericSignaturesInBaseType
declare function foo2(a2: (x: T) => T[]): typeof a2;
>foo2 : { (a2: (x: T) => T[]): (x: T) => T[]; (a2: any): any; }
>a2 : (x: T) => T[]
>T : T
>x : T
>T : T
>T : T
>a2 : (x: T) => T[]
declare function foo2(a2: any): any;
>foo2 : { (a2: (x: T) => T[]): (x: T) => T[]; (a2: any): any; }
>a2 : any
var r2arg2 = (x: T) => [''];
>r2arg2 : (x: T) => string[]
>(x: T) => [''] : (x: T) => string[]
>T : T
>x : T
>T : T
>[''] : string[]
var r2 = foo2(r2arg2); // (x:T) => T[] since we can infer from generic signatures now
>r2 : (x: T) => T[]
>foo2(r2arg2) : (x: T) => T[]
>foo2 : { (a2: (x: T) => T[]): (x: T) => T[]; (a2: any): any; }
>r2arg2 : (x: T) => string[]
declare function foo3(a2: (x: T) => string[]): typeof a2;
>foo3 : { (a2: (x: T) => string[]): (x: T) => string[]; (a2: any): any; }
>a2 : (x: T) => string[]
>T : T
>x : T
>T : T
>a2 : (x: T) => string[]
declare function foo3(a2: any): any;
>foo3 : { (a2: (x: T) => string[]): (x: T) => string[]; (a2: any): any; }
>a2 : any
var r3arg2 = (x: T) => null;
>r3arg2 : (x: T) => T[]
>(x: T) => null : (x: T) => T[]
>T : T
>x : T
>T : T
>null : T[]
>T : T
var r3 = foo3(r3arg2); // any
>r3 : any
>foo3(r3arg2) : any
>foo3 : { (a2: (x: T) => string[]): (x: T) => string[]; (a2: any): any; }
>r3arg2 : (x: T) => T[]
}