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

241 lines
5.9 KiB
JSON

{
"type": "Script",
"span": {
"start": 55,
"end": 145,
"ctxt": 0
},
"body": [
{
"type": "ExpressionStatement",
"span": {
"start": 55,
"end": 107,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 55,
"end": 107,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 55,
"end": 74,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 55,
"end": 72,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 55,
"end": 62,
"ctxt": 0
},
"value": "OOOrder",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 63,
"end": 72,
"ctxt": 0
},
"value": "prototype",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 73,
"end": 74,
"ctxt": 0
},
"value": "m",
"optional": false
}
},
"right": {
"type": "FunctionExpression",
"identifier": null,
"params": [],
"decorators": [],
"span": {
"start": 77,
"end": 107,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 89,
"end": 107,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 95,
"end": 105,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 95,
"end": 105,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 95,
"end": 101,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 95,
"end": 99,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 100,
"end": 101,
"ctxt": 0
},
"value": "p",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 104,
"end": 105,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 117,
"end": 124,
"ctxt": 0
},
"value": "OOOrder",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 108,
"end": 145,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 127,
"end": 145,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 133,
"end": 143,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 133,
"end": 143,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 133,
"end": 139,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 133,
"end": 137,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 138,
"end": 139,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 142,
"end": 143,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
],
"interpreter": null
}