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

390 lines
9.5 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 116,
"end": 282,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 122,
"end": 123,
"ctxt": 0
},
"value": "A",
"optional": false
},
"declare": false,
"span": {
"start": 116,
"end": 149,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 130,
"end": 147,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 130,
"end": 136,
"ctxt": 0
},
"value": "member",
"optional": false
},
"value": {
"type": "NewExpression",
"span": {
"start": 139,
"end": 146,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 143,
"end": 144,
"ctxt": 0
},
"value": "Q",
"optional": false
},
"arguments": [],
"typeArguments": null
},
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 156,
"end": 157,
"ctxt": 0
},
"value": "Q",
"optional": false
},
"declare": false,
"span": {
"start": 150,
"end": 173,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 164,
"end": 171,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 164,
"end": 165,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 168,
"end": 170,
"ctxt": 0
},
"value": 42.0,
"raw": "42"
},
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ExpressionStatement",
"span": {
"start": 174,
"end": 254,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 174,
"end": 254,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 174,
"end": 188,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 174,
"end": 180,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 181,
"end": 188,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"right": {
"type": "ClassExpression",
"identifier": {
"type": "Identifier",
"span": {
"start": 197,
"end": 198,
"ctxt": 0
},
"value": "Q",
"optional": false
},
"span": {
"start": 191,
"end": 254,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "Constructor",
"span": {
"start": 205,
"end": 252,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 205,
"end": 216,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 219,
"end": 252,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 229,
"end": 246,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 229,
"end": 245,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 229,
"end": 235,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 229,
"end": 233,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 234,
"end": 235,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"right": {
"type": "NewExpression",
"span": {
"start": 238,
"end": 245,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 242,
"end": 243,
"ctxt": 0
},
"value": "A",
"optional": false
},
"arguments": [],
"typeArguments": null
}
}
}
]
},
"accessibility": null,
"isOptional": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 255,
"end": 282,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 255,
"end": 281,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 255,
"end": 277,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 255,
"end": 269,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 255,
"end": 261,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 262,
"end": 269,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 270,
"end": 277,
"ctxt": 0
},
"value": "Another",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 280,
"end": 281,
"ctxt": 0
},
"value": "Q",
"optional": false
}
}
}
],
"interpreter": null
}