TypeScript/tests/baselines/reference/implicitAnyGenericTypeInference.js
2014-07-12 17:30:19 -07:00

17 lines
338 B
JavaScript

//// [implicitAnyGenericTypeInference.ts]
interface Comparer<T> {
compareTo<U>(x: T, y: U): U;
}
var c: Comparer<any>;
c = { compareTo: (x, y) => { return y; } };
var r = c.compareTo(1, '');
//// [implicitAnyGenericTypeInference.js]
var c;
c = { compareTo: function (x, y) {
return y;
} };
var r = c.compareTo(1, '');