2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/undefinedArgumentInference.ts ===
|
|
|
|
function foo1<T>(f1: { x: T; y: T }): T {
|
|
|
|
>foo1 : <T>(f1: { x: T; y: T; }) => T
|
|
|
|
>T : T
|
|
|
|
>f1 : { x: T; y: T; }
|
|
|
|
>x : T
|
|
|
|
>T : T
|
|
|
|
>y : T
|
|
|
|
>T : T
|
|
|
|
>T : T
|
|
|
|
|
|
|
|
return undefined;
|
|
|
|
>undefined : undefined
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
var z1 = foo1({ x: undefined, y: undefined });
|
|
|
|
>z1 : any
|
|
|
|
>foo1({ x: undefined, y: undefined }) : any
|
|
|
|
>foo1 : <T>(f1: { x: T; y: T; }) => T
|
|
|
|
>{ x: undefined, y: undefined } : { x: undefined; y: undefined; }
|
2014-09-10 21:58:30 +02:00
|
|
|
>x : undefined
|
2014-08-15 23:33:16 +02:00
|
|
|
>undefined : undefined
|
2014-09-10 21:58:30 +02:00
|
|
|
>y : undefined
|
2014-08-15 23:33:16 +02:00
|
|
|
>undefined : undefined
|
|
|
|
|