10 lines
533 B
Plaintext
10 lines
533 B
Plaintext
tests/cases/compiler/matchingOfObjectLiteralConstraints.ts(1,18): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
|
|
|
|
==== tests/cases/compiler/matchingOfObjectLiteralConstraints.ts (1 errors) ====
|
|
function foo2<T, U extends { y: T; }>(x: U, z: T) { }
|
|
~~~~~~~~~~~~~~~~~~~
|
|
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
|
foo2({ y: "foo" }, "foo");
|
|
|
|
|