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

2346 lines
66 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 75,
"end": 960,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 81,
"end": 82,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 75,
"end": 696,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "PrivateProperty",
"span": {
"start": 92,
"end": 100,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 92,
"end": 96,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 93,
"end": 96,
"ctxt": 0
},
"value": "foo",
"optional": false
}
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 96,
"end": 99,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 98,
"end": 99,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 98,
"end": 99,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isOptional": false,
"isOverride": false,
"readonly": false,
"definite": false
},
{
"type": "PrivateMethod",
"span": {
"start": 105,
"end": 139,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 105,
"end": 112,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 106,
"end": 112,
"ctxt": 0
},
"value": "method",
"optional": false
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 105,
"end": 139,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 118,
"end": 139,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 120,
"end": 137,
"ctxt": 0
},
"argument": {
"type": "MemberExpression",
"span": {
"start": 127,
"end": 136,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 127,
"end": 131,
"ctxt": 0
}
},
"property": {
"type": "PrivateName",
"span": {
"start": 132,
"end": 136,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 133,
"end": 136,
"ctxt": 0
},
"value": "foo",
"optional": false
}
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 114,
"end": 117,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 116,
"end": 117,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 116,
"end": 117,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "PrivateMethod",
"span": {
"start": 144,
"end": 180,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 148,
"end": 153,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 149,
"end": 153,
"ctxt": 0
},
"value": "prop",
"optional": false
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 144,
"end": 180,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 159,
"end": 180,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 161,
"end": 178,
"ctxt": 0
},
"argument": {
"type": "MemberExpression",
"span": {
"start": 168,
"end": 177,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 168,
"end": 172,
"ctxt": 0
}
},
"property": {
"type": "PrivateName",
"span": {
"start": 173,
"end": 177,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 174,
"end": 177,
"ctxt": 0
},
"value": "foo",
"optional": false
}
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 155,
"end": 158,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 157,
"end": 158,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 157,
"end": 158,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
},
"kind": "getter",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "PrivateMethod",
"span": {
"start": 185,
"end": 228,
"ctxt": 0
},
"key": {
"type": "PrivateName",
"span": {
"start": 189,
"end": 194,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 190,
"end": 194,
"ctxt": 0
},
"value": "prop",
"optional": false
}
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 195,
"end": 204,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 195,
"end": 204,
"ctxt": 0
},
"value": "value",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 201,
"end": 204,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 203,
"end": 204,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 203,
"end": 204,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 185,
"end": 228,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 206,
"end": 228,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 208,
"end": 226,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 208,
"end": 225,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 208,
"end": 217,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 208,
"end": 212,
"ctxt": 0
}
},
"property": {
"type": "PrivateName",
"span": {
"start": 213,
"end": 217,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 214,
"end": 217,
"ctxt": 0
},
"value": "foo",
"optional": false
}
}
},
"right": {
"type": "Identifier",
"span": {
"start": 220,
"end": 225,
"ctxt": 0
},
"value": "value",
"optional": false
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "setter",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 238,
"end": 269,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 238,
"end": 241,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 242,
"end": 249,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 242,
"end": 249,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 243,
"end": 249,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 245,
"end": 249,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 245,
"end": 246,
"ctxt": 0
},
"value": "C",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 246,
"end": 249,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 247,
"end": 248,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 247,
"end": 248,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
]
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 238,
"end": 269,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 251,
"end": 269,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 253,
"end": 267,
"ctxt": 0
},
"argument": {
"type": "MemberExpression",
"span": {
"start": 260,
"end": 266,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 260,
"end": 261,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "PrivateName",
"span": {
"start": 262,
"end": 266,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 263,
"end": 266,
"ctxt": 0
},
"value": "foo",
"optional": false
}
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 289,
"end": 326,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 289,
"end": 293,
"ctxt": 0
},
"value": "bar2",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 294,
"end": 301,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 294,
"end": 301,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 295,
"end": 301,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 297,
"end": 301,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 297,
"end": 298,
"ctxt": 0
},
"value": "C",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 298,
"end": 301,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 299,
"end": 300,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 299,
"end": 300,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
]
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 289,
"end": 326,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 303,
"end": 326,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 305,
"end": 324,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 312,
"end": 323,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 312,
"end": 321,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 312,
"end": 313,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "PrivateName",
"span": {
"start": 314,
"end": 321,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 315,
"end": 321,
"ctxt": 0
},
"value": "method",
"optional": false
}
}
},
"arguments": [],
"typeArguments": null
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 340,
"end": 373,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 340,
"end": 344,
"ctxt": 0
},
"value": "bar3",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 345,
"end": 352,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 345,
"end": 352,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 346,
"end": 352,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 348,
"end": 352,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 348,
"end": 349,
"ctxt": 0
},
"value": "C",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 349,
"end": 352,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 350,
"end": 351,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 350,
"end": 351,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
]
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 340,
"end": 373,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 354,
"end": 373,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 356,
"end": 371,
"ctxt": 0
},
"argument": {
"type": "MemberExpression",
"span": {
"start": 363,
"end": 370,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 363,
"end": 364,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "PrivateName",
"span": {
"start": 365,
"end": 370,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 366,
"end": 370,
"ctxt": 0
},
"value": "prop",
"optional": false
}
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 392,
"end": 428,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 392,
"end": 395,
"ctxt": 0
},
"value": "baz",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 396,
"end": 408,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 396,
"end": 408,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 397,
"end": 408,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 399,
"end": 408,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 399,
"end": 400,
"ctxt": 0
},
"value": "C",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 400,
"end": 408,
"ctxt": 0
},
"params": [
{
"type": "TsKeywordType",
"span": {
"start": 401,
"end": 407,
"ctxt": 0
},
"kind": "number"
}
]
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 392,
"end": 428,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 410,
"end": 428,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 412,
"end": 426,
"ctxt": 0
},
"argument": {
"type": "MemberExpression",
"span": {
"start": 419,
"end": 425,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 419,
"end": 420,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "PrivateName",
"span": {
"start": 421,
"end": 425,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 422,
"end": 425,
"ctxt": 0
},
"value": "foo",
"optional": false
}
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 443,
"end": 483,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 443,
"end": 447,
"ctxt": 0
},
"value": "baz2",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 448,
"end": 460,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 448,
"end": 460,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 449,
"end": 460,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 451,
"end": 460,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 451,
"end": 452,
"ctxt": 0
},
"value": "C",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 452,
"end": 460,
"ctxt": 0
},
"params": [
{
"type": "TsKeywordType",
"span": {
"start": 453,
"end": 459,
"ctxt": 0
},
"kind": "number"
}
]
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 443,
"end": 483,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 462,
"end": 483,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 464,
"end": 481,
"ctxt": 0
},
"argument": {
"type": "MemberExpression",
"span": {
"start": 471,
"end": 480,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 471,
"end": 472,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "PrivateName",
"span": {
"start": 473,
"end": 480,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 474,
"end": 480,
"ctxt": 0
},
"value": "method",
"optional": false
}
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 494,
"end": 532,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 494,
"end": 498,
"ctxt": 0
},
"value": "baz3",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 499,
"end": 511,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 499,
"end": 511,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 500,
"end": 511,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 502,
"end": 511,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 502,
"end": 503,
"ctxt": 0
},
"value": "C",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 503,
"end": 511,
"ctxt": 0
},
"params": [
{
"type": "TsKeywordType",
"span": {
"start": 504,
"end": 510,
"ctxt": 0
},
"kind": "number"
}
]
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 494,
"end": 532,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 513,
"end": 532,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 515,
"end": 530,
"ctxt": 0
},
"argument": {
"type": "MemberExpression",
"span": {
"start": 522,
"end": 529,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 522,
"end": 523,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "PrivateName",
"span": {
"start": 524,
"end": 529,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 525,
"end": 529,
"ctxt": 0
},
"value": "prop",
"optional": false
}
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 546,
"end": 583,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 546,
"end": 550,
"ctxt": 0
},
"value": "quux",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 551,
"end": 563,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 551,
"end": 563,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 552,
"end": 563,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 554,
"end": 563,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 554,
"end": 555,
"ctxt": 0
},
"value": "C",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 555,
"end": 563,
"ctxt": 0
},
"params": [
{
"type": "TsKeywordType",
"span": {
"start": 556,
"end": 562,
"ctxt": 0
},
"kind": "string"
}
]
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 546,
"end": 583,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 565,
"end": 583,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 567,
"end": 581,
"ctxt": 0
},
"argument": {
"type": "MemberExpression",
"span": {
"start": 574,
"end": 580,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 574,
"end": 575,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "PrivateName",
"span": {
"start": 576,
"end": 580,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 577,
"end": 580,
"ctxt": 0
},
"value": "foo",
"optional": false
}
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 597,
"end": 638,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 597,
"end": 602,
"ctxt": 0
},
"value": "quux2",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 603,
"end": 615,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 603,
"end": 615,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 604,
"end": 615,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 606,
"end": 615,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 606,
"end": 607,
"ctxt": 0
},
"value": "C",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 607,
"end": 615,
"ctxt": 0
},
"params": [
{
"type": "TsKeywordType",
"span": {
"start": 608,
"end": 614,
"ctxt": 0
},
"kind": "string"
}
]
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 597,
"end": 638,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 617,
"end": 638,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 619,
"end": 636,
"ctxt": 0
},
"argument": {
"type": "MemberExpression",
"span": {
"start": 626,
"end": 635,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 626,
"end": 627,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "PrivateName",
"span": {
"start": 628,
"end": 635,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 629,
"end": 635,
"ctxt": 0
},
"value": "method",
"optional": false
}
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 648,
"end": 687,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 648,
"end": 653,
"ctxt": 0
},
"value": "quux3",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 654,
"end": 666,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 654,
"end": 666,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 655,
"end": 666,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 657,
"end": 666,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 657,
"end": 658,
"ctxt": 0
},
"value": "C",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 658,
"end": 666,
"ctxt": 0
},
"params": [
{
"type": "TsKeywordType",
"span": {
"start": 659,
"end": 665,
"ctxt": 0
},
"kind": "string"
}
]
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 648,
"end": 687,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 668,
"end": 687,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 670,
"end": 685,
"ctxt": 0
},
"argument": {
"type": "MemberExpression",
"span": {
"start": 677,
"end": 684,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 677,
"end": 678,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "PrivateName",
"span": {
"start": 679,
"end": 684,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 680,
"end": 684,
"ctxt": 0
},
"value": "prop",
"optional": false
}
}
}
}
]
},
"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": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 82,
"end": 85,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 83,
"end": 84,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 83,
"end": 84,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": null,
"default": null
}
]
},
"superTypeParams": null,
"implements": []
},
{
"type": "VariableDeclaration",
"span": {
"start": 698,
"end": 723,
"ctxt": 0
},
"kind": "let",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 710,
"end": 722,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 710,
"end": 711,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 711,
"end": 722,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 713,
"end": 722,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 713,
"end": 714,
"ctxt": 0
},
"value": "C",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 714,
"end": 722,
"ctxt": 0
},
"params": [
{
"type": "TsKeywordType",
"span": {
"start": 715,
"end": 721,
"ctxt": 0
},
"kind": "number"
}
]
}
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 724,
"end": 749,
"ctxt": 0
},
"kind": "let",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 736,
"end": 748,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 736,
"end": 737,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 737,
"end": 748,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 739,
"end": 748,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 739,
"end": 740,
"ctxt": 0
},
"value": "C",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 740,
"end": 748,
"ctxt": 0
},
"params": [
{
"type": "TsKeywordType",
"span": {
"start": 741,
"end": 747,
"ctxt": 0
},
"kind": "string"
}
]
}
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 750,
"end": 757,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 750,
"end": 756,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 750,
"end": 751,
"ctxt": 0
},
"value": "a",
"optional": false
},
"property": {
"type": "PrivateName",
"span": {
"start": 752,
"end": 756,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 753,
"end": 756,
"ctxt": 0
},
"value": "foo",
"optional": false
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 801,
"end": 811,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 801,
"end": 810,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 801,
"end": 802,
"ctxt": 0
},
"value": "a",
"optional": false
},
"property": {
"type": "PrivateName",
"span": {
"start": 803,
"end": 810,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 804,
"end": 810,
"ctxt": 0
},
"value": "method",
"optional": false
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 852,
"end": 860,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 852,
"end": 859,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 852,
"end": 853,
"ctxt": 0
},
"value": "a",
"optional": false
},
"property": {
"type": "PrivateName",
"span": {
"start": 854,
"end": 859,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 855,
"end": 859,
"ctxt": 0
},
"value": "prop",
"optional": false
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 903,
"end": 909,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 903,
"end": 908,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 903,
"end": 904,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 907,
"end": 908,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 954,
"end": 960,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 954,
"end": 959,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 954,
"end": 955,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 958,
"end": 959,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
}
],
"interpreter": null
}