2014-07-13 01:04:16 +02:00
|
|
|
//// [objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.ts]
|
|
|
|
// object types are identical structurally
|
|
|
|
|
|
|
|
|
|
|
|
interface I<X, Y, Z, A> {
|
|
|
|
(x: X): X;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface I2 {
|
|
|
|
<Y, Z, A, B>(x: Y): Y;
|
|
|
|
}
|
|
|
|
|
|
|
|
var a: { <Z, A, B, C, D>(x: Z): Z }
|
|
|
|
|
|
|
|
function foo1(x: I<string, boolean, number, string>);
|
|
|
|
function foo1(x: I<string, boolean, number, string>); // error
|
|
|
|
function foo1(x: any) { }
|
|
|
|
|
|
|
|
function foo2(x: I2);
|
|
|
|
function foo2(x: I2); // error
|
|
|
|
function foo2(x: any) { }
|
|
|
|
|
|
|
|
function foo3(x: typeof a);
|
|
|
|
function foo3(x: typeof a); // error
|
|
|
|
function foo3(x: any) { }
|
|
|
|
|
|
|
|
function foo13(x: I<boolean, string, number, Date>);
|
|
|
|
function foo13(x: typeof a); // ok
|
|
|
|
function foo13(x: any) { }
|
|
|
|
|
|
|
|
function foo14(x: I<boolean, string, number, Date>);
|
|
|
|
function foo14(x: I2); // error
|
|
|
|
function foo14(x: any) { }
|
|
|
|
|
|
|
|
function foo14b(x: typeof a);
|
|
|
|
function foo14b(x: I2); // ok
|
|
|
|
function foo14b(x: any) { }
|
|
|
|
|
|
|
|
function foo15(x: I<boolean, string, number, Date>);
|
|
|
|
function foo15(x: I2); // ok
|
|
|
|
function foo15(x: any) { }
|
|
|
|
|
|
|
|
//// [objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.js]
|
2014-08-19 19:43:13 +02:00
|
|
|
// object types are identical structurally
|
2014-07-13 01:04:16 +02:00
|
|
|
var a;
|
2015-02-07 03:45:09 +01:00
|
|
|
function foo1(x) { }
|
|
|
|
function foo2(x) { }
|
|
|
|
function foo3(x) { }
|
|
|
|
function foo13(x) { }
|
|
|
|
function foo14(x) { }
|
|
|
|
function foo14b(x) { }
|
|
|
|
function foo15(x) { }
|