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

771 lines
19 KiB
JSON

{
"type": "Script",
"span": {
"start": 24,
"end": 494,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 30,
"end": 31,
"ctxt": 0
},
"value": "A",
"optional": false
},
"declare": false,
"span": {
"start": 24,
"end": 183,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "Constructor",
"span": {
"start": 35,
"end": 65,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 42,
"end": 53,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [
{
"type": "Parameter",
"span": {
"start": 54,
"end": 64,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 54,
"end": 64,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 55,
"end": 64,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 57,
"end": 64,
"ctxt": 0
},
"kind": "boolean"
}
}
}
}
],
"body": null,
"accessibility": "public",
"isOptional": false
},
{
"type": "Constructor",
"span": {
"start": 76,
"end": 108,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 86,
"end": 97,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [
{
"type": "Parameter",
"span": {
"start": 98,
"end": 107,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 98,
"end": 107,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 99,
"end": 107,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 101,
"end": 107,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"body": null,
"accessibility": "protected",
"isOptional": false
},
{
"type": "Constructor",
"span": {
"start": 119,
"end": 149,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 127,
"end": 138,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [
{
"type": "Parameter",
"span": {
"start": 139,
"end": 148,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 139,
"end": 148,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 140,
"end": 148,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 142,
"end": 148,
"ctxt": 0
},
"kind": "string"
}
}
}
}
],
"body": null,
"accessibility": "private",
"isOptional": false
},
{
"type": "Constructor",
"span": {
"start": 151,
"end": 181,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 159,
"end": 170,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 173,
"end": 181,
"ctxt": 0
},
"stmts": []
},
"accessibility": "private",
"isOptional": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 191,
"end": 192,
"ctxt": 0
},
"value": "B",
"optional": false
},
"declare": false,
"span": {
"start": 185,
"end": 287,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "Constructor",
"span": {
"start": 196,
"end": 228,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 206,
"end": 217,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [
{
"type": "Parameter",
"span": {
"start": 218,
"end": 227,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 218,
"end": 227,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 219,
"end": 227,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 221,
"end": 227,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"body": null,
"accessibility": "protected",
"isOptional": false
},
{
"type": "Constructor",
"span": {
"start": 239,
"end": 261,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 239,
"end": 250,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [
{
"type": "Parameter",
"span": {
"start": 251,
"end": 260,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 251,
"end": 260,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 252,
"end": 260,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 254,
"end": 260,
"ctxt": 0
},
"kind": "string"
}
}
}
}
],
"body": null,
"accessibility": null,
"isOptional": false
},
{
"type": "Constructor",
"span": {
"start": 263,
"end": 285,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 263,
"end": 274,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 277,
"end": 285,
"ctxt": 0
},
"stmts": []
},
"accessibility": null,
"isOptional": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 295,
"end": 296,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 289,
"end": 402,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "Constructor",
"span": {
"start": 300,
"end": 332,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 310,
"end": 321,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [
{
"type": "Parameter",
"span": {
"start": 322,
"end": 331,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 322,
"end": 331,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 323,
"end": 331,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 325,
"end": 331,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"body": null,
"accessibility": "protected",
"isOptional": false
},
{
"type": "Constructor",
"span": {
"start": 334,
"end": 366,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 344,
"end": 355,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [
{
"type": "Parameter",
"span": {
"start": 356,
"end": 365,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 356,
"end": 365,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 357,
"end": 365,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 359,
"end": 365,
"ctxt": 0
},
"kind": "string"
}
}
}
}
],
"body": null,
"accessibility": "protected",
"isOptional": false
},
{
"type": "Constructor",
"span": {
"start": 368,
"end": 400,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 378,
"end": 389,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 392,
"end": 400,
"ctxt": 0
},
"stmts": []
},
"accessibility": "protected",
"isOptional": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 410,
"end": 411,
"ctxt": 0
},
"value": "D",
"optional": false
},
"declare": false,
"span": {
"start": 404,
"end": 494,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "Constructor",
"span": {
"start": 415,
"end": 437,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 415,
"end": 426,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [
{
"type": "Parameter",
"span": {
"start": 427,
"end": 436,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 427,
"end": 436,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 428,
"end": 436,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 430,
"end": 436,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"body": null,
"accessibility": null,
"isOptional": false
},
{
"type": "Constructor",
"span": {
"start": 439,
"end": 461,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 439,
"end": 450,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [
{
"type": "Parameter",
"span": {
"start": 451,
"end": 460,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 451,
"end": 460,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 452,
"end": 460,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 454,
"end": 460,
"ctxt": 0
},
"kind": "string"
}
}
}
}
],
"body": null,
"accessibility": null,
"isOptional": false
},
{
"type": "Constructor",
"span": {
"start": 463,
"end": 492,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 470,
"end": 481,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 484,
"end": 492,
"ctxt": 0
},
"stmts": []
},
"accessibility": "public",
"isOptional": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}