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

204 lines
4.6 KiB
JSON

{
"type": "Script",
"span": {
"start": 16,
"end": 71,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 16,
"end": 42,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 20,
"end": 29,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 20,
"end": 21,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 21,
"end": 29,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 23,
"end": 29,
"ctxt": 0
},
"kind": "string"
}
}
},
"init": null,
"definite": false
},
{
"type": "VariableDeclarator",
"span": {
"start": 31,
"end": 41,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 31,
"end": 32,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 32,
"end": 41,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 34,
"end": 41,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 43,
"end": 71,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 43,
"end": 70,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "ArrayPattern",
"span": {
"start": 43,
"end": 49,
"ctxt": 0
},
"elements": [
{
"type": "Identifier",
"span": {
"start": 44,
"end": 45,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
{
"type": "Identifier",
"span": {
"start": 47,
"end": 48,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 52,
"end": 70,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "NumericLiteral",
"span": {
"start": 54,
"end": 55,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
},
"value": {
"type": "StringLiteral",
"span": {
"start": 57,
"end": 59,
"ctxt": 0
},
"value": "",
"raw": "\"\""
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "NumericLiteral",
"span": {
"start": 61,
"end": 62,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"value": {
"type": "BooleanLiteral",
"span": {
"start": 64,
"end": 68,
"ctxt": 0
},
"value": true
}
}
]
}
}
}
],
"interpreter": null
}