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

259 lines
6.6 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 124,
"end": 249,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 130,
"end": 134,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"declare": false,
"span": {
"start": 124,
"end": 183,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "Constructor",
"span": {
"start": 141,
"end": 181,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 141,
"end": 152,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 155,
"end": 181,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 165,
"end": 175,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 165,
"end": 175,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 165,
"end": 171,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 165,
"end": 169,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 170,
"end": 171,
"ctxt": 0
},
"value": "p",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 174,
"end": 175,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
}
]
},
"accessibility": null,
"isOptional": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 190,
"end": 197,
"ctxt": 0
},
"value": "Derived",
"optional": false
},
"declare": false,
"span": {
"start": 184,
"end": 249,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 217,
"end": 247,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 217,
"end": 218,
"ctxt": 0
},
"value": "m",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 217,
"end": 247,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 221,
"end": 247,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 231,
"end": 241,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 231,
"end": 241,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 231,
"end": 237,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 231,
"end": 235,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 236,
"end": 237,
"ctxt": 0
},
"value": "p",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 240,
"end": 241,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 206,
"end": 210,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}