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

202 lines
4.6 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 53,
"end": 193,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 59,
"end": 60,
"ctxt": 0
},
"value": "B",
"optional": false
},
"declare": false,
"span": {
"start": 53,
"end": 63,
"ctxt": 0
},
"decorators": [],
"body": [],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "EmptyStatement",
"span": {
"start": 63,
"end": 64,
"ctxt": 0
}
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 71,
"end": 72,
"ctxt": 0
},
"value": "A",
"optional": false
},
"declare": false,
"span": {
"start": 65,
"end": 193,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "PrivateProperty",
"span": {
"start": 89,
"end": 92,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 89,
"end": 91,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 90,
"end": 91,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"value": null,
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"computed": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"definite": false
},
{
"type": "Constructor",
"span": {
"start": 97,
"end": 191,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 97,
"end": 108,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 111,
"end": 191,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 121,
"end": 128,
"ctxt": 0
},
"expression": {
"type": "UnaryExpression",
"span": {
"start": 121,
"end": 127,
"ctxt": 0
},
"operator": "void",
"argument": {
"type": "NumericLiteral",
"span": {
"start": 126,
"end": 127,
"ctxt": 0
},
"value": 0.0
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 177,
"end": 185,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 177,
"end": 184,
"ctxt": 0
},
"callee": {
"type": "Super",
"span": {
"start": 177,
"end": 182,
"ctxt": 0
}
},
"arguments": [],
"typeArguments": null
}
}
]
},
"accessibility": null,
"isOptional": false
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 81,
"end": 82,
"ctxt": 0
},
"value": "B",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}