TypeScript Version: 2.1.0-dev.20161102
Code
Source
export class Foo {
public foo(...strings: string[]): this {
return this;
}
}
const instance = new Foo();
instance
.foo(...[])
.foo(...[])
Compiled Code
"use strict";
var Foo = (function () {
function Foo() {
}
Foo.prototype.foo = function () {
var strings = [];
for (var _i = 0; _i < arguments.length; _i++) {
strings[_i - 0] = arguments[_i];
}
return this;
};
return Foo;
}());
exports.Foo = Foo;
var instance = new Foo();
(_a = instance
.foo(...[])).foo.apply(_a, []);
var _a;
Expected behavior:
The compiled code should not contain ....
Actual behavior:
(_a = instance
.foo(...[])).foo.apply(_a, []);
TypeScript Version: 2.1.0-dev.20161102
Code
Source
Compiled Code
Expected behavior:
The compiled code should not contain
....Actual behavior: