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

306 lines
7.4 KiB
JSON

{
"type": "Script",
"span": {
"start": 109,
"end": 235,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 115,
"end": 119,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"declare": false,
"span": {
"start": 109,
"end": 132,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 124,
"end": 130,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 124,
"end": 125,
"ctxt": 0
},
"value": "b",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 128,
"end": 129,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"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": 140,
"end": 147,
"ctxt": 0
},
"value": "Derived",
"optional": false
},
"declare": false,
"span": {
"start": 134,
"end": 235,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 165,
"end": 167,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 165,
"end": 166,
"ctxt": 0
},
"value": "b",
"optional": false
},
"value": null,
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 170,
"end": 181,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 170,
"end": 171,
"ctxt": 0
},
"value": "d",
"optional": false
},
"value": {
"type": "MemberExpression",
"span": {
"start": 174,
"end": 180,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 174,
"end": 178,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 179,
"end": 180,
"ctxt": 0
},
"value": "b",
"optional": false
}
},
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "Constructor",
"span": {
"start": 185,
"end": 233,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 185,
"end": 196,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 199,
"end": 233,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 205,
"end": 213,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 205,
"end": 212,
"ctxt": 0
},
"callee": {
"type": "Super",
"span": {
"start": 205,
"end": 210,
"ctxt": 0
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 218,
"end": 229,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 218,
"end": 228,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 218,
"end": 224,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 218,
"end": 222,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 223,
"end": 224,
"ctxt": 0
},
"value": "b",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 227,
"end": 228,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
}
}
]
},
"accessibility": null,
"isOptional": false
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 156,
"end": 160,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}