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

2994 lines
81 KiB
JSON

{
"type": "Script",
"span": {
"start": 96,
"end": 1175,
"ctxt": 0
},
"body": [
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 96,
"end": 154,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 106,
"end": 107,
"ctxt": 0
},
"value": "P",
"optional": false
},
"declare": false,
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 107,
"end": 110,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 108,
"end": 109,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 108,
"end": 109,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"const": false,
"constraint": null,
"default": null
}
]
},
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 111,
"end": 154,
"ctxt": 0
},
"body": [
{
"type": "TsMethodSignature",
"span": {
"start": 117,
"end": 152,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 117,
"end": 121,
"ctxt": 0
},
"value": "then",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 122,
"end": 144,
"ctxt": 0
},
"value": "cb",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 124,
"end": 144,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsFunctionType",
"span": {
"start": 126,
"end": 144,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 127,
"end": 135,
"ctxt": 0
},
"value": "value",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 132,
"end": 135,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 134,
"end": 135,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 134,
"end": 135,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 137,
"end": 144,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 140,
"end": 144,
"ctxt": 0
},
"kind": "void"
}
}
}
}
}
],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 145,
"end": 151,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 147,
"end": 151,
"ctxt": 0
},
"kind": "void"
}
},
"typeParams": null
}
]
}
},
{
"type": "EmptyStatement",
"span": {
"start": 154,
"end": 155,
"ctxt": 0
}
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 157,
"end": 182,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 167,
"end": 168,
"ctxt": 0
},
"value": "A",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 169,
"end": 182,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 171,
"end": 180,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 171,
"end": 172,
"ctxt": 0
},
"value": "a",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 172,
"end": 180,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 174,
"end": 180,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 183,
"end": 218,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 193,
"end": 194,
"ctxt": 0
},
"value": "B",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [
{
"type": "TsExpressionWithTypeArguments",
"span": {
"start": 203,
"end": 204,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 203,
"end": 204,
"ctxt": 0
},
"value": "A",
"optional": false
},
"typeArguments": null
}
],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 205,
"end": 218,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 207,
"end": 216,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 207,
"end": 208,
"ctxt": 0
},
"value": "b",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 208,
"end": 216,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 210,
"end": 216,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 229,
"end": 231,
"ctxt": 0
},
"value": "f1",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 232,
"end": 239,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 232,
"end": 239,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 233,
"end": 239,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 235,
"end": 239,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 235,
"end": 236,
"ctxt": 0
},
"value": "P",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 236,
"end": 239,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 237,
"end": 238,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 237,
"end": 238,
"ctxt": 0
},
"value": "A",
"optional": false
},
"typeParams": null
}
]
}
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 241,
"end": 248,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 241,
"end": 248,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 242,
"end": 248,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 244,
"end": 248,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 244,
"end": 245,
"ctxt": 0
},
"value": "P",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 245,
"end": 248,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 246,
"end": 247,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 246,
"end": 247,
"ctxt": 0
},
"value": "B",
"optional": false
},
"typeParams": null
}
]
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 220,
"end": 285,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 250,
"end": 285,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 256,
"end": 262,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 256,
"end": 261,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 256,
"end": 257,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 260,
"end": 261,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 267,
"end": 273,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 267,
"end": 272,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 267,
"end": 268,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 271,
"end": 272,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 296,
"end": 298,
"ctxt": 0
},
"value": "f2",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 299,
"end": 312,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 299,
"end": 312,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 300,
"end": 312,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 302,
"end": 312,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 302,
"end": 309,
"ctxt": 0
},
"value": "Promise",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 309,
"end": 312,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 310,
"end": 311,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 310,
"end": 311,
"ctxt": 0
},
"value": "A",
"optional": false
},
"typeParams": null
}
]
}
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 314,
"end": 327,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 314,
"end": 327,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 315,
"end": 327,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 317,
"end": 327,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 317,
"end": 324,
"ctxt": 0
},
"value": "Promise",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 324,
"end": 327,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 325,
"end": 326,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 325,
"end": 326,
"ctxt": 0
},
"value": "B",
"optional": false
},
"typeParams": null
}
]
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 287,
"end": 364,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 329,
"end": 364,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 335,
"end": 341,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 335,
"end": 340,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 335,
"end": 336,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 339,
"end": 340,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 346,
"end": 352,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 346,
"end": 351,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 346,
"end": 347,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 350,
"end": 351,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 366,
"end": 428,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 376,
"end": 382,
"ctxt": 0
},
"value": "AList1",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 383,
"end": 428,
"ctxt": 0
},
"body": [
{
"type": "TsMethodSignature",
"span": {
"start": 389,
"end": 426,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 389,
"end": 396,
"ctxt": 0
},
"value": "forEach",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 397,
"end": 418,
"ctxt": 0
},
"value": "cb",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 399,
"end": 418,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsFunctionType",
"span": {
"start": 401,
"end": 418,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 402,
"end": 409,
"ctxt": 0
},
"value": "item",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 406,
"end": 409,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 408,
"end": 409,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 408,
"end": 409,
"ctxt": 0
},
"value": "A",
"optional": false
},
"typeParams": null
}
}
}
],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 411,
"end": 418,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 414,
"end": 418,
"ctxt": 0
},
"kind": "void"
}
}
}
}
}
],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 419,
"end": 425,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 421,
"end": 425,
"ctxt": 0
},
"kind": "void"
}
},
"typeParams": null
}
]
}
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 430,
"end": 492,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 440,
"end": 446,
"ctxt": 0
},
"value": "BList1",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 447,
"end": 492,
"ctxt": 0
},
"body": [
{
"type": "TsMethodSignature",
"span": {
"start": 453,
"end": 490,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 453,
"end": 460,
"ctxt": 0
},
"value": "forEach",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 461,
"end": 482,
"ctxt": 0
},
"value": "cb",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 463,
"end": 482,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsFunctionType",
"span": {
"start": 465,
"end": 482,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 466,
"end": 473,
"ctxt": 0
},
"value": "item",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 470,
"end": 473,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 472,
"end": 473,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 472,
"end": 473,
"ctxt": 0
},
"value": "B",
"optional": false
},
"typeParams": null
}
}
}
],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 475,
"end": 482,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 478,
"end": 482,
"ctxt": 0
},
"kind": "void"
}
}
}
}
}
],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 483,
"end": 489,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 485,
"end": 489,
"ctxt": 0
},
"kind": "void"
}
},
"typeParams": null
}
]
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 503,
"end": 506,
"ctxt": 0
},
"value": "f11",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 507,
"end": 516,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 507,
"end": 516,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 508,
"end": 516,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 510,
"end": 516,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 510,
"end": 516,
"ctxt": 0
},
"value": "AList1",
"optional": false
},
"typeParams": null
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 518,
"end": 527,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 518,
"end": 527,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 519,
"end": 527,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 521,
"end": 527,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 521,
"end": 527,
"ctxt": 0
},
"value": "BList1",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 494,
"end": 564,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 529,
"end": 564,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 535,
"end": 541,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 535,
"end": 540,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 535,
"end": 536,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 539,
"end": 540,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 546,
"end": 552,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 546,
"end": 551,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 546,
"end": 547,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 550,
"end": 551,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 566,
"end": 631,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 576,
"end": 582,
"ctxt": 0
},
"value": "AList2",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 583,
"end": 631,
"ctxt": 0
},
"body": [
{
"type": "TsMethodSignature",
"span": {
"start": 589,
"end": 629,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 589,
"end": 596,
"ctxt": 0
},
"value": "forEach",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 597,
"end": 621,
"ctxt": 0
},
"value": "cb",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 599,
"end": 621,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsFunctionType",
"span": {
"start": 601,
"end": 621,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 602,
"end": 609,
"ctxt": 0
},
"value": "item",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 606,
"end": 609,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 608,
"end": 609,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 608,
"end": 609,
"ctxt": 0
},
"value": "A",
"optional": false
},
"typeParams": null
}
}
}
],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 611,
"end": 621,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 614,
"end": 621,
"ctxt": 0
},
"kind": "boolean"
}
}
}
}
}
],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 622,
"end": 628,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 624,
"end": 628,
"ctxt": 0
},
"kind": "void"
}
},
"typeParams": null
}
]
}
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 633,
"end": 695,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 643,
"end": 649,
"ctxt": 0
},
"value": "BList2",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 650,
"end": 695,
"ctxt": 0
},
"body": [
{
"type": "TsMethodSignature",
"span": {
"start": 656,
"end": 693,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 656,
"end": 663,
"ctxt": 0
},
"value": "forEach",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 664,
"end": 685,
"ctxt": 0
},
"value": "cb",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 666,
"end": 685,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsFunctionType",
"span": {
"start": 668,
"end": 685,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 669,
"end": 676,
"ctxt": 0
},
"value": "item",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 673,
"end": 676,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 675,
"end": 676,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 675,
"end": 676,
"ctxt": 0
},
"value": "A",
"optional": false
},
"typeParams": null
}
}
}
],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 678,
"end": 685,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 681,
"end": 685,
"ctxt": 0
},
"kind": "void"
}
}
}
}
}
],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 686,
"end": 692,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 688,
"end": 692,
"ctxt": 0
},
"kind": "void"
}
},
"typeParams": null
}
]
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 706,
"end": 709,
"ctxt": 0
},
"value": "f12",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 710,
"end": 719,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 710,
"end": 719,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 711,
"end": 719,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 713,
"end": 719,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 713,
"end": 719,
"ctxt": 0
},
"value": "AList2",
"optional": false
},
"typeParams": null
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 721,
"end": 730,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 721,
"end": 730,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 722,
"end": 730,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 724,
"end": 730,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 724,
"end": 730,
"ctxt": 0
},
"value": "BList2",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 697,
"end": 767,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 732,
"end": 767,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 738,
"end": 744,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 738,
"end": 743,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 738,
"end": 739,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 742,
"end": 743,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 749,
"end": 755,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 749,
"end": 754,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 749,
"end": 750,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 753,
"end": 754,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 769,
"end": 831,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 779,
"end": 785,
"ctxt": 0
},
"value": "AList3",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 786,
"end": 831,
"ctxt": 0
},
"body": [
{
"type": "TsMethodSignature",
"span": {
"start": 792,
"end": 829,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 792,
"end": 799,
"ctxt": 0
},
"value": "forEach",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 800,
"end": 821,
"ctxt": 0
},
"value": "cb",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 802,
"end": 821,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsFunctionType",
"span": {
"start": 804,
"end": 821,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 805,
"end": 812,
"ctxt": 0
},
"value": "item",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 809,
"end": 812,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 811,
"end": 812,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 811,
"end": 812,
"ctxt": 0
},
"value": "A",
"optional": false
},
"typeParams": null
}
}
}
],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 814,
"end": 821,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 817,
"end": 821,
"ctxt": 0
},
"kind": "void"
}
}
}
}
}
],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 822,
"end": 828,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 824,
"end": 828,
"ctxt": 0
},
"kind": "void"
}
},
"typeParams": null
}
]
}
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 833,
"end": 909,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 843,
"end": 849,
"ctxt": 0
},
"value": "BList3",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 850,
"end": 909,
"ctxt": 0
},
"body": [
{
"type": "TsMethodSignature",
"span": {
"start": 856,
"end": 907,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 856,
"end": 863,
"ctxt": 0
},
"value": "forEach",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 864,
"end": 899,
"ctxt": 0
},
"value": "cb",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 866,
"end": 899,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsFunctionType",
"span": {
"start": 868,
"end": 899,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 869,
"end": 876,
"ctxt": 0
},
"value": "item",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 873,
"end": 876,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 875,
"end": 876,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 875,
"end": 876,
"ctxt": 0
},
"value": "A",
"optional": false
},
"typeParams": null
}
}
},
{
"type": "Identifier",
"span": {
"start": 878,
"end": 890,
"ctxt": 0
},
"value": "context",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 885,
"end": 890,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 887,
"end": 890,
"ctxt": 0
},
"kind": "any"
}
}
}
],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 892,
"end": 899,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 895,
"end": 899,
"ctxt": 0
},
"kind": "void"
}
}
}
}
}
],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 900,
"end": 906,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 902,
"end": 906,
"ctxt": 0
},
"kind": "void"
}
},
"typeParams": null
}
]
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 920,
"end": 923,
"ctxt": 0
},
"value": "f13",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 924,
"end": 933,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 924,
"end": 933,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 925,
"end": 933,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 927,
"end": 933,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 927,
"end": 933,
"ctxt": 0
},
"value": "AList3",
"optional": false
},
"typeParams": null
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 935,
"end": 944,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 935,
"end": 944,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 936,
"end": 944,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 938,
"end": 944,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 938,
"end": 944,
"ctxt": 0
},
"value": "BList3",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 911,
"end": 981,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 946,
"end": 981,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 952,
"end": 958,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 952,
"end": 957,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 952,
"end": 953,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 956,
"end": 957,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 963,
"end": 969,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 963,
"end": 968,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 963,
"end": 964,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 967,
"end": 968,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 983,
"end": 1042,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 993,
"end": 999,
"ctxt": 0
},
"value": "AList4",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 1000,
"end": 1042,
"ctxt": 0
},
"body": [
{
"type": "TsMethodSignature",
"span": {
"start": 1006,
"end": 1040,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 1006,
"end": 1013,
"ctxt": 0
},
"value": "forEach",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 1014,
"end": 1032,
"ctxt": 0
},
"value": "cb",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1016,
"end": 1032,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsFunctionType",
"span": {
"start": 1018,
"end": 1032,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 1019,
"end": 1026,
"ctxt": 0
},
"value": "item",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1023,
"end": 1026,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1025,
"end": 1026,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1025,
"end": 1026,
"ctxt": 0
},
"value": "A",
"optional": false
},
"typeParams": null
}
}
}
],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1028,
"end": 1032,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1031,
"end": 1032,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1031,
"end": 1032,
"ctxt": 0
},
"value": "A",
"optional": false
},
"typeParams": null
}
}
}
}
}
],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 1033,
"end": 1039,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1035,
"end": 1039,
"ctxt": 0
},
"kind": "void"
}
},
"typeParams": null
}
]
}
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 1044,
"end": 1103,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1054,
"end": 1060,
"ctxt": 0
},
"value": "BList4",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 1061,
"end": 1103,
"ctxt": 0
},
"body": [
{
"type": "TsMethodSignature",
"span": {
"start": 1067,
"end": 1101,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 1067,
"end": 1074,
"ctxt": 0
},
"value": "forEach",
"optional": false
},
"computed": false,
"optional": false,
"params": [
{
"type": "Identifier",
"span": {
"start": 1075,
"end": 1093,
"ctxt": 0
},
"value": "cb",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1077,
"end": 1093,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsFunctionType",
"span": {
"start": 1079,
"end": 1093,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 1080,
"end": 1087,
"ctxt": 0
},
"value": "item",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1084,
"end": 1087,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1086,
"end": 1087,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1086,
"end": 1087,
"ctxt": 0
},
"value": "B",
"optional": false
},
"typeParams": null
}
}
}
],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1089,
"end": 1093,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1092,
"end": 1093,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1092,
"end": 1093,
"ctxt": 0
},
"value": "B",
"optional": false
},
"typeParams": null
}
}
}
}
}
],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 1094,
"end": 1100,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1096,
"end": 1100,
"ctxt": 0
},
"kind": "void"
}
},
"typeParams": null
}
]
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 1114,
"end": 1117,
"ctxt": 0
},
"value": "f14",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 1118,
"end": 1127,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 1118,
"end": 1127,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1119,
"end": 1127,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1121,
"end": 1127,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1121,
"end": 1127,
"ctxt": 0
},
"value": "AList4",
"optional": false
},
"typeParams": null
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 1129,
"end": 1138,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 1129,
"end": 1138,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1130,
"end": 1138,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1132,
"end": 1138,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1132,
"end": 1138,
"ctxt": 0
},
"value": "BList4",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 1105,
"end": 1175,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 1140,
"end": 1175,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 1146,
"end": 1152,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1146,
"end": 1151,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 1146,
"end": 1147,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 1150,
"end": 1151,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1157,
"end": 1163,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1157,
"end": 1162,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 1157,
"end": 1158,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 1161,
"end": 1162,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
],
"interpreter": null
}