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

177 lines
4.0 KiB
JSON

{
"type": "Script",
"span": {
"start": 28,
"end": 89,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 34,
"end": 35,
"ctxt": 0
},
"value": "A",
"optional": false
},
"declare": false,
"span": {
"start": 28,
"end": 89,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "PrivateProperty",
"span": {
"start": 40,
"end": 49,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 40,
"end": 44,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 41,
"end": 44,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 47,
"end": 48,
"ctxt": 0
},
"value": 1.0
},
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"computed": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 52,
"end": 74,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 59,
"end": 63,
"ctxt": 0
},
"value": "inst",
"optional": false
},
"value": {
"type": "NewExpression",
"span": {
"start": 66,
"end": 73,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 70,
"end": 71,
"ctxt": 0
},
"value": "A",
"optional": false
},
"arguments": [],
"typeArguments": null
},
"typeAnnotation": null,
"isStatic": true,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "PrivateProperty",
"span": {
"start": 77,
"end": 87,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 77,
"end": 82,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 78,
"end": 82,
"ctxt": 0
},
"value": "prop",
"optional": false
}
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 85,
"end": 86,
"ctxt": 0
},
"value": 2.0
},
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"computed": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"definite": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}