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

96 lines
2.1 KiB
JSON

{
"type": "Script",
"span": {
"start": 158,
"end": 184,
"ctxt": 0
},
"body": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 167,
"end": 168,
"ctxt": 0
},
"value": "f",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 169,
"end": 180,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "ObjectPattern",
"span": {
"start": 169,
"end": 180,
"ctxt": 0
},
"properties": [
{
"type": "AssignmentPatternProperty",
"span": {
"start": 171,
"end": 178,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 171,
"end": 172,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 175,
"end": 178,
"ctxt": 0
},
"value": "a",
"raw": "\"a\""
}
}
],
"optional": false,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 158,
"end": 184,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 182,
"end": 184,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
],
"interpreter": null
}