swc/crates/swc_ecma_parser/tests/tsc/classAbstractAsIdentifier.json
2022-04-05 12:46:35 +00:00

132 lines
2.9 KiB
JSON

{
"type": "Script",
"span": {
"start": 0,
"end": 57,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 6,
"end": 14,
"ctxt": 0
},
"value": "abstract",
"optional": false
},
"declare": false,
"span": {
"start": 0,
"end": 42,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 21,
"end": 40,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 21,
"end": 24,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 21,
"end": 40,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 27,
"end": 40,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 29,
"end": 38,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 36,
"end": 37,
"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": 44,
"end": 57,
"ctxt": 0
},
"expression": {
"type": "NewExpression",
"span": {
"start": 44,
"end": 56,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 48,
"end": 56,
"ctxt": 0
},
"value": "abstract",
"optional": false
},
"arguments": null,
"typeArguments": null
}
}
],
"interpreter": null
}