26 lines
561 B
Text
26 lines
561 B
Text
=== 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; }
|
|
>x : undefined
|
|
>undefined : undefined
|
|
>y : undefined
|
|
>undefined : undefined
|
|
|