2014-07-13 01:04:16 +02:00
|
|
|
//// [contextualTypeAppliedToVarArgs.ts]
|
|
|
|
function delegate(instance: any, method: (...args: any[]) => any, data?: any): (...args: any[]) => any {
|
|
|
|
return function () { };
|
|
|
|
}
|
|
|
|
|
|
|
|
class Foo{
|
|
|
|
|
|
|
|
|
|
|
|
Bar() {
|
|
|
|
delegate(this, function (source, args2)
|
|
|
|
{
|
|
|
|
var a = source.node;
|
|
|
|
var b = args2.node;
|
|
|
|
} );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//// [contextualTypeAppliedToVarArgs.js]
|
|
|
|
function delegate(instance, method, data) {
|
2015-02-07 03:45:09 +01:00
|
|
|
return function () { };
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
var Foo = (function () {
|
|
|
|
function Foo() {
|
|
|
|
}
|
|
|
|
Foo.prototype.Bar = function () {
|
|
|
|
delegate(this, function (source, args2) {
|
|
|
|
var a = source.node;
|
|
|
|
var b = args2.node;
|
|
|
|
});
|
|
|
|
};
|
|
|
|
return Foo;
|
|
|
|
})();
|