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

274 lines
7.7 KiB
JSON

{
"type": "Script",
"span": {
"start": 80,
"end": 238,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 80,
"end": 91,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 84,
"end": 90,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 84,
"end": 85,
"ctxt": 0
},
"value": "A",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 88,
"end": 90,
"ctxt": 0
},
"properties": []
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 92,
"end": 238,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 92,
"end": 237,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 92,
"end": 95,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 92,
"end": 93,
"ctxt": 0
},
"value": "A",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 94,
"end": 95,
"ctxt": 0
},
"value": "B",
"optional": false
}
},
"right": {
"type": "ClassExpression",
"identifier": null,
"span": {
"start": 98,
"end": 237,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 110,
"end": 235,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 110,
"end": 111,
"ctxt": 0
},
"value": "m",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 110,
"end": 235,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 114,
"end": 235,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 156,
"end": 167,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 160,
"end": 166,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 160,
"end": 161,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrayExpression",
"span": {
"start": 164,
"end": 166,
"ctxt": 0
},
"elements": []
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 208,
"end": 214,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 212,
"end": 213,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 212,
"end": 213,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 223,
"end": 229,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 223,
"end": 228,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 223,
"end": 224,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 227,
"end": 228,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
}
]
},
"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": []
}
}
}
],
"interpreter": null
}