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

379 lines
8.6 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 153,
"end": 329,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 159,
"end": 161,
"ctxt": 0
},
"value": "C1",
"optional": false
},
"declare": false,
"span": {
"start": 153,
"end": 205,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "PrivateProperty",
"span": {
"start": 168,
"end": 185,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 175,
"end": 179,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 176,
"end": 179,
"ctxt": 0
},
"value": "qux",
"optional": false
}
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 182,
"end": 184,
"ctxt": 0
},
"value": 42.0,
"raw": "42"
},
"typeAnnotation": null,
"isStatic": true,
"decorators": [],
"accessibility": null,
"isOptional": false,
"isOverride": false,
"readonly": false,
"definite": false
},
{
"type": "ClassMethod",
"span": {
"start": 190,
"end": 203,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 190,
"end": 197,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 191,
"end": 196,
"ctxt": 0
},
"value": "bar",
"raw": "\"bar\""
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 190,
"end": 203,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 201,
"end": 203,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 212,
"end": 214,
"ctxt": 0
},
"value": "C2",
"optional": false
},
"declare": false,
"span": {
"start": 206,
"end": 265,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "PrivateProperty",
"span": {
"start": 221,
"end": 238,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 228,
"end": 232,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 229,
"end": 232,
"ctxt": 0
},
"value": "qux",
"optional": false
}
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 235,
"end": 237,
"ctxt": 0
},
"value": 42.0,
"raw": "42"
},
"typeAnnotation": null,
"isStatic": true,
"decorators": [],
"accessibility": null,
"isOptional": false,
"isOverride": false,
"readonly": false,
"definite": false
},
{
"type": "ClassMethod",
"span": {
"start": 243,
"end": 263,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 250,
"end": 257,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 251,
"end": 256,
"ctxt": 0
},
"value": "bar",
"raw": "\"bar\""
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 243,
"end": 263,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 261,
"end": 263,
"ctxt": 0
},
"stmts": []
},
"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": 272,
"end": 274,
"ctxt": 0
},
"value": "C3",
"optional": false
},
"declare": false,
"span": {
"start": 266,
"end": 329,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "PrivateProperty",
"span": {
"start": 281,
"end": 298,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 288,
"end": 292,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 289,
"end": 292,
"ctxt": 0
},
"value": "qux",
"optional": false
}
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 295,
"end": 297,
"ctxt": 0
},
"value": 42.0,
"raw": "42"
},
"typeAnnotation": null,
"isStatic": true,
"decorators": [],
"accessibility": null,
"isOptional": false,
"isOverride": false,
"readonly": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 303,
"end": 327,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 310,
"end": 317,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 311,
"end": 316,
"ctxt": 0
},
"value": "bar",
"raw": "\"bar\""
}
},
"value": {
"type": "StringLiteral",
"span": {
"start": 320,
"end": 326,
"ctxt": 0
},
"value": "test",
"raw": "\"test\""
},
"typeAnnotation": null,
"isStatic": true,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}