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

189 lines
4.8 KiB
JSON

{
"type": "Script",
"span": {
"start": 34,
"end": 107,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 40,
"end": 41,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 34,
"end": 107,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 48,
"end": 60,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 48,
"end": 54,
"ctxt": 0
},
"value": "method",
"optional": true
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 48,
"end": 60,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 58,
"end": 60,
"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": 65,
"end": 105,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 65,
"end": 70,
"ctxt": 0
},
"value": "other",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 65,
"end": 105,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 73,
"end": 105,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 83,
"end": 99,
"ctxt": 0
},
"expression": {
"type": "OptionalChainingExpression",
"span": {
"start": 83,
"end": 98,
"ctxt": 0
},
"questionDotToken": {
"start": 94,
"end": 95,
"ctxt": 0
},
"base": {
"type": "CallExpression",
"span": {
"start": 83,
"end": 98,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 83,
"end": 94,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 83,
"end": 87,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 88,
"end": 94,
"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
}