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

189 lines
4.8 KiB
JSON

{
"type": "Script",
"span": {
"start": 33,
"end": 106,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 39,
"end": 40,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 33,
"end": 106,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 47,
"end": 59,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 47,
"end": 53,
"ctxt": 0
},
"value": "method",
"optional": true
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 47,
"end": 59,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 57,
"end": 59,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": true,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 64,
"end": 104,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 64,
"end": 69,
"ctxt": 0
},
"value": "other",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 64,
"end": 104,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 72,
"end": 104,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 82,
"end": 98,
"ctxt": 0
},
"expression": {
"type": "OptionalChainingExpression",
"span": {
"start": 82,
"end": 97,
"ctxt": 0
},
"questionDotToken": {
"start": 93,
"end": 94,
"ctxt": 0
},
"expr": {
"type": "CallExpression",
"span": {
"start": 82,
"end": 97,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 82,
"end": 93,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 82,
"end": 86,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 87,
"end": 93,
"ctxt": 0
},
"value": "method",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}