swc/crates/swc_ecma_parser/tests/tsc/instanceMemberWithComputedPropertyName2.json
2022-03-22 07:54:08 +00:00

151 lines
3.2 KiB
JSON

{
"type": "Script",
"span": {
"start": 109,
"end": 164,
"ctxt": 0
},
"body": [
{
"type": "ExpressionStatement",
"span": {
"start": 109,
"end": 122,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 109,
"end": 121,
"ctxt": 0
},
"value": "use strict",
"raw": "\"use strict\""
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 123,
"end": 135,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 129,
"end": 134,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 129,
"end": 130,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 133,
"end": 134,
"ctxt": 0
},
"value": 1.0
},
"definite": false
}
]
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 142,
"end": 143,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 136,
"end": 164,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 150,
"end": 162,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 150,
"end": 153,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 151,
"end": 152,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 153,
"end": 161,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 155,
"end": 161,
"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
}