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

129 lines
3.2 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 1,
"end": 26,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 1,
"end": 26,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 5,
"end": 25,
"ctxt": 0
},
"id": {
"type": "ArrayPattern",
"span": {
"start": 5,
"end": 16,
"ctxt": 0
},
"elements": [
{
"type": "RestElement",
"span": {
"start": 6,
"end": 15,
"ctxt": 0
},
"rest": {
"start": 6,
"end": 9,
"ctxt": 0
},
"argument": {
"type": "ArrayPattern",
"span": {
"start": 9,
"end": 15,
"ctxt": 0
},
"elements": [
{
"type": "Identifier",
"span": {
"start": 10,
"end": 11,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
{
"type": "Identifier",
"span": {
"start": 13,
"end": 14,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrayExpression",
"span": {
"start": 19,
"end": 25,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 20,
"end": 21,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 23,
"end": 24,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
]
},
"definite": false
}
]
}
],
"interpreter": null
}