Skip to content

Commit

Permalink
Fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Sami Turcotte committed Dec 19, 2018
1 parent e476ed7 commit 8b63527
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions examples/basic/src/typescript-1.5.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,17 @@ var {destructObjectA, destructObjectB, destructObjectC} = {destructObjectA:0, de
*/
var [destructArrayA, destructArrayB, destructArrayC = 10] = [0, 'string', 0];

const numberArray = [1, 2, 3, 4];

/**
* Array Destructuring with rest
*/
var [destructArrayWithRestA, destructArrayWithRestB, ...destructArrayWithRest] = [1, 2, 3, 4];
const [destructArrayWithRestA, destructArrayWithRestB, ...destructArrayWithRest] = numberArray;

/**
* Array Destructuring with ignores
*/
var [destructArrayWithIgnoresA, , ...destructArrayWithIgnoresRest] = [1, 2, 3, 4];
const [destructArrayWithIgnoresA, , ...destructArrayWithIgnoresRest] = numberArray;

/**
* Destructuring function parameters.
Expand Down
6 changes: 4 additions & 2 deletions src/test/converter/destructuring/destructuring.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,17 @@ const {destructObjectA, destructObjectB, destructObjectC} = {destructObjectA:0,
*/
const [destructArrayA, destructArrayB, destructArrayC = 10] = [0, 'string', 0];

const numberArray = [1, 2, 3, 4];

/**
* Array Destructuring with rest
*/
const [destructArrayWithRestA, destructArrayWithRestB, ...destructArrayWithRest] = [1, 2, 3, 4];
const [destructArrayWithRestA, destructArrayWithRestB, ...destructArrayWithRest] = numberArray;

/**
* Array Destructuring with ignores
*/
const [destructArrayWithIgnoresA, , ...destructArrayWithIgnoresRest] = [1, 2, 3, 4];
const [destructArrayWithIgnoresA, , ...destructArrayWithIgnoresRest] = numberArray;

/**
* Destructuring function parameters.
Expand Down

0 comments on commit 8b63527

Please sign in to comment.