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

259 lines
6.6 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 123,
"end": 248,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 129,
"end": 133,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"declare": false,
"span": {
"start": 123,
"end": 182,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "Constructor",
"span": {
"start": 140,
"end": 180,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 140,
"end": 151,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 154,
"end": 180,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 164,
"end": 174,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 164,
"end": 174,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 164,
"end": 170,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 164,
"end": 168,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 169,
"end": 170,
"ctxt": 0
},
"value": "p",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 173,
"end": 174,
"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": 189,
"end": 196,
"ctxt": 0
},
"value": "Derived",
"optional": false
},
"declare": false,
"span": {
"start": 183,
"end": 248,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 216,
"end": 246,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 216,
"end": 217,
"ctxt": 0
},
"value": "m",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 216,
"end": 246,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 220,
"end": 246,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 230,
"end": 240,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 230,
"end": 240,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 230,
"end": 236,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 230,
"end": 234,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 235,
"end": 236,
"ctxt": 0
},
"value": "p",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 239,
"end": 240,
"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": 205,
"end": 209,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}