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

248 lines
6.6 KiB
JSON

{
"type": "Script",
"span": {
"start": 56,
"end": 154,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 56,
"end": 134,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 60,
"end": 134,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 60,
"end": 63,
"ctxt": 0
},
"value": "app",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "FunctionExpression",
"identifier": null,
"params": [],
"decorators": [],
"span": {
"start": 66,
"end": 134,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 77,
"end": 134,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 83,
"end": 100,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 87,
"end": 99,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 87,
"end": 92,
"ctxt": 0
},
"value": "_this",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ThisExpression",
"span": {
"start": 95,
"end": 99,
"ctxt": 0
}
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 105,
"end": 132,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 105,
"end": 132,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 105,
"end": 115,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 105,
"end": 110,
"ctxt": 0
},
"value": "_this",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 111,
"end": 115,
"ctxt": 0
},
"value": "swap",
"optional": false
}
},
"right": {
"type": "FunctionExpression",
"identifier": null,
"params": [],
"decorators": [],
"span": {
"start": 118,
"end": 132,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 129,
"end": 132,
"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": 135,
"end": 152,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 139,
"end": 152,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 139,
"end": 140,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NewExpression",
"span": {
"start": 143,
"end": 152,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 147,
"end": 150,
"ctxt": 0
},
"value": "app",
"optional": false
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 153,
"end": 154,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 153,
"end": 154,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
],
"interpreter": null
}