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

132 lines
3.1 KiB
JSON

{
"type": "Script",
"span": {
"start": 0,
"end": 39,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 14,
"end": 15,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": true,
"span": {
"start": 0,
"end": 39,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 20,
"end": 37,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 20,
"end": 23,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 24,
"end": 29,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "AssignmentPattern",
"span": {
"start": 24,
"end": 29,
"ctxt": 0
},
"left": {
"type": "Identifier",
"span": {
"start": 24,
"end": 25,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 28,
"end": 29,
"ctxt": 0
},
"value": 1.0
},
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 20,
"end": 37,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 30,
"end": 36,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 32,
"end": 36,
"ctxt": 0
},
"kind": "void"
}
}
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}