swc/crates/swc_ecma_parser/tests/tsc/emptyObjectBindingPatternParameter04.json
2022-04-05 12:46:35 +00:00

230 lines
5.9 KiB
JSON

{
"type": "Script",
"span": {
"start": 23,
"end": 84,
"ctxt": 0
},
"body": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 32,
"end": 33,
"ctxt": 0
},
"value": "f",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 34,
"end": 62,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "AssignmentPattern",
"span": {
"start": 34,
"end": 62,
"ctxt": 0
},
"left": {
"type": "ObjectPattern",
"span": {
"start": 34,
"end": 36,
"ctxt": 0
},
"properties": [],
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 39,
"end": 62,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 40,
"end": 41,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 43,
"end": 44,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 46,
"end": 47,
"ctxt": 0
},
"value": "b",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 49,
"end": 52,
"ctxt": 0
},
"value": "2",
"raw": "\"2\""
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 54,
"end": 55,
"ctxt": 0
},
"value": "c",
"optional": false
},
"value": {
"type": "BooleanLiteral",
"span": {
"start": 57,
"end": 61,
"ctxt": 0
},
"value": true
}
}
]
},
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 23,
"end": 84,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 64,
"end": 84,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 70,
"end": 82,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 74,
"end": 75,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 74,
"end": 75,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
},
{
"type": "VariableDeclarator",
"span": {
"start": 77,
"end": 78,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 77,
"end": 78,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
},
{
"type": "VariableDeclarator",
"span": {
"start": 80,
"end": 81,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 80,
"end": 81,
"ctxt": 0
},
"value": "z",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
],
"interpreter": null
}