21 lines
420 B
Text
21 lines
420 B
Text
=== tests/cases/conformance/types/tuple/wideningTuples1.ts ===
|
|
declare function foo<T extends [any]>(x: T): T;
|
|
>foo : <T extends [any]>(x: T) => T
|
|
>T : T
|
|
>x : T
|
|
>T : T
|
|
>T : T
|
|
|
|
var y = foo([undefined]);
|
|
>y : [any]
|
|
>foo([undefined]) : [any]
|
|
>foo : <T extends [any]>(x: T) => T
|
|
>[undefined] : [undefined]
|
|
>undefined : undefined
|
|
|
|
y = [""];
|
|
>y = [""] : [string]
|
|
>y : [any]
|
|
>[""] : [string]
|
|
>"" : string
|
|
|