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

152 lines
3.2 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 110,
"end": 165,
"ctxt": 0
},
"body": [
{
"type": "ExpressionStatement",
"span": {
"start": 110,
"end": 123,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 110,
"end": 122,
"ctxt": 0
},
"value": "use strict",
"raw": "\"use strict\""
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 124,
"end": 136,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 130,
"end": 135,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 130,
"end": 131,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 134,
"end": 135,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"definite": false
}
]
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 143,
"end": 144,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 137,
"end": 165,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 151,
"end": 163,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 151,
"end": 154,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 152,
"end": 153,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 154,
"end": 162,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 156,
"end": 162,
"ctxt": 0
},
"kind": "string"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}