TypeScript/tests/cases/compiler/implicitAnyGenericTypeInference.ts

9 lines
186 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
// @noimplicitany: true
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, '');