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

133 lines
2.6 KiB
JSON

{
"type": "Script",
"span": {
"start": 1,
"end": 105,
"ctxt": 0
},
"body": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 10,
"end": 13,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 1,
"end": 19,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 16,
"end": 19,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "VariableDeclaration",
"span": {
"start": 21,
"end": 39,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 25,
"end": 38,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 25,
"end": 26,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NewExpression",
"span": {
"start": 29,
"end": 38,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 33,
"end": 36,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 88,
"end": 89,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 82,
"end": 105,
"ctxt": 0
},
"decorators": [],
"body": [],
"superClass": {
"type": "Identifier",
"span": {
"start": 98,
"end": 101,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}