2014-07-13 01:04:16 +02:00
|
|
|
//// [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() {
|
|
|
|
}
|
2015-02-07 03:45:09 +01:00
|
|
|
arrTest.prototype.test = function (arg1) { };
|
2014-07-13 01:04:16 +02:00
|
|
|
arrTest.prototype.callTest = function () {
|
2014-08-16 00:49:09 +02:00
|
|
|
// these two should give the same error
|
2014-09-24 04:40:25 +02:00
|
|
|
this.test([1, 2, "hi", 5,]);
|
2014-07-13 01:04:16 +02:00
|
|
|
this.test([1, 2, "hi", 5]);
|
|
|
|
};
|
|
|
|
return arrTest;
|
|
|
|
})();
|