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

512 lines
13 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 0,
"end": 601,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 6,
"end": 10,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"declare": false,
"span": {
"start": 0,
"end": 149,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 17,
"end": 44,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 34,
"end": 35,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 35,
"end": 43,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 37,
"end": 43,
"ctxt": 0
},
"kind": "string"
}
},
"isStatic": true,
"decorators": [],
"accessibility": "protected",
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassMethod",
"span": {
"start": 49,
"end": 147,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 56,
"end": 68,
"ctxt": 0
},
"value": "staticMethod",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 49,
"end": 147,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 71,
"end": 147,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 81,
"end": 88,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 81,
"end": 87,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 81,
"end": 85,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 86,
"end": 87,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": true,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 157,
"end": 165,
"ctxt": 0
},
"value": "Derived1",
"optional": false
},
"declare": false,
"span": {
"start": 151,
"end": 357,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 185,
"end": 355,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 192,
"end": 205,
"ctxt": 0
},
"value": "staticMethod1",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 185,
"end": 355,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 208,
"end": 355,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 218,
"end": 225,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 218,
"end": 224,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 218,
"end": 222,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 223,
"end": 224,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 308,
"end": 316,
"ctxt": 0
},
"expression": {
"type": "SuperPropExpression",
"span": {
"start": 308,
"end": 315,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 308,
"end": 313,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 314,
"end": 315,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": true,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 174,
"end": 178,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 365,
"end": 373,
"ctxt": 0
},
"value": "Derived2",
"optional": false
},
"declare": false,
"span": {
"start": 359,
"end": 601,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 397,
"end": 424,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 414,
"end": 415,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 415,
"end": 423,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 417,
"end": 423,
"ctxt": 0
},
"kind": "string"
}
},
"isStatic": true,
"decorators": [],
"accessibility": "protected",
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassMethod",
"span": {
"start": 429,
"end": 599,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 436,
"end": 449,
"ctxt": 0
},
"value": "staticMethod3",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 429,
"end": 599,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 452,
"end": 599,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 462,
"end": 469,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 462,
"end": 468,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 462,
"end": 466,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 467,
"end": 468,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 552,
"end": 560,
"ctxt": 0
},
"expression": {
"type": "SuperPropExpression",
"span": {
"start": 552,
"end": 559,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 552,
"end": 557,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 558,
"end": 559,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": true,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 382,
"end": 390,
"ctxt": 0
},
"value": "Derived1",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}