PR #5949 implements F-bounded polymorphism. It doesn't seem to be working correctly for methods.
interfaceTable<T>{// For this method `T` is apparently a brand new type parameter.insert<TextendsU,U>(obj: U): T;
// insert(obj: any)
}interfaceFoo{a: string;
b: string;}
let Foos: Table<Foo>;// `foo1`'s type is inferred to be {a: 1}letfoo1=Foos.insert({a: 1})// => ;// Should produce errorletfoo2=Foos.insert({c: 1});
PR #5949 implements F-bounded polymorphism. It doesn't seem to be working correctly for methods.