TypeScript/tests/baselines/reference/matchingOfObjectLiteralConstraints.js
2015-02-06 18:45:09 -08:00

10 lines
232 B
JavaScript

//// [matchingOfObjectLiteralConstraints.ts]
function foo2<T, U extends { y: T; }>(x: U, z: T) { }
foo2({ y: "foo" }, "foo");
//// [matchingOfObjectLiteralConstraints.js]
function foo2(x, z) { }
foo2({ y: "foo" }, "foo");