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

953 lines
28 KiB
JSON

{
"type": "Script",
"span": {
"start": 0,
"end": 387,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 6,
"end": 7,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 0,
"end": 36,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 22,
"end": 34,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 22,
"end": 25,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 25,
"end": 33,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 27,
"end": 33,
"ctxt": 0
},
"kind": "string"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": {
"type": "MemberExpression",
"span": {
"start": 16,
"end": 19,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 16,
"end": 17,
"ctxt": 0
},
"value": "N",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 18,
"end": 19,
"ctxt": 0
},
"value": "E",
"optional": false
}
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 47,
"end": 106,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 54,
"end": 55,
"ctxt": 0
},
"value": "M",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 56,
"end": 106,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 62,
"end": 103,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 75,
"end": 76,
"ctxt": 0
},
"value": "D",
"optional": false
},
"declare": false,
"span": {
"start": 69,
"end": 103,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 89,
"end": 101,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 89,
"end": 92,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 92,
"end": 100,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 94,
"end": 100,
"ctxt": 0
},
"kind": "string"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 85,
"end": 86,
"ctxt": 0
},
"value": "C",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
}
]
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 108,
"end": 168,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 115,
"end": 116,
"ctxt": 0
},
"value": "N",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 117,
"end": 168,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 123,
"end": 166,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 136,
"end": 137,
"ctxt": 0
},
"value": "E",
"optional": false
},
"declare": false,
"span": {
"start": 130,
"end": 166,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 152,
"end": 164,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 152,
"end": 155,
"ctxt": 0
},
"value": "baz",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 155,
"end": 163,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 157,
"end": 163,
"ctxt": 0
},
"kind": "number"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": {
"type": "MemberExpression",
"span": {
"start": 146,
"end": 149,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 146,
"end": 147,
"ctxt": 0
},
"value": "M",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 148,
"end": 149,
"ctxt": 0
},
"value": "D",
"optional": false
}
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
}
]
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 170,
"end": 387,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 177,
"end": 178,
"ctxt": 0
},
"value": "O",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 179,
"end": 387,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 191,
"end": 193,
"ctxt": 0
},
"value": "C2",
"optional": false
},
"declare": false,
"span": {
"start": 185,
"end": 224,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 215,
"end": 222,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 215,
"end": 218,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 218,
"end": 221,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 220,
"end": 221,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 220,
"end": 221,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": {
"type": "MemberExpression",
"span": {
"start": 205,
"end": 209,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 205,
"end": 206,
"ctxt": 0
},
"value": "Q",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 207,
"end": 209,
"ctxt": 0
},
"value": "E2",
"optional": false
}
},
"isAbstract": false,
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 193,
"end": 196,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 194,
"end": 195,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 194,
"end": 195,
"ctxt": 0
},
"value": "T",
"optional": false
},
"constraint": null,
"default": null
}
]
},
"superTypeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 209,
"end": 212,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 210,
"end": 211,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 210,
"end": 211,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
]
},
"implements": []
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 239,
"end": 308,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 246,
"end": 247,
"ctxt": 0
},
"value": "P",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 248,
"end": 308,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 258,
"end": 302,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 271,
"end": 273,
"ctxt": 0
},
"value": "D2",
"optional": false
},
"declare": false,
"span": {
"start": 265,
"end": 302,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 293,
"end": 300,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 293,
"end": 296,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 296,
"end": 299,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 298,
"end": 299,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 298,
"end": 299,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 285,
"end": 287,
"ctxt": 0
},
"value": "C2",
"optional": false
},
"isAbstract": false,
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 273,
"end": 276,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 274,
"end": 275,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 274,
"end": 275,
"ctxt": 0
},
"value": "T",
"optional": false
},
"constraint": null,
"default": null
}
]
},
"superTypeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 287,
"end": 290,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 288,
"end": 289,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 288,
"end": 289,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
]
},
"implements": []
}
}
]
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 314,
"end": 385,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 321,
"end": 322,
"ctxt": 0
},
"value": "Q",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 323,
"end": 385,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 333,
"end": 379,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 346,
"end": 348,
"ctxt": 0
},
"value": "E2",
"optional": false
},
"declare": false,
"span": {
"start": 340,
"end": 379,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 370,
"end": 377,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 370,
"end": 373,
"ctxt": 0
},
"value": "baz",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 373,
"end": 376,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 375,
"end": 376,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 375,
"end": 376,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": {
"type": "MemberExpression",
"span": {
"start": 360,
"end": 364,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 360,
"end": 361,
"ctxt": 0
},
"value": "P",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 362,
"end": 364,
"ctxt": 0
},
"value": "D2",
"optional": false
}
},
"isAbstract": false,
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 348,
"end": 351,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 349,
"end": 350,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 349,
"end": 350,
"ctxt": 0
},
"value": "T",
"optional": false
},
"constraint": null,
"default": null
}
]
},
"superTypeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 364,
"end": 367,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 365,
"end": 366,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 365,
"end": 366,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
]
},
"implements": []
}
}
]
}
}
]
}
}
],
"interpreter": null
}