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

308 lines
7.2 KiB
JSON

{
"type": "Script",
"span": {
"start": 1,
"end": 68,
"ctxt": 0
},
"body": [
{
"type": "ExpressionStatement",
"span": {
"start": 1,
"end": 16,
"ctxt": 0
},
"expression": {
"type": "ParenthesisExpression",
"span": {
"start": 1,
"end": 15,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 2,
"end": 14,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "ObjectPattern",
"span": {
"start": 2,
"end": 9,
"ctxt": 0
},
"properties": [
{
"type": "RestElement",
"span": {
"start": 3,
"end": 8,
"ctxt": 0
},
"rest": {
"start": 3,
"end": 6,
"ctxt": 0
},
"argument": {
"type": "ObjectPattern",
"span": {
"start": 6,
"end": 8,
"ctxt": 0
},
"properties": [],
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 12,
"end": 14,
"ctxt": 0
},
"properties": []
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 17,
"end": 34,
"ctxt": 0
},
"expression": {
"type": "ParenthesisExpression",
"span": {
"start": 17,
"end": 33,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 18,
"end": 32,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "ObjectPattern",
"span": {
"start": 18,
"end": 27,
"ctxt": 0
},
"properties": [
{
"type": "RestElement",
"span": {
"start": 19,
"end": 26,
"ctxt": 0
},
"rest": {
"start": 19,
"end": 22,
"ctxt": 0
},
"argument": {
"type": "ParenthesisExpression",
"span": {
"start": 22,
"end": 26,
"ctxt": 0
},
"expression": {
"type": "ObjectExpression",
"span": {
"start": 23,
"end": 25,
"ctxt": 0
},
"properties": []
}
},
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 30,
"end": 32,
"ctxt": 0
},
"properties": []
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 35,
"end": 50,
"ctxt": 0
},
"expression": {
"type": "ParenthesisExpression",
"span": {
"start": 35,
"end": 49,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 36,
"end": 48,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "ObjectPattern",
"span": {
"start": 36,
"end": 43,
"ctxt": 0
},
"properties": [
{
"type": "RestElement",
"span": {
"start": 37,
"end": 42,
"ctxt": 0
},
"rest": {
"start": 37,
"end": 40,
"ctxt": 0
},
"argument": {
"type": "ArrayPattern",
"span": {
"start": 40,
"end": 42,
"ctxt": 0
},
"elements": [],
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 46,
"end": 48,
"ctxt": 0
},
"properties": []
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 51,
"end": 68,
"ctxt": 0
},
"expression": {
"type": "ParenthesisExpression",
"span": {
"start": 51,
"end": 67,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 52,
"end": 66,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "ObjectPattern",
"span": {
"start": 52,
"end": 61,
"ctxt": 0
},
"properties": [
{
"type": "RestElement",
"span": {
"start": 53,
"end": 60,
"ctxt": 0
},
"rest": {
"start": 53,
"end": 56,
"ctxt": 0
},
"argument": {
"type": "ParenthesisExpression",
"span": {
"start": 56,
"end": 60,
"ctxt": 0
},
"expression": {
"type": "ArrayExpression",
"span": {
"start": 57,
"end": 59,
"ctxt": 0
},
"elements": []
}
},
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 64,
"end": 66,
"ctxt": 0
},
"properties": []
}
}
}
}
],
"interpreter": null
}