2015-01-05 22:33:44 +01:00
|
|
|
//// [emitRestParametersMethod.ts]
|
|
|
|
class C {
|
|
|
|
constructor(name: string, ...rest) { }
|
|
|
|
|
|
|
|
public bar(...rest) { }
|
|
|
|
public foo(x: number, ...rest) { }
|
|
|
|
}
|
|
|
|
|
|
|
|
class D {
|
|
|
|
constructor(...rest) { }
|
|
|
|
|
|
|
|
public bar(...rest) { }
|
|
|
|
public foo(x: number, ...rest) { }
|
|
|
|
}
|
|
|
|
|
|
|
|
//// [emitRestParametersMethod.js]
|
|
|
|
var C = (function () {
|
|
|
|
function C(name) {
|
|
|
|
var rest = [];
|
|
|
|
for (var _i = 1; _i < arguments.length; _i++) {
|
|
|
|
rest[_i - 1] = arguments[_i];
|
|
|
|
}
|
|
|
|
}
|
2015-02-07 03:45:09 +01:00
|
|
|
C.prototype.bar = function () { };
|
|
|
|
C.prototype.foo = function (x) { };
|
2015-01-05 22:33:44 +01:00
|
|
|
return C;
|
|
|
|
})();
|
|
|
|
var D = (function () {
|
|
|
|
function D() {
|
|
|
|
var rest = [];
|
|
|
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
|
|
rest[_i - 0] = arguments[_i];
|
|
|
|
}
|
|
|
|
}
|
2015-02-07 03:45:09 +01:00
|
|
|
D.prototype.bar = function () { };
|
|
|
|
D.prototype.foo = function (x) { };
|
2015-01-05 22:33:44 +01:00
|
|
|
return D;
|
|
|
|
})();
|