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

171 lines
3.9 KiB
JSON

{
"type": "Script",
"span": {
"start": 0,
"end": 59,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 6,
"end": 7,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 0,
"end": 59,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "Constructor",
"span": {
"start": 13,
"end": 32,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 13,
"end": 24,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [
{
"type": "Parameter",
"span": {
"start": 25,
"end": 30,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "AssignmentPattern",
"span": {
"start": 25,
"end": 30,
"ctxt": 0
},
"left": {
"type": "Identifier",
"span": {
"start": 25,
"end": 26,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 29,
"end": 30,
"ctxt": 0
},
"value": 4.0
},
"typeAnnotation": null
}
}
],
"body": null,
"accessibility": null,
"isOptional": false
},
{
"type": "Constructor",
"span": {
"start": 36,
"end": 57,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 36,
"end": 47,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [
{
"type": "Parameter",
"span": {
"start": 48,
"end": 49,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 48,
"end": 49,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
}
},
{
"type": "Parameter",
"span": {
"start": 51,
"end": 52,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 51,
"end": 52,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
}
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 54,
"end": 57,
"ctxt": 0
},
"stmts": []
},
"accessibility": null,
"isOptional": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}