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

283 lines
6.5 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
2022-02-04 14:17:42 +03:00
"start": 52,
"end": 218,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 67,
"end": 71,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"declare": false,
"span": {
2022-02-04 14:17:42 +03:00
"start": 52,
"end": 130,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
2022-02-04 14:17:42 +03:00
"start": 78,
"end": 102,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 87,
"end": 90,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
2022-02-04 14:17:42 +03:00
"start": 78,
"end": 102,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 92,
"end": 101,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 94,
"end": 101,
"ctxt": 0
},
"kind": "unknown"
}
}
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": true,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
2022-02-04 14:17:42 +03:00
"start": 107,
"end": 128,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 116,
"end": 119,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
2022-02-04 14:17:42 +03:00
"start": 107,
"end": 128,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 121,
"end": 127,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 123,
"end": 127,
"ctxt": 0
},
"kind": "void"
}
}
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": true,
"isOptional": false,
"isOverride": false
}
],
"superClass": null,
"isAbstract": true,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 147,
"end": 150,
"ctxt": 0
},
"value": "Sub",
"optional": false
},
"declare": false,
"span": {
2022-02-04 14:17:42 +03:00
"start": 132,
"end": 218,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
2022-02-04 14:17:42 +03:00
"start": 170,
"end": 202,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 188,
"end": 191,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
2022-02-04 14:17:42 +03:00
"start": 170,
"end": 202,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 193,
"end": 201,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 195,
"end": 201,
"ctxt": 0
},
"kind": "number"
}
}
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": true,
"isOptional": false,
"isOverride": true
},
{
"type": "ClassMethod",
"span": {
2022-02-04 14:17:42 +03:00
"start": 207,
"end": 216,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 207,
"end": 210,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
2022-02-04 14:17:42 +03:00
"start": 207,
"end": 216,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
2022-02-04 14:17:42 +03:00
"start": 213,
"end": 216,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 159,
"end": 163,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"isAbstract": true,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}