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

181 lines
4.0 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 66,
"end": 174,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 72,
"end": 74,
"ctxt": 0
},
"value": "C1",
"optional": false
},
"declare": false,
"span": {
"start": 66,
"end": 174,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "AutoAccessor",
"span": {
"start": 81,
"end": 97,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 90,
"end": 91,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 91,
"end": 96,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 93,
"end": 96,
"ctxt": 0
},
"kind": "any"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null
},
{
"type": "AutoAccessor",
"span": {
"start": 102,
"end": 117,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 111,
"end": 112,
"ctxt": 0
},
"value": "b",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 115,
"end": 116,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"accessibility": null
},
{
"type": "AutoAccessor",
"span": {
"start": 122,
"end": 145,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 138,
"end": 139,
"ctxt": 0
},
"value": "c",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 139,
"end": 144,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 141,
"end": 144,
"ctxt": 0
},
"kind": "any"
}
},
"isStatic": true,
"decorators": [],
"accessibility": null
},
{
"type": "AutoAccessor",
"span": {
"start": 150,
"end": 172,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 166,
"end": 167,
"ctxt": 0
},
"value": "d",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 170,
"end": 171,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
},
"typeAnnotation": null,
"isStatic": true,
"decorators": [],
"accessibility": null
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}