TypeScript/tests/baselines/reference/matchingOfObjectLiteralConstraints.js

10 lines
232 B
JavaScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
//// [matchingOfObjectLiteralConstraints.ts]
function foo2<T, U extends { y: T; }>(x: U, z: T) { }
foo2({ y: "foo" }, "foo");
//// [matchingOfObjectLiteralConstraints.js]
function foo2(x, z) { }
2014-07-13 01:04:16 +02:00
foo2({ y: "foo" }, "foo");