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

512 lines
13 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 1,
"end": 602,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 7,
"end": 11,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"declare": false,
"span": {
"start": 1,
"end": 150,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 18,
"end": 45,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 35,
"end": 36,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 36,
"end": 44,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 38,
"end": 44,
"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": 50,
"end": 148,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 57,
"end": 69,
"ctxt": 0
},
"value": "staticMethod",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 50,
"end": 148,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 72,
"end": 148,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 82,
"end": 89,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 82,
"end": 88,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 82,
"end": 86,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 87,
"end": 88,
"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": 158,
"end": 166,
"ctxt": 0
},
"value": "Derived1",
"optional": false
},
"declare": false,
"span": {
"start": 152,
"end": 358,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 186,
"end": 356,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 193,
"end": 206,
"ctxt": 0
},
"value": "staticMethod1",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 186,
"end": 356,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 209,
"end": 356,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 219,
"end": 226,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 219,
"end": 225,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 219,
"end": 223,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 224,
"end": 225,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 309,
"end": 317,
"ctxt": 0
},
"expression": {
"type": "SuperPropExpression",
"span": {
"start": 309,
"end": 316,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 309,
"end": 314,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 315,
"end": 316,
"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": 175,
"end": 179,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 366,
"end": 374,
"ctxt": 0
},
"value": "Derived2",
"optional": false
},
"declare": false,
"span": {
"start": 360,
"end": 602,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 398,
"end": 425,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 415,
"end": 416,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 416,
"end": 424,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 418,
"end": 424,
"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": 430,
"end": 600,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 437,
"end": 450,
"ctxt": 0
},
"value": "staticMethod3",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 430,
"end": 600,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 453,
"end": 600,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 463,
"end": 470,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 463,
"end": 469,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 463,
"end": 467,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 468,
"end": 469,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 553,
"end": 561,
"ctxt": 0
},
"expression": {
"type": "SuperPropExpression",
"span": {
"start": 553,
"end": 560,
"ctxt": 0
},
"obj": {
"type": "Super",
"span": {
"start": 553,
"end": 558,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 559,
"end": 560,
"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": 383,
"end": 391,
"ctxt": 0
},
"value": "Derived1",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}