=== tests/cases/compiler/genericTypeArgumentInference1.ts === module Underscore { >Underscore : any export interface Iterator { >Iterator : Iterator >T : T >U : U (value: T, index: any, list: any): U; >value : T >T : T >index : any >list : any >U : U } export interface Static { >Static : Static all(list: T[], iterator?: Iterator, context?: any): T; >all : (list: T[], iterator?: Iterator, context?: any) => T >T : T >list : T[] >T : T >iterator : Iterator >Iterator : Iterator >T : T >context : any >T : T identity(value: T): T; >identity : (value: T) => T >T : T >value : T >T : T >T : T } } declare var _: Underscore.Static; >_ : Underscore.Static >Underscore : any >Static : Underscore.Static var r = _.all([true, 1, null, 'yes'], _.identity); >r : string | number | boolean >_.all([true, 1, null, 'yes'], _.identity) : string | number | boolean >_.all : (list: T[], iterator?: Underscore.Iterator, context?: any) => T >_ : Underscore.Static >all : (list: T[], iterator?: Underscore.Iterator, context?: any) => T >[true, 1, null, 'yes'] : (string | number | boolean)[] >true : boolean >1 : number >null : null >'yes' : string >_.identity : (value: T) => T >_ : Underscore.Static >identity : (value: T) => T var r2 = _.all([true], _.identity); >r2 : boolean >_.all([true], _.identity) : boolean >_.all : (list: T[], iterator?: Underscore.Iterator, context?: any) => T >_ : Underscore.Static >all : (list: T[], iterator?: Underscore.Iterator, context?: any) => T >[true] : boolean[] >true : boolean >_.identity : (value: T) => T >_ : Underscore.Static >identity : (value: T) => T var r3 = _.all([], _.identity); >r3 : any >_.all([], _.identity) : any >_.all : (list: T[], iterator?: Underscore.Iterator, context?: any) => T >_ : Underscore.Static >all : (list: T[], iterator?: Underscore.Iterator, context?: any) => T >[] : undefined[] >_.identity : (value: T) => T >_ : Underscore.Static >identity : (value: T) => T var r4 = _.all([true], _.identity); >r4 : any >_.all([true], _.identity) : any >_.all : (list: T[], iterator?: Underscore.Iterator, context?: any) => T >_ : Underscore.Static >all : (list: T[], iterator?: Underscore.Iterator, context?: any) => T >[true] : any[] >true : any >true : boolean >_.identity : (value: T) => T >_ : Underscore.Static >identity : (value: T) => T