swc/crates/swc_ecma_parser/tests/tsc/for-inStatementsDestructuring4.json

142 lines
2.9 KiB
JSON

{
"type": "Script",
"span": {
"start": 1,
"end": 33,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 1,
"end": 10,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 5,
"end": 6,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 5,
"end": 6,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
},
{
"type": "VariableDeclarator",
"span": {
"start": 8,
"end": 9,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 8,
"end": 9,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
},
{
"type": "ForInStatement",
"span": {
"start": 11,
"end": 33,
"ctxt": 0
},
"left": {
"type": "ObjectPattern",
"span": {
"start": 16,
"end": 22,
"ctxt": 0
},
"properties": [
{
"type": "AssignmentPatternProperty",
"span": {
"start": 17,
"end": 18,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 17,
"end": 18,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": null
},
{
"type": "AssignmentPatternProperty",
"span": {
"start": 20,
"end": 21,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 20,
"end": 21,
"ctxt": 0
},
"value": "b",
"optional": false
},
"value": null
}
],
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ArrayExpression",
"span": {
"start": 26,
"end": 28,
"ctxt": 0
},
"elements": []
},
"body": {
"type": "BlockStatement",
"span": {
"start": 30,
"end": 33,
"ctxt": 0
},
"stmts": []
}
}
],
"interpreter": null
}