Skip to content

Commit

Permalink
Fix test, destructure with as assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
SakibulMowla committed Oct 26, 2019
1 parent 30b306d commit 7f811d9
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 55 deletions.
@@ -1 +1 @@
(a as number) = 42;
[a as number] = [42];
@@ -1,29 +1,29 @@
{
"type": "File",
"start": 0,
"end": 19,
"end": 21,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 19
"column": 21
}
},
"program": {
"type": "Program",
"start": 0,
"end": 19,
"end": 21,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 19
"column": 21
}
},
"sourceType": "module",
Expand All @@ -32,102 +32,117 @@
{
"type": "ExpressionStatement",
"start": 0,
"end": 19,
"end": 21,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 19
"column": 21
}
},
"expression": {
"type": "AssignmentExpression",
"start": 0,
"end": 18,
"end": 20,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 18
"column": 20
}
},
"operator": "=",
"left": {
"type": "TSAsExpression",
"start": 1,
"end": 12,
"type": "ArrayPattern",
"start": 0,
"end": 13,
"loc": {
"start": {
"line": 1,
"column": 1
"column": 0
},
"end": {
"line": 1,
"column": 12
"column": 13
}
},
"expression": {
"type": "Identifier",
"start": 1,
"end": 2,
"loc": {
"start": {
"line": 1,
"column": 1
"elements": [
{
"type": "Identifier",
"start": 1,
"end": 12,
"loc": {
"start": {
"line": 1,
"column": 1
},
"end": {
"line": 1,
"column": 12
},
"identifierName": "a"
},
"end": {
"line": 1,
"column": 2
},
"identifierName": "a"
},
"name": "a"
},
"typeAnnotation": {
"type": "TSNumberKeyword",
"start": 6,
"end": 12,
"loc": {
"start": {
"line": 1,
"column": 6
},
"end": {
"line": 1,
"column": 12
"name": "a",
"typeAnnotation": {
"type": "TSNumberKeyword",
"start": 6,
"end": 12,
"loc": {
"start": {
"line": 1,
"column": 6
},
"end": {
"line": 1,
"column": 12
}
}
}
}
},
"extra": {
"parenthesized": true,
"parenStart": 0
}
]
},
"right": {
"type": "NumericLiteral",
"type": "ArrayExpression",
"start": 16,
"end": 18,
"end": 20,
"loc": {
"start": {
"line": 1,
"column": 16
},
"end": {
"line": 1,
"column": 18
"column": 20
}
},
"extra": {
"rawValue": 42,
"raw": "42"
},
"value": 42
"elements": [
{
"type": "NumericLiteral",
"start": 17,
"end": 19,
"loc": {
"start": {
"line": 1,
"column": 17
},
"end": {
"line": 1,
"column": 19
}
},
"extra": {
"rawValue": 42,
"raw": "42"
},
"value": 42
}
]
}
}
}
Expand Down

0 comments on commit 7f811d9

Please sign in to comment.