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

237 lines
6.1 KiB
JSON

{
"type": "Script",
"span": {
"start": 0,
"end": 119,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 0,
"end": 119,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 6,
"end": 118,
"ctxt": 0
},
"id": {
"type": "ObjectPattern",
"span": {
"start": 6,
"end": 105,
"ctxt": 0
},
"properties": [
{
"type": "AssignmentPatternProperty",
"span": {
"start": 12,
"end": 17,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 12,
"end": 13,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 16,
"end": 17,
"ctxt": 0
},
"value": 1.0
}
},
{
"type": "AssignmentPatternProperty",
"span": {
"start": 23,
"end": 28,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 23,
"end": 24,
"ctxt": 0
},
"value": "b",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 27,
"end": 28,
"ctxt": 0
},
"value": 2.0
}
},
{
"type": "AssignmentPatternProperty",
"span": {
"start": 34,
"end": 39,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 34,
"end": 35,
"ctxt": 0
},
"value": "c",
"optional": false
},
"value": {
"type": "Identifier",
"span": {
"start": 38,
"end": 39,
"ctxt": 0
},
"value": "b",
"optional": false
}
},
{
"type": "AssignmentPatternProperty",
"span": {
"start": 51,
"end": 56,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 51,
"end": 52,
"ctxt": 0
},
"value": "d",
"optional": false
},
"value": {
"type": "Identifier",
"span": {
"start": 55,
"end": 56,
"ctxt": 0
},
"value": "a",
"optional": false
}
},
{
"type": "AssignmentPatternProperty",
"span": {
"start": 68,
"end": 73,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 68,
"end": 69,
"ctxt": 0
},
"value": "e",
"optional": false
},
"value": {
"type": "Identifier",
"span": {
"start": 72,
"end": 73,
"ctxt": 0
},
"value": "f",
"optional": false
}
},
{
"type": "AssignmentPatternProperty",
"span": {
"start": 88,
"end": 93,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 88,
"end": 89,
"ctxt": 0
},
"value": "f",
"optional": false
},
"value": {
"type": "Identifier",
"span": {
"start": 92,
"end": 93,
"ctxt": 0
},
"value": "f",
"optional": false
}
}
],
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "TsAsExpression",
"span": {
"start": 108,
"end": 118,
"ctxt": 0
},
"expression": {
"type": "ObjectExpression",
"span": {
"start": 108,
"end": 111,
"ctxt": 0
},
"properties": []
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 115,
"end": 118,
"ctxt": 0
},
"kind": "any"
}
},
"definite": false
}
]
}
],
"interpreter": null
}