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

742 lines
19 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
2022-02-04 14:17:42 +03:00
"start": 51,
"end": 437,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 57,
"end": 58,
"ctxt": 0
},
"value": "B",
"optional": false
},
"declare": false,
"span": {
2022-02-04 14:17:42 +03:00
"start": 51,
"end": 76,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
2022-02-04 14:17:42 +03:00
"start": 65,
"end": 74,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 65,
"end": 66,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 66,
"end": 74,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 68,
"end": 74,
"ctxt": 0
},
"kind": "string"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 84,
"end": 85,
"ctxt": 0
},
"value": "D",
"optional": false
},
"declare": false,
"span": {
2022-02-04 14:17:42 +03:00
"start": 78,
"end": 176,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "Constructor",
"span": {
2022-02-04 14:17:42 +03:00
"start": 102,
"end": 174,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 102,
"end": 113,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [
{
"type": "TsParameterProperty",
"span": {
2022-02-04 14:17:42 +03:00
"start": 114,
"end": 130,
"ctxt": 0
},
"decorators": [],
"accessibility": "public",
"override": false,
"readonly": false,
"param": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 121,
"end": 130,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 122,
"end": 130,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 124,
"end": 130,
"ctxt": 0
},
"kind": "string"
}
}
}
},
{
"type": "TsParameterProperty",
"span": {
2022-02-04 14:17:42 +03:00
"start": 132,
"end": 148,
"ctxt": 0
},
"decorators": [],
"accessibility": "public",
"override": false,
"readonly": false,
"param": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 139,
"end": 148,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 140,
"end": 148,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 142,
"end": 148,
"ctxt": 0
},
"kind": "string"
}
}
}
}
],
"body": {
"type": "BlockStatement",
"span": {
2022-02-04 14:17:42 +03:00
"start": 150,
"end": 174,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
2022-02-04 14:17:42 +03:00
"start": 160,
"end": 168,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
2022-02-04 14:17:42 +03:00
"start": 160,
"end": 167,
"ctxt": 0
},
"callee": {
"type": "Super",
"span": {
2022-02-04 14:17:42 +03:00
"start": 160,
"end": 165,
"ctxt": 0
}
},
"arguments": [],
"typeArguments": null
}
}
]
},
"accessibility": null,
"isOptional": false
}
],
"superClass": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 94,
"end": 95,
"ctxt": 0
},
"value": "B",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 184,
"end": 186,
"ctxt": 0
},
"value": "BB",
"optional": false
},
"declare": false,
"span": {
2022-02-04 14:17:42 +03:00
"start": 178,
"end": 233,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "Constructor",
"span": {
2022-02-04 14:17:42 +03:00
"start": 193,
"end": 231,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 193,
"end": 204,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [
{
"type": "TsParameterProperty",
"span": {
2022-02-04 14:17:42 +03:00
"start": 205,
"end": 221,
"ctxt": 0
},
"decorators": [],
"accessibility": "public",
"override": false,
"readonly": false,
"param": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 212,
"end": 221,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 213,
"end": 221,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 215,
"end": 221,
"ctxt": 0
},
"kind": "string"
}
}
}
}
],
"body": {
"type": "BlockStatement",
"span": {
2022-02-04 14:17:42 +03:00
"start": 223,
"end": 231,
"ctxt": 0
},
"stmts": []
},
"accessibility": null,
"isOptional": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 241,
"end": 243,
"ctxt": 0
},
"value": "DD",
"optional": false
},
"declare": false,
"span": {
2022-02-04 14:17:42 +03:00
"start": 235,
"end": 317,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "Constructor",
"span": {
2022-02-04 14:17:42 +03:00
"start": 261,
"end": 315,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 261,
"end": 272,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [
{
"type": "TsParameterProperty",
"span": {
2022-02-04 14:17:42 +03:00
"start": 273,
"end": 289,
"ctxt": 0
},
"decorators": [],
"accessibility": "public",
"override": false,
"readonly": false,
"param": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 280,
"end": 289,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 281,
"end": 289,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 283,
"end": 289,
"ctxt": 0
},
"kind": "string"
}
}
}
}
],
"body": {
"type": "BlockStatement",
"span": {
2022-02-04 14:17:42 +03:00
"start": 291,
"end": 315,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
2022-02-04 14:17:42 +03:00
"start": 301,
"end": 309,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
2022-02-04 14:17:42 +03:00
"start": 301,
"end": 309,
"ctxt": 0
},
"callee": {
"type": "Super",
"span": {
2022-02-04 14:17:42 +03:00
"start": 301,
"end": 306,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 307,
"end": 308,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
],
"typeArguments": null
}
}
]
},
"accessibility": null,
"isOptional": false
}
],
"superClass": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 252,
"end": 254,
"ctxt": 0
},
"value": "BB",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 325,
"end": 328,
"ctxt": 0
},
"value": "DDD",
"optional": false
},
"declare": false,
"span": {
2022-02-04 14:17:42 +03:00
"start": 319,
"end": 437,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
2022-02-04 14:17:42 +03:00
"start": 346,
"end": 363,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 353,
"end": 354,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 354,
"end": 362,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 356,
"end": 362,
"ctxt": 0
},
"kind": "string"
}
},
"isStatic": false,
"decorators": [],
"accessibility": "public",
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "Constructor",
"span": {
2022-02-04 14:17:42 +03:00
"start": 369,
"end": 435,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 369,
"end": 380,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [
{
"type": "Parameter",
"span": {
2022-02-04 14:17:42 +03:00
"start": 381,
"end": 390,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 381,
"end": 390,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
2022-02-04 14:17:42 +03:00
"start": 382,
"end": 390,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
2022-02-04 14:17:42 +03:00
"start": 384,
"end": 390,
"ctxt": 0
},
"kind": "string"
}
}
}
}
],
"body": {
"type": "BlockStatement",
"span": {
2022-02-04 14:17:42 +03:00
"start": 392,
"end": 435,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
2022-02-04 14:17:42 +03:00
"start": 402,
"end": 410,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
2022-02-04 14:17:42 +03:00
"start": 402,
"end": 410,
"ctxt": 0
},
"callee": {
"type": "Super",
"span": {
2022-02-04 14:17:42 +03:00
"start": 402,
"end": 407,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 408,
"end": 409,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
2022-02-04 14:17:42 +03:00
"start": 419,
"end": 429,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
2022-02-04 14:17:42 +03:00
"start": 419,
"end": 429,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
2022-02-04 14:17:42 +03:00
"start": 419,
"end": 425,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
2022-02-04 14:17:42 +03:00
"start": 419,
"end": 423,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 424,
"end": 425,
"ctxt": 0
},
"value": "a",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 428,
"end": 429,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
}
]
},
"accessibility": null,
"isOptional": false
}
],
"superClass": {
"type": "Identifier",
"span": {
2022-02-04 14:17:42 +03:00
"start": 337,
"end": 339,
"ctxt": 0
},
"value": "BB",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}