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

781 lines
18 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 49,
"end": 599,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 64,
"end": 66,
"ctxt": 0
},
"value": "C1",
"optional": false
},
"declare": false,
"span": {
"start": 49,
"end": 464,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "AutoAccessor",
"span": {
"start": 73,
"end": 89,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 82,
"end": 83,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 83,
"end": 88,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 85,
"end": 88,
"ctxt": 0
},
"kind": "any"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null
},
{
"type": "AutoAccessor",
"span": {
"start": 94,
"end": 117,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 110,
"end": 111,
"ctxt": 0
},
"value": "b",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 111,
"end": 116,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 113,
"end": 116,
"ctxt": 0
},
"kind": "any"
}
},
"isStatic": false,
"decorators": [],
"accessibility": "public"
},
{
"type": "AutoAccessor",
"span": {
"start": 122,
"end": 146,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 139,
"end": 140,
"ctxt": 0
},
"value": "c",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 140,
"end": 145,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 142,
"end": 145,
"ctxt": 0
},
"kind": "any"
}
},
"isStatic": false,
"decorators": [],
"accessibility": "private"
},
{
"type": "AutoAccessor",
"span": {
"start": 151,
"end": 177,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 170,
"end": 171,
"ctxt": 0
},
"value": "d",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 171,
"end": 176,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 173,
"end": 176,
"ctxt": 0
},
"kind": "any"
}
},
"isStatic": false,
"decorators": [],
"accessibility": "protected"
},
{
"type": "AutoAccessor",
"span": {
"start": 182,
"end": 207,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 200,
"end": 201,
"ctxt": 0
},
"value": "e",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 201,
"end": 206,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 203,
"end": 206,
"ctxt": 0
},
"kind": "any"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null
},
{
"type": "AutoAccessor",
"span": {
"start": 212,
"end": 235,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 228,
"end": 229,
"ctxt": 0
},
"value": "f",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 229,
"end": 234,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 231,
"end": 234,
"ctxt": 0
},
"kind": "any"
}
},
"isStatic": true,
"decorators": [],
"accessibility": null
},
{
"type": "AutoAccessor",
"span": {
"start": 240,
"end": 270,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 263,
"end": 264,
"ctxt": 0
},
"value": "g",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 264,
"end": 269,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 266,
"end": 269,
"ctxt": 0
},
"kind": "any"
}
},
"isStatic": true,
"decorators": [],
"accessibility": "public"
},
{
"type": "AutoAccessor",
"span": {
"start": 275,
"end": 306,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 299,
"end": 300,
"ctxt": 0
},
"value": "h",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 300,
"end": 305,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 302,
"end": 305,
"ctxt": 0
},
"kind": "any"
}
},
"isStatic": true,
"decorators": [],
"accessibility": "private"
},
{
"type": "AutoAccessor",
"span": {
"start": 311,
"end": 344,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 337,
"end": 338,
"ctxt": 0
},
"value": "i",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 338,
"end": 343,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 340,
"end": 343,
"ctxt": 0
},
"kind": "any"
}
},
"isStatic": true,
"decorators": [],
"accessibility": "protected"
},
{
"type": "AutoAccessor",
"span": {
"start": 349,
"end": 366,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 358,
"end": 360,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 359,
"end": 360,
"ctxt": 0
},
"value": "j",
"optional": false
}
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 360,
"end": 365,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 362,
"end": 365,
"ctxt": 0
},
"kind": "any"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null
},
{
"type": "AutoAccessor",
"span": {
"start": 371,
"end": 389,
"ctxt": 0
},
"key": {
"type": "StringLiteral",
"span": {
"start": 380,
"end": 383,
"ctxt": 0
},
"value": "k",
"raw": "\"k\""
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 383,
"end": 388,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 385,
"end": 388,
"ctxt": 0
},
"kind": "any"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null
},
{
"type": "AutoAccessor",
"span": {
"start": 394,
"end": 412,
"ctxt": 0
},
"key": {
"type": "NumericLiteral",
"span": {
"start": 403,
"end": 406,
"ctxt": 0
},
"value": 108.0,
"raw": "108"
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 406,
"end": 411,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 408,
"end": 411,
"ctxt": 0
},
"kind": "any"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null
},
{
"type": "AutoAccessor",
"span": {
"start": 417,
"end": 437,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 426,
"end": 431,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 427,
"end": 430,
"ctxt": 0
},
"value": "m",
"raw": "\"m\""
}
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 431,
"end": 436,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 433,
"end": 436,
"ctxt": 0
},
"kind": "any"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null
},
{
"type": "AutoAccessor",
"span": {
"start": 442,
"end": 462,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 451,
"end": 452,
"ctxt": 0
},
"value": "n",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 453,
"end": 461,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 455,
"end": 461,
"ctxt": 0
},
"kind": "number"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null
}
],
"superClass": null,
"isAbstract": true,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 472,
"end": 474,
"ctxt": 0
},
"value": "C2",
"optional": false
},
"declare": false,
"span": {
"start": 466,
"end": 556,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "AutoAccessor",
"span": {
"start": 492,
"end": 517,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 510,
"end": 511,
"ctxt": 0
},
"value": "e",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 511,
"end": 516,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 513,
"end": 516,
"ctxt": 0
},
"kind": "any"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null
},
{
"type": "AutoAccessor",
"span": {
"start": 522,
"end": 554,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 547,
"end": 548,
"ctxt": 0
},
"value": "i",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 548,
"end": 553,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 550,
"end": 553,
"ctxt": 0
},
"kind": "any"
}
},
"isStatic": true,
"decorators": [],
"accessibility": null
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 483,
"end": 485,
"ctxt": 0
},
"value": "C1",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 572,
"end": 574,
"ctxt": 0
},
"value": "C3",
"optional": false
},
"declare": true,
"span": {
"start": 558,
"end": 599,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "AutoAccessor",
"span": {
"start": 581,
"end": 597,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 590,
"end": 591,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 591,
"end": 596,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 593,
"end": 596,
"ctxt": 0
},
"kind": "any"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}