swc/crates/swc_ecma_parser/tests/tsc/nonIterableRestElement2.json
2022-04-05 12:46:35 +00:00

143 lines
3.1 KiB
JSON

{
"type": "Script",
"span": {
"start": 15,
"end": 44,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 15,
"end": 26,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 19,
"end": 25,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 19,
"end": 20,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 23,
"end": 25,
"ctxt": 0
},
"properties": []
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 27,
"end": 44,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 27,
"end": 43,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "ArrayPattern",
"span": {
"start": 27,
"end": 33,
"ctxt": 0
},
"elements": [
{
"type": "RestElement",
"span": {
"start": 31,
"end": 32,
"ctxt": 0
},
"rest": {
"start": 28,
"end": 31,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 31,
"end": 32,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ArrayExpression",
"span": {
"start": 36,
"end": 43,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 37,
"end": 39,
"ctxt": 0
},
"value": "",
"raw": "\"\""
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 41,
"end": 42,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
}
]
}
}
}
],
"interpreter": null
}