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

158 lines
3.6 KiB
JSON

{
"type": "Script",
"span": {
"start": 36,
"end": 99,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 36,
"end": 70,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 42,
"end": 70,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 42,
"end": 43,
"ctxt": 0
},
"value": "C",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ClassExpression",
"identifier": null,
"span": {
"start": 46,
"end": 70,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "PrivateProperty",
"span": {
"start": 58,
"end": 68,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 65,
"end": 67,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 66,
"end": 67,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"value": null,
"typeAnnotation": null,
"isStatic": true,
"decorators": [],
"accessibility": null,
"isOptional": false,
"isOverride": false,
"readonly": false,
"definite": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
"definite": false
}
]
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 78,
"end": 80,
"ctxt": 0
},
"value": "C2",
"optional": false
},
"declare": false,
"span": {
"start": 72,
"end": 99,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "PrivateProperty",
"span": {
"start": 87,
"end": 97,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 94,
"end": 96,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 95,
"end": 96,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"value": null,
"typeAnnotation": null,
"isStatic": true,
"decorators": [],
"accessibility": null,
"isOptional": false,
"isOverride": false,
"readonly": false,
"definite": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}