// satisfaction of a constraint to Function, all of these invocations are errors unless otherwise noted function foo(x: T): T { return x; } foo(1); foo(() => { }, 1); foo(1, () => { }); function foo2 string>(x: T): T { return x; } class C { foo: string; } var b: { new (x: string): string }; class C2 { foo: T; } var b2: { new (x: T): T }; var r = foo2(new Function()); var r2 = foo2((x: string[]) => x); var r6 = foo2(C); var r7 = foo2(b); var r8 = foo2((x: U) => x); // no error expected var r11 = foo2((x: U, y: V) => x); var r13 = foo2(C2); var r14 = foo2(b2); interface F2 extends Function { foo: string; } var f2: F2; var r16 = foo2(f2); function fff(x: T, y: U) { foo2(x); foo2(y); }