2014-07-13 01:04:16 +02:00
|
|
|
//// [functionTypeArgumentAssignmentCompat.ts]
|
|
|
|
var f : {
|
|
|
|
<T>(x:T): T;
|
|
|
|
}
|
|
|
|
|
|
|
|
var g : {
|
|
|
|
<S>() : S[];
|
|
|
|
} = () => [];
|
|
|
|
|
|
|
|
f = g;
|
|
|
|
var s = f("str").toUpperCase();
|
|
|
|
|
|
|
|
console.log(s);
|
|
|
|
|
|
|
|
|
|
|
|
//// [functionTypeArgumentAssignmentCompat.js]
|
|
|
|
var f;
|
2015-03-09 02:23:23 +01:00
|
|
|
var g = function () {
|
|
|
|
return [];
|
|
|
|
};
|
2014-07-13 01:04:16 +02:00
|
|
|
f = g;
|
|
|
|
var s = f("str").toUpperCase();
|
|
|
|
console.log(s);
|