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

273 lines
7.0 KiB
JSON

{
"type": "Script",
"span": {
"start": 123,
"end": 319,
"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": 172,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 140,
"end": 170,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 140,
"end": 141,
"ctxt": 0
},
"value": "m",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 140,
"end": 170,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 144,
"end": 170,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 154,
"end": 164,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 154,
"end": 164,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 154,
"end": 160,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 154,
"end": 158,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 159,
"end": 160,
"ctxt": 0
},
"value": "p",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 163,
"end": 164,
"ctxt": 0
},
"value": 1.0
}
}
}
]
},
"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": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 179,
"end": 186,
"ctxt": 0
},
"value": "Derived",
"optional": false
},
"declare": false,
"span": {
"start": 173,
"end": 319,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 206,
"end": 317,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 206,
"end": 207,
"ctxt": 0
},
"value": "m",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 206,
"end": 317,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 210,
"end": 317,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 301,
"end": 311,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 301,
"end": 311,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 301,
"end": 307,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 301,
"end": 305,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 306,
"end": 307,
"ctxt": 0
},
"value": "p",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 310,
"end": 311,
"ctxt": 0
},
"value": 1.0
}
}
}
]
},
"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": 195,
"end": 199,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}