swc/crates/swc_ecma_parser/tests/tsc/nonIterableRestElement1.json

143 lines
3.1 KiB
JSON

{
"type": "Script",
"span": {
"start": 1,
"end": 30,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 1,
"end": 12,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 5,
"end": 11,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 5,
"end": 6,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 9,
"end": 11,
"ctxt": 0
},
"properties": []
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 13,
"end": 30,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 13,
"end": 29,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "ArrayPattern",
"span": {
"start": 13,
"end": 19,
"ctxt": 0
},
"elements": [
{
"type": "RestElement",
"span": {
"start": 17,
"end": 18,
"ctxt": 0
},
"rest": {
"start": 14,
"end": 17,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 17,
"end": 18,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ArrayExpression",
"span": {
"start": 22,
"end": 29,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 23,
"end": 25,
"ctxt": 0
},
"value": "",
"raw": "\"\""
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 27,
"end": 28,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
}
]
}
}
}
],
"interpreter": null
}