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

617 lines
15 KiB
JSON

{
"type": "Script",
"span": {
"start": 103,
"end": 354,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 109,
"end": 110,
"ctxt": 0
},
"value": "B",
"optional": false
},
"declare": false,
"span": {
"start": 103,
"end": 145,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 117,
"end": 127,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 117,
"end": 120,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 122,
"end": 123,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 122,
"end": 123,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 117,
"end": 127,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 125,
"end": 127,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 132,
"end": 143,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 132,
"end": 136,
"ctxt": 0
},
"value": "fooo",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 138,
"end": 139,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 138,
"end": 139,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 132,
"end": 143,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 141,
"end": 143,
"ctxt": 0
},
"stmts": []
},
"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": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 153,
"end": 154,
"ctxt": 0
},
"value": "D",
"optional": false
},
"declare": false,
"span": {
"start": 147,
"end": 255,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 171,
"end": 181,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 171,
"end": 174,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 176,
"end": 177,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 176,
"end": 177,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 171,
"end": 181,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 179,
"end": 181,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 207,
"end": 218,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 207,
"end": 211,
"ctxt": 0
},
"value": "fooo",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 213,
"end": 214,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 213,
"end": 214,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 207,
"end": 218,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 216,
"end": 218,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 244,
"end": 253,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 244,
"end": 247,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 248,
"end": 249,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 248,
"end": 249,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 244,
"end": 253,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 251,
"end": 253,
"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": {
"start": 163,
"end": 164,
"ctxt": 0
},
"value": "B",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 263,
"end": 264,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 257,
"end": 354,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 271,
"end": 280,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 271,
"end": 274,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 271,
"end": 280,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 278,
"end": 280,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 306,
"end": 317,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 306,
"end": 310,
"ctxt": 0
},
"value": "fooo",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 312,
"end": 313,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 312,
"end": 313,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 306,
"end": 317,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 315,
"end": 317,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 343,
"end": 352,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 343,
"end": 346,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 347,
"end": 348,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 347,
"end": 348,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 343,
"end": 352,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 350,
"end": 352,
"ctxt": 0
},
"stmts": []
},
"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": []
}
],
"interpreter": null
}