TypeScript/tests/cases/compiler/typeArgumentInferenceOrdering.ts
2017-02-24 17:48:06 -08:00

14 lines
227 B
TypeScript

class C {
y: I;
}
interface I {
x(): Goo;
}
interface Goo {
p: string;
}
function foo<T>(f: { y: T }): T { return null }
var x = foo(new C()).x; // was Error that property x does not exist on type {}