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

175 lines
3.9 KiB
JSON

{
"type": "Script",
"span": {
"start": 37,
"end": 98,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 43,
"end": 44,
"ctxt": 0
},
"value": "A",
"optional": false
},
"declare": false,
"span": {
"start": 37,
"end": 98,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "PrivateProperty",
"span": {
"start": 49,
"end": 58,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 49,
"end": 53,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 50,
"end": 53,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 56,
"end": 57,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"accessibility": null,
"isOptional": false,
"isOverride": false,
"readonly": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 61,
"end": 83,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 68,
"end": 72,
"ctxt": 0
},
"value": "inst",
"optional": false
},
"value": {
"type": "NewExpression",
"span": {
"start": 75,
"end": 82,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 79,
"end": 80,
"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": 86,
"end": 96,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 86,
"end": 91,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 87,
"end": 91,
"ctxt": 0
},
"value": "prop",
"optional": false
}
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 94,
"end": 95,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
},
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"accessibility": null,
"isOptional": false,
"isOverride": false,
"readonly": false,
"definite": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}