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

143 lines
3.3 KiB
JSON

{
"type": "Script",
"span": {
"start": 24,
"end": 59,
"ctxt": 0
},
"body": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 33,
"end": 34,
"ctxt": 0
},
"value": "f",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 35,
"end": 37,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "ObjectPattern",
"span": {
"start": 35,
"end": 37,
"ctxt": 0
},
"properties": [],
"optional": false,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 24,
"end": 59,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 39,
"end": 59,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 45,
"end": 57,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 49,
"end": 50,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 49,
"end": 50,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
},
{
"type": "VariableDeclarator",
"span": {
"start": 52,
"end": 53,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 52,
"end": 53,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
},
{
"type": "VariableDeclarator",
"span": {
"start": 55,
"end": 56,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 55,
"end": 56,
"ctxt": 0
},
"value": "z",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
],
"interpreter": null
}