1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
//// [typeParameterOrderReversal.ts]
interface X<T> {
n: T;
}
// Only difference here is order of type parameters
function uFirst<U extends X<T>, T>(x: U) { }
function tFirst<T, U extends X<T>>(x: U) { }
var z: X<number> = null;
// Both of these should be allowed
uFirst(z);
tFirst(z);
//// [typeParameterOrderReversal.js]
// Only difference here is order of type parameters
function uFirst(x) { }
function tFirst(x) { }
var z = null;
// Both of these should be allowed
uFirst(z);
tFirst(z);
|