Accept baseline

This commit is contained in:
Ryohei Ikegami
2015-10-27 11:59:48 +09:00
parent a3f09c343b
commit e64831b2b8
2 changed files with 26 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
tests/cases/compiler/bindingPatternInParameter01.ts(4,3): error TS2304: Cannot find name 'console'.
==== tests/cases/compiler/bindingPatternInParameter01.ts (1 errors) ====
const nestedArray = [[[1, 2]], [[3, 4]]];
nestedArray.forEach(([[a, b]]) => {
console.log(a, b);
~~~~~~~
!!! error TS2304: Cannot find name 'console'.
});

View File

@@ -0,0 +1,14 @@
//// [bindingPatternInParameter01.ts]
const nestedArray = [[[1, 2]], [[3, 4]]];
nestedArray.forEach(([[a, b]]) => {
console.log(a, b);
});
//// [bindingPatternInParameter01.js]
var nestedArray = [[[1, 2]], [[3, 4]]];
nestedArray.forEach(function (_a) {
var _b = _a[0], a = _b[0], b = _b[1];
console.log(a, b);
});