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

1057 lines
27 KiB
JSON

{
"type": "Script",
"span": {
"start": 52,
"end": 542,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 67,
"end": 69,
"ctxt": 0
},
"value": "AB",
"optional": false
},
"declare": false,
"span": {
"start": 52,
"end": 179,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 76,
"end": 106,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 85,
"end": 88,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 89,
"end": 98,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 89,
"end": 98,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 90,
"end": 98,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 92,
"end": 98,
"ctxt": 0
},
"kind": "string"
}
}
}
}
],
"decorators": [],
"span": {
"start": 76,
"end": 106,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 99,
"end": 105,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 101,
"end": 105,
"ctxt": 0
},
"kind": "void"
}
}
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": true,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 112,
"end": 142,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 121,
"end": 124,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 125,
"end": 134,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 125,
"end": 134,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 126,
"end": 134,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 128,
"end": 134,
"ctxt": 0
},
"kind": "string"
}
}
}
}
],
"decorators": [],
"span": {
"start": 112,
"end": 142,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 135,
"end": 141,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 137,
"end": 141,
"ctxt": 0
},
"kind": "void"
}
}
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": true,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 147,
"end": 177,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 156,
"end": 159,
"ctxt": 0
},
"value": "baz",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 160,
"end": 169,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 160,
"end": 169,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 161,
"end": 169,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 163,
"end": 169,
"ctxt": 0
},
"kind": "string"
}
}
}
}
],
"decorators": [],
"span": {
"start": 147,
"end": 177,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 170,
"end": 176,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 172,
"end": 176,
"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": {
"start": 196,
"end": 199,
"ctxt": 0
},
"value": "AD1",
"optional": false
},
"declare": false,
"span": {
"start": 181,
"end": 215,
"ctxt": 0
},
"decorators": [],
"body": [],
"superClass": {
"type": "Identifier",
"span": {
"start": 208,
"end": 210,
"ctxt": 0
},
"value": "AB",
"optional": false
},
"isAbstract": true,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 232,
"end": 235,
"ctxt": 0
},
"value": "AD2",
"optional": false
},
"declare": false,
"span": {
"start": 217,
"end": 298,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 253,
"end": 278,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 262,
"end": 265,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 266,
"end": 271,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 266,
"end": 271,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 267,
"end": 271,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsLiteralType",
"span": {
"start": 269,
"end": 271,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
"start": 269,
"end": 271,
"ctxt": 0
},
"value": "",
"raw": "''"
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 253,
"end": 278,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 272,
"end": 278,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 274,
"end": 278,
"ctxt": 0
},
"kind": "void"
}
}
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": true,
"isOptional": false,
"isOverride": false
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 244,
"end": 246,
"ctxt": 0
},
"value": "AB",
"optional": false
},
"isAbstract": true,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 315,
"end": 318,
"ctxt": 0
},
"value": "AD3",
"optional": false
},
"declare": false,
"span": {
"start": 300,
"end": 431,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 336,
"end": 365,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 345,
"end": 348,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 349,
"end": 354,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 349,
"end": 354,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 350,
"end": 354,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsLiteralType",
"span": {
"start": 352,
"end": 354,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
"start": 352,
"end": 354,
"ctxt": 0
},
"value": "",
"raw": "''"
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 336,
"end": 365,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 362,
"end": 365,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 355,
"end": 361,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 357,
"end": 361,
"ctxt": 0
},
"kind": "void"
}
}
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": true
},
{
"type": "ClassMethod",
"span": {
"start": 388,
"end": 409,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 397,
"end": 400,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 388,
"end": 409,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 402,
"end": 408,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 404,
"end": 408,
"ctxt": 0
},
"kind": "void"
}
}
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": true,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 414,
"end": 429,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 414,
"end": 417,
"ctxt": 0
},
"value": "baz",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 414,
"end": 429,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 426,
"end": 429,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 419,
"end": 425,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 421,
"end": 425,
"ctxt": 0
},
"kind": "void"
}
}
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 327,
"end": 329,
"ctxt": 0
},
"value": "AB",
"optional": false
},
"isAbstract": true,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 439,
"end": 441,
"ctxt": 0
},
"value": "D4",
"optional": false
},
"declare": false,
"span": {
"start": 433,
"end": 542,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 459,
"end": 487,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 468,
"end": 471,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 472,
"end": 477,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 472,
"end": 477,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 473,
"end": 477,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsLiteralType",
"span": {
"start": 475,
"end": 477,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
"start": 475,
"end": 477,
"ctxt": 0
},
"value": "",
"raw": "''"
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 459,
"end": 487,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 485,
"end": 487,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 478,
"end": 484,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 480,
"end": 484,
"ctxt": 0
},
"kind": "void"
}
}
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": true
},
{
"type": "ClassMethod",
"span": {
"start": 492,
"end": 520,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 501,
"end": 504,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 505,
"end": 510,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 505,
"end": 510,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 506,
"end": 510,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsLiteralType",
"span": {
"start": 508,
"end": 510,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
"start": 508,
"end": 510,
"ctxt": 0
},
"value": "",
"raw": "''"
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 492,
"end": 520,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 518,
"end": 520,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 511,
"end": 517,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 513,
"end": 517,
"ctxt": 0
},
"kind": "void"
}
}
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": true
},
{
"type": "ClassMethod",
"span": {
"start": 525,
"end": 540,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 525,
"end": 528,
"ctxt": 0
},
"value": "baz",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 525,
"end": 540,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 537,
"end": 540,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 530,
"end": 536,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 532,
"end": 536,
"ctxt": 0
},
"kind": "void"
}
}
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 450,
"end": 452,
"ctxt": 0
},
"value": "AB",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}