TypeScript/tests/baselines/reference/trailingCommaInHeterogenousArrayLiteral1.js
2015-02-06 18:45:09 -08:00

24 lines
626 B
JavaScript

//// [trailingCommaInHeterogenousArrayLiteral1.ts]
class arrTest {
test(arg1: number[]) { }
callTest() {
// these two should give the same error
this.test([1, 2, "hi", 5, ]);
this.test([1, 2, "hi", 5]);
}
}
//// [trailingCommaInHeterogenousArrayLiteral1.js]
var arrTest = (function () {
function arrTest() {
}
arrTest.prototype.test = function (arg1) { };
arrTest.prototype.callTest = function () {
// these two should give the same error
this.test([1, 2, "hi", 5,]);
this.test([1, 2, "hi", 5]);
};
return arrTest;
})();