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

248 lines
6.5 KiB
JSON

{
"type": "Script",
"span": {
"start": 55,
"end": 153,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 55,
"end": 133,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 59,
"end": 133,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 59,
"end": 62,
"ctxt": 0
},
"value": "app",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "FunctionExpression",
"identifier": null,
"params": [],
"decorators": [],
"span": {
"start": 65,
"end": 133,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 76,
"end": 133,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 82,
"end": 99,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 86,
"end": 98,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 86,
"end": 91,
"ctxt": 0
},
"value": "_this",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ThisExpression",
"span": {
"start": 94,
"end": 98,
"ctxt": 0
}
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 104,
"end": 131,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 104,
"end": 131,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 104,
"end": 114,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 104,
"end": 109,
"ctxt": 0
},
"value": "_this",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 110,
"end": 114,
"ctxt": 0
},
"value": "swap",
"optional": false
}
},
"right": {
"type": "FunctionExpression",
"identifier": null,
"params": [],
"decorators": [],
"span": {
"start": 117,
"end": 131,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 128,
"end": 131,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 134,
"end": 151,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 138,
"end": 151,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 138,
"end": 139,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NewExpression",
"span": {
"start": 142,
"end": 151,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 146,
"end": 149,
"ctxt": 0
},
"value": "app",
"optional": false
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 152,
"end": 153,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 152,
"end": 153,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
],
"interpreter": null
}