swc/crates/swc_ecma_parser/tests/tsc/enumAssignability.json
2022-02-04 20:17:42 +09:00

2678 lines
77 KiB
JSON

{
"type": "Script",
"span": {
"start": 75,
"end": 1000,
"ctxt": 0
},
"body": [
{
"type": "TsEnumDeclaration",
"span": {
"start": 75,
"end": 87,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 80,
"end": 81,
"ctxt": 0
},
"value": "E",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 84,
"end": 85,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 84,
"end": 85,
"ctxt": 0
},
"value": "A",
"optional": false
},
"init": null
}
]
},
{
"type": "TsEnumDeclaration",
"span": {
"start": 88,
"end": 100,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 93,
"end": 94,
"ctxt": 0
},
"value": "F",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 97,
"end": 98,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 97,
"end": 98,
"ctxt": 0
},
"value": "B",
"optional": false
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 102,
"end": 114,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 106,
"end": 113,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 106,
"end": 107,
"ctxt": 0
},
"value": "e",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
"start": 110,
"end": 113,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 110,
"end": 111,
"ctxt": 0
},
"value": "E",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 112,
"end": 113,
"ctxt": 0
},
"value": "A",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 115,
"end": 127,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 119,
"end": 126,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 119,
"end": 120,
"ctxt": 0
},
"value": "f",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
"start": 123,
"end": 126,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 123,
"end": 124,
"ctxt": 0
},
"value": "F",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 125,
"end": 126,
"ctxt": 0
},
"value": "B",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 129,
"end": 135,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 129,
"end": 134,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 129,
"end": 130,
"ctxt": 0
},
"value": "e",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 133,
"end": 134,
"ctxt": 0
},
"value": "f",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 137,
"end": 143,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 137,
"end": 142,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 137,
"end": 138,
"ctxt": 0
},
"value": "f",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 141,
"end": 142,
"ctxt": 0
},
"value": "e",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 145,
"end": 151,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 145,
"end": 150,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 145,
"end": 146,
"ctxt": 0
},
"value": "e",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 149,
"end": 150,
"ctxt": 0
},
"value": 1.0
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 158,
"end": 164,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 158,
"end": 163,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 158,
"end": 159,
"ctxt": 0
},
"value": "f",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 162,
"end": 163,
"ctxt": 0
},
"value": 1.0
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 171,
"end": 189,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 175,
"end": 188,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 175,
"end": 176,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 176,
"end": 184,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 178,
"end": 184,
"ctxt": 0
},
"kind": "number"
}
}
},
"init": {
"type": "Identifier",
"span": {
"start": 187,
"end": 188,
"ctxt": 0
},
"value": "e",
"optional": false
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 196,
"end": 202,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 196,
"end": 201,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 196,
"end": 197,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 200,
"end": 201,
"ctxt": 0
},
"value": "f",
"optional": false
}
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 210,
"end": 1000,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 217,
"end": 223,
"ctxt": 0
},
"value": "Others",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 224,
"end": 1000,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 230,
"end": 245,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 234,
"end": 244,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 234,
"end": 235,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 235,
"end": 240,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 237,
"end": 240,
"ctxt": 0
},
"kind": "any"
}
}
},
"init": {
"type": "Identifier",
"span": {
"start": 243,
"end": 244,
"ctxt": 0
},
"value": "e",
"optional": false
},
"definite": false
}
]
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 263,
"end": 264,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 257,
"end": 293,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 275,
"end": 287,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 275,
"end": 278,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 278,
"end": 286,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 280,
"end": 286,
"ctxt": 0
},
"kind": "string"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "VariableDeclaration",
"span": {
"start": 298,
"end": 308,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 302,
"end": 307,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 302,
"end": 304,
"ctxt": 0
},
"value": "ac",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 304,
"end": 307,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 306,
"end": 307,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 306,
"end": 307,
"ctxt": 0
},
"value": "C",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 313,
"end": 353,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 323,
"end": 324,
"ctxt": 0
},
"value": "I",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 325,
"end": 353,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 335,
"end": 347,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 335,
"end": 338,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 338,
"end": 346,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 340,
"end": 346,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 358,
"end": 368,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 362,
"end": 367,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 362,
"end": 364,
"ctxt": 0
},
"value": "ai",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 364,
"end": 367,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 366,
"end": 367,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 366,
"end": 367,
"ctxt": 0
},
"value": "I",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 374,
"end": 392,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 378,
"end": 391,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 378,
"end": 379,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 379,
"end": 387,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 381,
"end": 387,
"ctxt": 0
},
"kind": "number"
}
}
},
"init": {
"type": "Identifier",
"span": {
"start": 390,
"end": 391,
"ctxt": 0
},
"value": "e",
"optional": false
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 403,
"end": 421,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 407,
"end": 420,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 407,
"end": 408,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 408,
"end": 416,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 410,
"end": 416,
"ctxt": 0
},
"kind": "string"
}
}
},
"init": {
"type": "Identifier",
"span": {
"start": 419,
"end": 420,
"ctxt": 0
},
"value": "e",
"optional": false
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 426,
"end": 445,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 430,
"end": 444,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 430,
"end": 431,
"ctxt": 0
},
"value": "d",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 431,
"end": 440,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 433,
"end": 440,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": {
"type": "Identifier",
"span": {
"start": 443,
"end": 444,
"ctxt": 0
},
"value": "e",
"optional": false
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 450,
"end": 467,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 454,
"end": 466,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 454,
"end": 456,
"ctxt": 0
},
"value": "ee",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 456,
"end": 462,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 458,
"end": 462,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 458,
"end": 462,
"ctxt": 0
},
"value": "Date",
"optional": false
},
"typeParams": null
}
}
},
"init": {
"type": "Identifier",
"span": {
"start": 465,
"end": 466,
"ctxt": 0
},
"value": "e",
"optional": false
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 472,
"end": 487,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 476,
"end": 486,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 476,
"end": 477,
"ctxt": 0
},
"value": "f",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 477,
"end": 482,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 479,
"end": 482,
"ctxt": 0
},
"kind": "any"
}
}
},
"init": {
"type": "Identifier",
"span": {
"start": 485,
"end": 486,
"ctxt": 0
},
"value": "e",
"optional": false
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 498,
"end": 514,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 502,
"end": 513,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 502,
"end": 503,
"ctxt": 0
},
"value": "g",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 503,
"end": 509,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 505,
"end": 509,
"ctxt": 0
},
"kind": "void"
}
}
},
"init": {
"type": "Identifier",
"span": {
"start": 512,
"end": 513,
"ctxt": 0
},
"value": "e",
"optional": false
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 519,
"end": 537,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 523,
"end": 536,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 523,
"end": 524,
"ctxt": 0
},
"value": "h",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 524,
"end": 532,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 526,
"end": 532,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 526,
"end": 532,
"ctxt": 0
},
"value": "Object",
"optional": false
},
"typeParams": null
}
}
},
"init": {
"type": "Identifier",
"span": {
"start": 535,
"end": 536,
"ctxt": 0
},
"value": "e",
"optional": false
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 542,
"end": 556,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 546,
"end": 555,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 546,
"end": 547,
"ctxt": 0
},
"value": "i",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 547,
"end": 551,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 549,
"end": 551,
"ctxt": 0
},
"members": []
}
}
},
"init": {
"type": "Identifier",
"span": {
"start": 554,
"end": 555,
"ctxt": 0
},
"value": "e",
"optional": false
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 561,
"end": 581,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 565,
"end": 580,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 565,
"end": 566,
"ctxt": 0
},
"value": "j",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 566,
"end": 576,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsFunctionType",
"span": {
"start": 568,
"end": 576,
"ctxt": 0
},
"params": [],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 571,
"end": 576,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 574,
"end": 576,
"ctxt": 0
},
"members": []
}
}
}
}
},
"init": {
"type": "Identifier",
"span": {
"start": 579,
"end": 580,
"ctxt": 0
},
"value": "e",
"optional": false
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 586,
"end": 606,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 590,
"end": 605,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 590,
"end": 591,
"ctxt": 0
},
"value": "k",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 591,
"end": 601,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 593,
"end": 601,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 593,
"end": 601,
"ctxt": 0
},
"value": "Function",
"optional": false
},
"typeParams": null
}
}
},
"init": {
"type": "Identifier",
"span": {
"start": 604,
"end": 605,
"ctxt": 0
},
"value": "e",
"optional": false
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 611,
"end": 644,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 615,
"end": 643,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 615,
"end": 616,
"ctxt": 0
},
"value": "l",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 616,
"end": 639,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsFunctionType",
"span": {
"start": 618,
"end": 639,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 619,
"end": 628,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 620,
"end": 628,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 622,
"end": 628,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 630,
"end": 639,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 633,
"end": 639,
"ctxt": 0
},
"kind": "string"
}
}
}
}
},
"init": {
"type": "Identifier",
"span": {
"start": 642,
"end": 643,
"ctxt": 0
},
"value": "e",
"optional": false
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 649,
"end": 656,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 649,
"end": 655,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 649,
"end": 651,
"ctxt": 0
},
"value": "ac",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 654,
"end": 655,
"ctxt": 0
},
"value": "e",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 661,
"end": 668,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 661,
"end": 667,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 661,
"end": 663,
"ctxt": 0
},
"value": "ai",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 666,
"end": 667,
"ctxt": 0
},
"value": "e",
"optional": false
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 673,
"end": 693,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 677,
"end": 692,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 677,
"end": 678,
"ctxt": 0
},
"value": "m",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 678,
"end": 688,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 680,
"end": 688,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 680,
"end": 686,
"ctxt": 0
},
"kind": "number"
}
}
}
},
"init": {
"type": "Identifier",
"span": {
"start": 691,
"end": 692,
"ctxt": 0
},
"value": "e",
"optional": false
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 698,
"end": 725,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 702,
"end": 724,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 702,
"end": 703,
"ctxt": 0
},
"value": "n",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 703,
"end": 720,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 705,
"end": 720,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 707,
"end": 718,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 707,
"end": 710,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 710,
"end": 718,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 712,
"end": 718,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
}
},
"init": {
"type": "Identifier",
"span": {
"start": 723,
"end": 724,
"ctxt": 0
},
"value": "e",
"optional": false
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 730,
"end": 756,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 734,
"end": 755,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 734,
"end": 735,
"ctxt": 0
},
"value": "o",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 735,
"end": 751,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsFunctionType",
"span": {
"start": 737,
"end": 751,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 741,
"end": 745,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 742,
"end": 745,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 744,
"end": 745,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 744,
"end": 745,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
],
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 737,
"end": 740,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 738,
"end": 739,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 738,
"end": 739,
"ctxt": 0
},
"value": "T",
"optional": false
},
"constraint": null,
"default": null
}
]
},
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 747,
"end": 751,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 750,
"end": 751,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 750,
"end": 751,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
}
},
"init": {
"type": "Identifier",
"span": {
"start": 754,
"end": 755,
"ctxt": 0
},
"value": "e",
"optional": false
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 761,
"end": 779,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 765,
"end": 778,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 765,
"end": 766,
"ctxt": 0
},
"value": "p",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 766,
"end": 774,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 768,
"end": 774,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 768,
"end": 774,
"ctxt": 0
},
"value": "Number",
"optional": false
},
"typeParams": null
}
}
},
"init": {
"type": "Identifier",
"span": {
"start": 777,
"end": 778,
"ctxt": 0
},
"value": "e",
"optional": false
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 784,
"end": 802,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 788,
"end": 801,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 788,
"end": 789,
"ctxt": 0
},
"value": "q",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 789,
"end": 797,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 791,
"end": 797,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 791,
"end": 797,
"ctxt": 0
},
"value": "String",
"optional": false
},
"typeParams": null
}
}
},
"init": {
"type": "Identifier",
"span": {
"start": 800,
"end": 801,
"ctxt": 0
},
"value": "e",
"optional": false
},
"definite": false
}
]
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 817,
"end": 820,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 884,
"end": 888,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 884,
"end": 888,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 885,
"end": 888,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 887,
"end": 888,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 887,
"end": 888,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 890,
"end": 894,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 890,
"end": 894,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 891,
"end": 894,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 893,
"end": 894,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 893,
"end": 894,
"ctxt": 0
},
"value": "U",
"optional": false
},
"typeParams": null
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 896,
"end": 900,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 896,
"end": 900,
"ctxt": 0
},
"value": "z",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 897,
"end": 900,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 899,
"end": 900,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 899,
"end": 900,
"ctxt": 0
},
"value": "V",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 808,
"end": 998,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 902,
"end": 998,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 912,
"end": 918,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 912,
"end": 917,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 912,
"end": 913,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 916,
"end": 917,
"ctxt": 0
},
"value": "e",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 927,
"end": 933,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 927,
"end": 932,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 927,
"end": 928,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 931,
"end": 932,
"ctxt": 0
},
"value": "e",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 942,
"end": 948,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 942,
"end": 947,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 942,
"end": 943,
"ctxt": 0
},
"value": "z",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 946,
"end": 947,
"ctxt": 0
},
"value": "e",
"optional": false
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 957,
"end": 970,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 961,
"end": 969,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 961,
"end": 962,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 962,
"end": 965,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 964,
"end": 965,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 964,
"end": 965,
"ctxt": 0
},
"value": "A",
"optional": false
},
"typeParams": null
}
}
},
"init": {
"type": "Identifier",
"span": {
"start": 968,
"end": 969,
"ctxt": 0
},
"value": "e",
"optional": false
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 979,
"end": 992,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 983,
"end": 991,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 983,
"end": 984,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 984,
"end": 987,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 986,
"end": 987,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 986,
"end": 987,
"ctxt": 0
},
"value": "B",
"optional": false
},
"typeParams": null
}
}
},
"init": {
"type": "Identifier",
"span": {
"start": 990,
"end": 991,
"ctxt": 0
},
"value": "e",
"optional": false
},
"definite": false
}
]
}
]
},
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 820,
"end": 883,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 821,
"end": 822,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 821,
"end": 822,
"ctxt": 0
},
"value": "T",
"optional": false
},
"constraint": null,
"default": null
},
{
"type": "TsTypeParameter",
"span": {
"start": 824,
"end": 835,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 824,
"end": 825,
"ctxt": 0
},
"value": "U",
"optional": false
},
"constraint": {
"type": "TsTypeReference",
"span": {
"start": 834,
"end": 835,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 834,
"end": 835,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
},
"default": null
},
{
"type": "TsTypeParameter",
"span": {
"start": 837,
"end": 851,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 837,
"end": 838,
"ctxt": 0
},
"value": "V",
"optional": false
},
"constraint": {
"type": "TsTypeReference",
"span": {
"start": 847,
"end": 851,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 847,
"end": 851,
"ctxt": 0
},
"value": "Date",
"optional": false
},
"typeParams": null
},
"default": null
},
{
"type": "TsTypeParameter",
"span": {
"start": 853,
"end": 869,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 853,
"end": 854,
"ctxt": 0
},
"value": "A",
"optional": false
},
"constraint": {
"type": "TsTypeReference",
"span": {
"start": 863,
"end": 869,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 863,
"end": 869,
"ctxt": 0
},
"value": "Number",
"optional": false
},
"typeParams": null
},
"default": null
},
{
"type": "TsTypeParameter",
"span": {
"start": 871,
"end": 882,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 871,
"end": 872,
"ctxt": 0
},
"value": "B",
"optional": false
},
"constraint": {
"type": "TsTypeReference",
"span": {
"start": 881,
"end": 882,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 881,
"end": 882,
"ctxt": 0
},
"value": "E",
"optional": false
},
"typeParams": null
},
"default": null
}
]
},
"returnType": null
}
]
}
}
],
"interpreter": null
}