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

132 lines
2.9 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 1,
"end": 58,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 7,
"end": 15,
"ctxt": 0
},
"value": "abstract",
"optional": false
},
"declare": false,
"span": {
"start": 1,
"end": 43,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 22,
"end": 41,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 22,
"end": 25,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 22,
"end": 41,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 28,
"end": 41,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 30,
"end": 39,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 37,
"end": 38,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ExpressionStatement",
"span": {
"start": 45,
"end": 58,
"ctxt": 0
},
"expression": {
"type": "NewExpression",
"span": {
"start": 45,
"end": 57,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 49,
"end": 57,
"ctxt": 0
},
"value": "abstract",
"optional": false
},
"arguments": null,
"typeArguments": null
}
}
],
"interpreter": null
}