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

6734 lines
176 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 54,
"end": 3591,
"ctxt": 0
},
"body": [
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 54,
"end": 101,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 59,
"end": 75,
"ctxt": 0
},
"value": "CheckBooleanOnly",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 75,
"end": 94,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 76,
"end": 93,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 76,
"end": 77,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": {
"type": "TsKeywordType",
"span": {
"start": 86,
"end": 93,
"ctxt": 0
},
"kind": "boolean"
},
"default": null
}
]
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 97,
"end": 100,
"ctxt": 0
},
"kind": "any"
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 152,
"end": 204,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 157,
"end": 163,
"ctxt": 0
},
"value": "T_ERR1",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 166,
"end": 203,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 166,
"end": 182,
"ctxt": 0
},
"value": "CheckBooleanOnly",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 182,
"end": 203,
"ctxt": 0
},
"params": [
{
"type": "TsUnionType",
"span": {
"start": 183,
"end": 202,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 183,
"end": 190,
"ctxt": 0
},
"kind": "boolean"
},
{
"type": "TsKeywordType",
"span": {
"start": 193,
"end": 202,
"ctxt": 0
},
"kind": "undefined"
}
]
}
]
}
}
},
{
"type": "TsEnumDeclaration",
"span": {
"start": 206,
"end": 235,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 211,
"end": 223,
"ctxt": 0
},
"value": "NumericEnum1",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 226,
"end": 227,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 226,
"end": 227,
"ctxt": 0
},
"value": "A",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 229,
"end": 230,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 229,
"end": 230,
"ctxt": 0
},
"value": "B",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 232,
"end": 233,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 232,
"end": 233,
"ctxt": 0
},
"value": "C",
"optional": false
},
"init": null
}
]
},
{
"type": "TsEnumDeclaration",
"span": {
"start": 236,
"end": 278,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 241,
"end": 253,
"ctxt": 0
},
"value": "NumericEnum2",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 256,
"end": 261,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 256,
"end": 257,
"ctxt": 0
},
"value": "A",
"optional": false
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 260,
"end": 261,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
},
{
"type": "TsEnumMember",
"span": {
"start": 263,
"end": 268,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 263,
"end": 264,
"ctxt": 0
},
"value": "B",
"optional": false
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 267,
"end": 268,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
},
{
"type": "TsEnumMember",
"span": {
"start": 271,
"end": 276,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 271,
"end": 272,
"ctxt": 0
},
"value": "C",
"optional": false
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 275,
"end": 276,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
}
]
},
{
"type": "TsEnumDeclaration",
"span": {
"start": 279,
"end": 323,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 284,
"end": 295,
"ctxt": 0
},
"value": "StringEnum1",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 298,
"end": 309,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 298,
"end": 299,
"ctxt": 0
},
"value": "A",
"optional": false
},
"init": {
"type": "StringLiteral",
"span": {
"start": 302,
"end": 309,
"ctxt": 0
},
"value": "Alpha",
"raw": "\"Alpha\""
}
},
{
"type": "TsEnumMember",
"span": {
"start": 311,
"end": 321,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 311,
"end": 312,
"ctxt": 0
},
"value": "B",
"optional": false
},
"init": {
"type": "StringLiteral",
"span": {
"start": 315,
"end": 321,
"ctxt": 0
},
"value": "Beta",
"raw": "\"Beta\""
}
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 325,
"end": 372,
"ctxt": 0
},
"kind": "const",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 339,
"end": 371,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 339,
"end": 345,
"ctxt": 0
},
"value": "strMap",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 345,
"end": 371,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 347,
"end": 371,
"ctxt": 0
},
"members": [
{
"type": "TsIndexSignature",
"params": [
{
"type": "Identifier",
"span": {
"start": 350,
"end": 359,
"ctxt": 0
},
"value": "s",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 351,
"end": 359,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 353,
"end": 359,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 360,
"end": 369,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 362,
"end": 369,
"ctxt": 0
},
"kind": "boolean"
}
},
"readonly": false,
"static": false,
"span": {
"start": 349,
"end": 369,
"ctxt": 0
}
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 407,
"end": 441,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 413,
"end": 440,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 413,
"end": 415,
"ctxt": 0
},
"value": "e1",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 415,
"end": 424,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 417,
"end": 424,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 427,
"end": 440,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 427,
"end": 433,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 433,
"end": 440,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 434,
"end": 439,
"ctxt": 0
},
"value": "foo",
"raw": "\"foo\""
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 442,
"end": 473,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 448,
"end": 472,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 448,
"end": 450,
"ctxt": 0
},
"value": "e2",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 450,
"end": 459,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 452,
"end": 459,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 462,
"end": 472,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 462,
"end": 468,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 469,
"end": 472,
"ctxt": 0
},
"value": "bar",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 474,
"end": 504,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 480,
"end": 503,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 480,
"end": 482,
"ctxt": 0
},
"value": "e3",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 482,
"end": 491,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 484,
"end": 491,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 494,
"end": 503,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 494,
"end": 500,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 500,
"end": 503,
"ctxt": 0
},
"expression": {
"type": "NumericLiteral",
"span": {
"start": 501,
"end": 502,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 505,
"end": 554,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 511,
"end": 553,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 511,
"end": 513,
"ctxt": 0
},
"value": "e4",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 513,
"end": 522,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 515,
"end": 522,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 525,
"end": 553,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 525,
"end": 531,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 531,
"end": 553,
"ctxt": 0
},
"expression": {
"type": "TsAsExpression",
"span": {
"start": 532,
"end": 552,
"ctxt": 0
},
"expression": {
"type": "NumericLiteral",
"span": {
"start": 532,
"end": 533,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 537,
"end": 552,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 537,
"end": 543,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
"start": 546,
"end": 552,
"ctxt": 0
},
"kind": "number"
}
]
}
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 555,
"end": 603,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 561,
"end": 602,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 561,
"end": 563,
"ctxt": 0
},
"value": "e5",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 563,
"end": 572,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 565,
"end": 572,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 575,
"end": 602,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 575,
"end": 581,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 581,
"end": 602,
"ctxt": 0
},
"expression": {
"type": "TsAsExpression",
"span": {
"start": 582,
"end": 601,
"ctxt": 0
},
"expression": {
"type": "NumericLiteral",
"span": {
"start": 582,
"end": 583,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 587,
"end": 601,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 587,
"end": 593,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsLiteralType",
"span": {
"start": 596,
"end": 597,
"ctxt": 0
},
"literal": {
"type": "NumericLiteral",
"span": {
"start": 596,
"end": 597,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
},
{
"type": "TsLiteralType",
"span": {
"start": 600,
"end": 601,
"ctxt": 0
},
"literal": {
"type": "NumericLiteral",
"span": {
"start": 600,
"end": 601,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
]
}
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 604,
"end": 643,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 610,
"end": 642,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 610,
"end": 612,
"ctxt": 0
},
"value": "e6",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 612,
"end": 621,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 614,
"end": 621,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 624,
"end": 642,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 624,
"end": 630,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 630,
"end": 642,
"ctxt": 0
},
"expression": {
"type": "TsAsExpression",
"span": {
"start": 631,
"end": 641,
"ctxt": 0
},
"expression": {
"type": "NumericLiteral",
"span": {
"start": 631,
"end": 632,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 636,
"end": 641,
"ctxt": 0
},
"types": [
{
"type": "TsLiteralType",
"span": {
"start": 636,
"end": 637,
"ctxt": 0
},
"literal": {
"type": "NumericLiteral",
"span": {
"start": 636,
"end": 637,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
},
{
"type": "TsLiteralType",
"span": {
"start": 640,
"end": 641,
"ctxt": 0
},
"literal": {
"type": "NumericLiteral",
"span": {
"start": 640,
"end": 641,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
]
}
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 644,
"end": 695,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 650,
"end": 694,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 650,
"end": 652,
"ctxt": 0
},
"value": "e7",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 652,
"end": 661,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 654,
"end": 661,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 664,
"end": 694,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 664,
"end": 670,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 670,
"end": 694,
"ctxt": 0
},
"expression": {
"type": "TsAsExpression",
"span": {
"start": 671,
"end": 693,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 671,
"end": 676,
"ctxt": 0
},
"value": "foo",
"raw": "\"foo\""
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 680,
"end": 693,
"ctxt": 0
},
"types": [
{
"type": "TsLiteralType",
"span": {
"start": 680,
"end": 685,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
"start": 680,
"end": 685,
"ctxt": 0
},
"value": "foo",
"raw": "\"foo\""
}
},
{
"type": "TsLiteralType",
"span": {
"start": 688,
"end": 693,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
"start": 688,
"end": 693,
"ctxt": 0
},
"value": "baz",
"raw": "\"baz\""
}
}
]
}
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 696,
"end": 739,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 702,
"end": 738,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 702,
"end": 704,
"ctxt": 0
},
"value": "e8",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 704,
"end": 713,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 706,
"end": 713,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 716,
"end": 738,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 716,
"end": 722,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 722,
"end": 738,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 723,
"end": 737,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 723,
"end": 735,
"ctxt": 0
},
"value": "NumericEnum1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 736,
"end": 737,
"ctxt": 0
},
"value": "A",
"optional": false
}
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 740,
"end": 783,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 746,
"end": 782,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 746,
"end": 748,
"ctxt": 0
},
"value": "e9",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 748,
"end": 757,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 750,
"end": 757,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 760,
"end": 782,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 760,
"end": 766,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 766,
"end": 782,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 767,
"end": 781,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 767,
"end": 779,
"ctxt": 0
},
"value": "NumericEnum2",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 780,
"end": 781,
"ctxt": 0
},
"value": "A",
"optional": false
}
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 784,
"end": 827,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 790,
"end": 826,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 790,
"end": 793,
"ctxt": 0
},
"value": "e10",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 793,
"end": 802,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 795,
"end": 802,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 805,
"end": 826,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 805,
"end": 811,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 811,
"end": 826,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 812,
"end": 825,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 812,
"end": 823,
"ctxt": 0
},
"value": "StringEnum1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 824,
"end": 825,
"ctxt": 0
},
"value": "A",
"optional": false
}
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 828,
"end": 886,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 834,
"end": 885,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 834,
"end": 837,
"ctxt": 0
},
"value": "e11",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 837,
"end": 846,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 839,
"end": 846,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 849,
"end": 885,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 849,
"end": 855,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 855,
"end": 885,
"ctxt": 0
},
"expression": {
"type": "TsAsExpression",
"span": {
"start": 856,
"end": 884,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 856,
"end": 869,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 856,
"end": 867,
"ctxt": 0
},
"value": "StringEnum1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 868,
"end": 869,
"ctxt": 0
},
"value": "A",
"optional": false
}
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 873,
"end": 884,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 873,
"end": 884,
"ctxt": 0
},
"value": "StringEnum1",
"optional": false
},
"typeParams": null
}
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 887,
"end": 947,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 893,
"end": 946,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 893,
"end": 896,
"ctxt": 0
},
"value": "e12",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 896,
"end": 905,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 898,
"end": 905,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 908,
"end": 946,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 908,
"end": 914,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 914,
"end": 946,
"ctxt": 0
},
"expression": {
"type": "TsAsExpression",
"span": {
"start": 915,
"end": 945,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 915,
"end": 929,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 915,
"end": 927,
"ctxt": 0
},
"value": "NumericEnum1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 928,
"end": 929,
"ctxt": 0
},
"value": "A",
"optional": false
}
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 933,
"end": 945,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 933,
"end": 945,
"ctxt": 0
},
"value": "NumericEnum1",
"optional": false
},
"typeParams": null
}
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 948,
"end": 1008,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 954,
"end": 1007,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 954,
"end": 957,
"ctxt": 0
},
"value": "e13",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 957,
"end": 966,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 959,
"end": 966,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 969,
"end": 1007,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 969,
"end": 975,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 975,
"end": 1007,
"ctxt": 0
},
"expression": {
"type": "TsAsExpression",
"span": {
"start": 976,
"end": 1006,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 976,
"end": 990,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 976,
"end": 988,
"ctxt": 0
},
"value": "NumericEnum2",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 989,
"end": 990,
"ctxt": 0
},
"value": "A",
"optional": false
}
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 994,
"end": 1006,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 994,
"end": 1006,
"ctxt": 0
},
"value": "NumericEnum2",
"optional": false
},
"typeParams": null
}
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1009,
"end": 1050,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1015,
"end": 1049,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1015,
"end": 1018,
"ctxt": 0
},
"value": "e14",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1018,
"end": 1027,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1020,
"end": 1027,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 1030,
"end": 1049,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1030,
"end": 1036,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 1036,
"end": 1049,
"ctxt": 0
},
"expression": {
"type": "TsAsExpression",
"span": {
"start": 1037,
"end": 1048,
"ctxt": 0
},
"expression": {
"type": "NullLiteral",
"span": {
"start": 1037,
"end": 1041,
"ctxt": 0
}
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1045,
"end": 1048,
"ctxt": 0
},
"kind": "any"
}
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1068,
"end": 1115,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1074,
"end": 1114,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1074,
"end": 1077,
"ctxt": 0
},
"value": "ok1",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1077,
"end": 1098,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 1079,
"end": 1098,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 1079,
"end": 1086,
"ctxt": 0
},
"kind": "boolean"
},
{
"type": "TsKeywordType",
"span": {
"start": 1089,
"end": 1098,
"ctxt": 0
},
"kind": "undefined"
}
]
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 1101,
"end": 1114,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1101,
"end": 1107,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 1107,
"end": 1114,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 1108,
"end": 1113,
"ctxt": 0
},
"value": "foo",
"raw": "\"foo\""
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1116,
"end": 1160,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1122,
"end": 1159,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1122,
"end": 1125,
"ctxt": 0
},
"value": "ok2",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1125,
"end": 1146,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 1127,
"end": 1146,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 1127,
"end": 1134,
"ctxt": 0
},
"kind": "boolean"
},
{
"type": "TsKeywordType",
"span": {
"start": 1137,
"end": 1146,
"ctxt": 0
},
"kind": "undefined"
}
]
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 1149,
"end": 1159,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1149,
"end": 1155,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1156,
"end": 1159,
"ctxt": 0
},
"value": "bar",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 1162,
"end": 1217,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 1167,
"end": 1172,
"ctxt": 0
},
"value": "T_OK1",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1175,
"end": 1216,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1175,
"end": 1191,
"ctxt": 0
},
"value": "CheckBooleanOnly",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 1191,
"end": 1216,
"ctxt": 0
},
"params": [
{
"type": "TsIndexedAccessType",
"span": {
"start": 1192,
"end": 1215,
"ctxt": 0
},
"readonly": false,
"objectType": {
"type": "TsParenthesizedType",
"span": {
"start": 1192,
"end": 1207,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeQuery",
"span": {
"start": 1193,
"end": 1206,
"ctxt": 0
},
"exprName": {
"type": "Identifier",
"span": {
"start": 1200,
"end": 1206,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"typeArguments": null
}
},
"indexType": {
"type": "TsKeywordType",
"span": {
"start": 1208,
"end": 1214,
"ctxt": 0
},
"kind": "string"
}
}
]
}
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 1218,
"end": 1272,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 1223,
"end": 1228,
"ctxt": 0
},
"value": "T_OK2",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1231,
"end": 1271,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1231,
"end": 1247,
"ctxt": 0
},
"value": "CheckBooleanOnly",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 1247,
"end": 1271,
"ctxt": 0
},
"params": [
{
"type": "TsIndexedAccessType",
"span": {
"start": 1248,
"end": 1270,
"ctxt": 0
},
"readonly": false,
"objectType": {
"type": "TsParenthesizedType",
"span": {
"start": 1248,
"end": 1263,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeQuery",
"span": {
"start": 1249,
"end": 1262,
"ctxt": 0
},
"exprName": {
"type": "Identifier",
"span": {
"start": 1256,
"end": 1262,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"typeArguments": null
}
},
"indexType": {
"type": "TsLiteralType",
"span": {
"start": 1264,
"end": 1269,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
"start": 1264,
"end": 1269,
"ctxt": 0
},
"value": "foo",
"raw": "\"foo\""
}
}
}
]
}
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 1273,
"end": 1335,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 1278,
"end": 1283,
"ctxt": 0
},
"value": "T_OK3",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1286,
"end": 1334,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1286,
"end": 1302,
"ctxt": 0
},
"value": "CheckBooleanOnly",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 1302,
"end": 1334,
"ctxt": 0
},
"params": [
{
"type": "TsIndexedAccessType",
"span": {
"start": 1303,
"end": 1333,
"ctxt": 0
},
"readonly": false,
"objectType": {
"type": "TsParenthesizedType",
"span": {
"start": 1303,
"end": 1318,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeQuery",
"span": {
"start": 1304,
"end": 1317,
"ctxt": 0
},
"exprName": {
"type": "Identifier",
"span": {
"start": 1311,
"end": 1317,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"typeArguments": null
}
},
"indexType": {
"type": "TsUnionType",
"span": {
"start": 1319,
"end": 1332,
"ctxt": 0
},
"types": [
{
"type": "TsLiteralType",
"span": {
"start": 1319,
"end": 1324,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
"start": 1319,
"end": 1324,
"ctxt": 0
},
"value": "bar",
"raw": "\"bar\""
}
},
{
"type": "TsLiteralType",
"span": {
"start": 1327,
"end": 1332,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
"start": 1327,
"end": 1332,
"ctxt": 0
},
"value": "baz",
"raw": "\"baz\""
}
}
]
}
}
]
}
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 1336,
"end": 1391,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 1341,
"end": 1346,
"ctxt": 0
},
"value": "T_OK4",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1349,
"end": 1390,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1349,
"end": 1365,
"ctxt": 0
},
"value": "CheckBooleanOnly",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 1365,
"end": 1390,
"ctxt": 0
},
"params": [
{
"type": "TsIndexedAccessType",
"span": {
"start": 1366,
"end": 1389,
"ctxt": 0
},
"readonly": false,
"objectType": {
"type": "TsParenthesizedType",
"span": {
"start": 1366,
"end": 1381,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeQuery",
"span": {
"start": 1367,
"end": 1380,
"ctxt": 0
},
"exprName": {
"type": "Identifier",
"span": {
"start": 1374,
"end": 1380,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"typeArguments": null
}
},
"indexType": {
"type": "TsKeywordType",
"span": {
"start": 1382,
"end": 1388,
"ctxt": 0
},
"kind": "number"
}
}
]
}
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 1392,
"end": 1444,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 1397,
"end": 1402,
"ctxt": 0
},
"value": "T_OK5",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1405,
"end": 1443,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1405,
"end": 1421,
"ctxt": 0
},
"value": "CheckBooleanOnly",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 1421,
"end": 1443,
"ctxt": 0
},
"params": [
{
"type": "TsIndexedAccessType",
"span": {
"start": 1422,
"end": 1442,
"ctxt": 0
},
"readonly": false,
"objectType": {
"type": "TsParenthesizedType",
"span": {
"start": 1422,
"end": 1437,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeQuery",
"span": {
"start": 1423,
"end": 1436,
"ctxt": 0
},
"exprName": {
"type": "Identifier",
"span": {
"start": 1430,
"end": 1436,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"typeArguments": null
}
},
"indexType": {
"type": "TsKeywordType",
"span": {
"start": 1438,
"end": 1441,
"ctxt": 0
},
"kind": "any"
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1502,
"end": 1528,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1502,
"end": 1527,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 1502,
"end": 1515,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1502,
"end": 1508,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 1508,
"end": 1515,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 1509,
"end": 1514,
"ctxt": 0
},
"value": "baz",
"raw": "\"baz\""
}
}
},
"right": {
"type": "Identifier",
"span": {
"start": 1518,
"end": 1527,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1529,
"end": 1552,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1529,
"end": 1551,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 1529,
"end": 1539,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1529,
"end": 1535,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1536,
"end": 1539,
"ctxt": 0
},
"value": "qua",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 1542,
"end": 1551,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1553,
"end": 1575,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1553,
"end": 1574,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 1553,
"end": 1562,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1553,
"end": 1559,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 1559,
"end": 1562,
"ctxt": 0
},
"expression": {
"type": "NumericLiteral",
"span": {
"start": 1560,
"end": 1561,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
}
},
"right": {
"type": "Identifier",
"span": {
"start": 1565,
"end": 1574,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1576,
"end": 1608,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1576,
"end": 1607,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 1576,
"end": 1595,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1576,
"end": 1582,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 1582,
"end": 1595,
"ctxt": 0
},
"expression": {
"type": "TsAsExpression",
"span": {
"start": 1583,
"end": 1594,
"ctxt": 0
},
"expression": {
"type": "NullLiteral",
"span": {
"start": 1583,
"end": 1587,
"ctxt": 0
}
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1591,
"end": 1594,
"ctxt": 0
},
"kind": "any"
}
}
}
},
"right": {
"type": "Identifier",
"span": {
"start": 1598,
"end": 1607,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 1644,
"end": 1691,
"ctxt": 0
},
"kind": "const",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1658,
"end": 1690,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1658,
"end": 1664,
"ctxt": 0
},
"value": "numMap",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1664,
"end": 1690,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 1666,
"end": 1690,
"ctxt": 0
},
"members": [
{
"type": "TsIndexSignature",
"params": [
{
"type": "Identifier",
"span": {
"start": 1669,
"end": 1678,
"ctxt": 0
},
"value": "s",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1670,
"end": 1678,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1672,
"end": 1678,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1679,
"end": 1688,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1681,
"end": 1688,
"ctxt": 0
},
"kind": "boolean"
}
},
"readonly": false,
"static": false,
"span": {
"start": 1668,
"end": 1688,
"ctxt": 0
}
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1721,
"end": 1756,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1727,
"end": 1755,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1727,
"end": 1734,
"ctxt": 0
},
"value": "num_ok1",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1734,
"end": 1743,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1736,
"end": 1743,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 1746,
"end": 1755,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1746,
"end": 1752,
"ctxt": 0
},
"value": "numMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 1752,
"end": 1755,
"ctxt": 0
},
"expression": {
"type": "NumericLiteral",
"span": {
"start": 1753,
"end": 1754,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1757,
"end": 1802,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1763,
"end": 1801,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1763,
"end": 1770,
"ctxt": 0
},
"value": "num_ok2",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1770,
"end": 1779,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1772,
"end": 1779,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 1782,
"end": 1801,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1782,
"end": 1788,
"ctxt": 0
},
"value": "numMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 1788,
"end": 1801,
"ctxt": 0
},
"expression": {
"type": "TsAsExpression",
"span": {
"start": 1789,
"end": 1800,
"ctxt": 0
},
"expression": {
"type": "NumericLiteral",
"span": {
"start": 1789,
"end": 1790,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1794,
"end": 1800,
"ctxt": 0
},
"kind": "number"
}
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1803,
"end": 1847,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1809,
"end": 1846,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1809,
"end": 1816,
"ctxt": 0
},
"value": "num_ok3",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1816,
"end": 1825,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1818,
"end": 1825,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 1828,
"end": 1846,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1828,
"end": 1834,
"ctxt": 0
},
"value": "numMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 1834,
"end": 1846,
"ctxt": 0
},
"expression": {
"type": "TsAsExpression",
"span": {
"start": 1835,
"end": 1845,
"ctxt": 0
},
"expression": {
"type": "NumericLiteral",
"span": {
"start": 1835,
"end": 1836,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 1840,
"end": 1845,
"ctxt": 0
},
"types": [
{
"type": "TsLiteralType",
"span": {
"start": 1840,
"end": 1841,
"ctxt": 0
},
"literal": {
"type": "NumericLiteral",
"span": {
"start": 1840,
"end": 1841,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
},
{
"type": "TsLiteralType",
"span": {
"start": 1844,
"end": 1845,
"ctxt": 0
},
"literal": {
"type": "NumericLiteral",
"span": {
"start": 1844,
"end": 1845,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
]
}
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1848,
"end": 1896,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1854,
"end": 1895,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1854,
"end": 1861,
"ctxt": 0
},
"value": "num_ok4",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1861,
"end": 1870,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1863,
"end": 1870,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 1873,
"end": 1895,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1873,
"end": 1879,
"ctxt": 0
},
"value": "numMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 1879,
"end": 1895,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 1880,
"end": 1894,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1880,
"end": 1892,
"ctxt": 0
},
"value": "NumericEnum1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1893,
"end": 1894,
"ctxt": 0
},
"value": "A",
"optional": false
}
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1897,
"end": 1945,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1903,
"end": 1944,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1903,
"end": 1910,
"ctxt": 0
},
"value": "num_ok5",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1910,
"end": 1919,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1912,
"end": 1919,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 1922,
"end": 1944,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1922,
"end": 1928,
"ctxt": 0
},
"value": "numMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 1928,
"end": 1944,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 1929,
"end": 1943,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1929,
"end": 1941,
"ctxt": 0
},
"value": "NumericEnum2",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1942,
"end": 1943,
"ctxt": 0
},
"value": "A",
"optional": false
}
}
}
},
"definite": false
}
]
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 1968,
"end": 1976,
"ctxt": 0
},
"value": "generic1",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 2013,
"end": 2019,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 2013,
"end": 2019,
"ctxt": 0
},
"value": "arg",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2016,
"end": 2019,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 2018,
"end": 2019,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 2018,
"end": 2019,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 1959,
"end": 2077,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 2030,
"end": 2077,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 2056,
"end": 2075,
"ctxt": 0
},
"argument": {
"type": "MemberExpression",
"span": {
"start": 2063,
"end": 2074,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 2063,
"end": 2066,
"ctxt": 0
},
"value": "arg",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 2066,
"end": 2074,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 2067,
"end": 2073,
"ctxt": 0
},
"value": "blah",
"raw": "\"blah\""
}
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 1976,
"end": 2012,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 1977,
"end": 2011,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 1977,
"end": 1978,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": {
"type": "TsTypeLiteral",
"span": {
"start": 1987,
"end": 2011,
"ctxt": 0
},
"members": [
{
"type": "TsIndexSignature",
"params": [
{
"type": "Identifier",
"span": {
"start": 1990,
"end": 1999,
"ctxt": 0
},
"value": "s",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1991,
"end": 1999,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1993,
"end": 1999,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2000,
"end": 2009,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 2002,
"end": 2009,
"ctxt": 0
},
"kind": "boolean"
}
},
"readonly": false,
"static": false,
"span": {
"start": 1989,
"end": 2009,
"ctxt": 0
}
}
]
},
"default": null
}
]
},
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 2020,
"end": 2029,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 2022,
"end": 2029,
"ctxt": 0
},
"kind": "boolean"
}
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 2087,
"end": 2095,
"ctxt": 0
},
"value": "generic2",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 2132,
"end": 2138,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 2132,
"end": 2138,
"ctxt": 0
},
"value": "arg",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2135,
"end": 2138,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 2137,
"end": 2138,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 2137,
"end": 2138,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 2078,
"end": 2194,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 2149,
"end": 2194,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 2172,
"end": 2192,
"ctxt": 0
},
"argument": {
"type": "TsNonNullExpression",
"span": {
"start": 2179,
"end": 2191,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 2179,
"end": 2190,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 2179,
"end": 2182,
"ctxt": 0
},
"value": "arg",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 2182,
"end": 2190,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 2183,
"end": 2189,
"ctxt": 0
},
"value": "blah",
"raw": "\"blah\""
}
}
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 2095,
"end": 2131,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 2096,
"end": 2130,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 2096,
"end": 2097,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": {
"type": "TsTypeLiteral",
"span": {
"start": 2106,
"end": 2130,
"ctxt": 0
},
"members": [
{
"type": "TsIndexSignature",
"params": [
{
"type": "Identifier",
"span": {
"start": 2109,
"end": 2118,
"ctxt": 0
},
"value": "s",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2110,
"end": 2118,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 2112,
"end": 2118,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2119,
"end": 2128,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 2121,
"end": 2128,
"ctxt": 0
},
"kind": "boolean"
}
},
"readonly": false,
"static": false,
"span": {
"start": 2108,
"end": 2128,
"ctxt": 0
}
}
]
},
"default": null
}
]
},
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 2139,
"end": 2148,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 2141,
"end": 2148,
"ctxt": 0
},
"kind": "boolean"
}
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 2204,
"end": 2212,
"ctxt": 0
},
"value": "generic3",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 2231,
"end": 2237,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 2231,
"end": 2237,
"ctxt": 0
},
"value": "arg",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2234,
"end": 2237,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 2236,
"end": 2237,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 2236,
"end": 2237,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 2195,
"end": 2295,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 2248,
"end": 2295,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 2274,
"end": 2293,
"ctxt": 0
},
"argument": {
"type": "MemberExpression",
"span": {
"start": 2281,
"end": 2292,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 2281,
"end": 2287,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 2287,
"end": 2292,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 2288,
"end": 2291,
"ctxt": 0
},
"value": "arg",
"optional": false
}
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 2212,
"end": 2230,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 2213,
"end": 2229,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 2213,
"end": 2214,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": {
"type": "TsKeywordType",
"span": {
"start": 2223,
"end": 2229,
"ctxt": 0
},
"kind": "string"
},
"default": null
}
]
},
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 2238,
"end": 2247,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 2240,
"end": 2247,
"ctxt": 0
},
"kind": "boolean"
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 2343,
"end": 2420,
"ctxt": 0
},
"kind": "const",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 2357,
"end": 2419,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 2357,
"end": 2361,
"ctxt": 0
},
"value": "obj1",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2361,
"end": 2419,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 2363,
"end": 2419,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 2365,
"end": 2375,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 2365,
"end": 2366,
"ctxt": 0
},
"value": "x",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2366,
"end": 2374,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 2368,
"end": 2374,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 2376,
"end": 2386,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 2376,
"end": 2377,
"ctxt": 0
},
"value": "y",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2377,
"end": 2385,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 2379,
"end": 2385,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
},
{
"type": "TsIndexSignature",
"params": [
{
"type": "Identifier",
"span": {
"start": 2388,
"end": 2399,
"ctxt": 0
},
"value": "key",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2391,
"end": 2399,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 2393,
"end": 2399,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2400,
"end": 2417,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 2402,
"end": 2417,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 2402,
"end": 2408,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
"start": 2411,
"end": 2417,
"ctxt": 0
},
"kind": "number"
}
]
}
},
"readonly": false,
"static": false,
"span": {
"start": 2387,
"end": 2417,
"ctxt": 0
}
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 2421,
"end": 2431,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 2421,
"end": 2430,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 2421,
"end": 2425,
"ctxt": 0
},
"value": "obj1",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 2425,
"end": 2430,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 2426,
"end": 2429,
"ctxt": 0
},
"value": "x",
"raw": "\"x\""
}
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 2432,
"end": 2446,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 2438,
"end": 2445,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 2438,
"end": 2439,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "StringLiteral",
"span": {
"start": 2442,
"end": 2445,
"ctxt": 0
},
"value": "y",
"raw": "\"y\""
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 2447,
"end": 2455,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 2447,
"end": 2454,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 2447,
"end": 2451,
"ctxt": 0
},
"value": "obj1",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 2451,
"end": 2454,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 2452,
"end": 2453,
"ctxt": 0
},
"value": "y",
"optional": false
}
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 2456,
"end": 2469,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 2460,
"end": 2468,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 2460,
"end": 2462,
"ctxt": 0
},
"value": "yy",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "StringLiteral",
"span": {
"start": 2465,
"end": 2468,
"ctxt": 0
},
"value": "y",
"raw": "\"y\""
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 2470,
"end": 2479,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 2470,
"end": 2478,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 2470,
"end": 2474,
"ctxt": 0
},
"value": "obj1",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 2474,
"end": 2478,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 2475,
"end": 2477,
"ctxt": 0
},
"value": "yy",
"optional": false
}
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 2480,
"end": 2492,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 2484,
"end": 2491,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 2484,
"end": 2485,
"ctxt": 0
},
"value": "z",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "StringLiteral",
"span": {
"start": 2488,
"end": 2491,
"ctxt": 0
},
"value": "z",
"raw": "\"z\""
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 2493,
"end": 2501,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 2493,
"end": 2500,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 2493,
"end": 2497,
"ctxt": 0
},
"value": "obj1",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 2497,
"end": 2500,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 2498,
"end": 2499,
"ctxt": 0
},
"value": "z",
"optional": false
}
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 2527,
"end": 2605,
"ctxt": 0
},
"kind": "const",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 2541,
"end": 2604,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 2541,
"end": 2552,
"ctxt": 0
},
"value": "strMapUnion",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2552,
"end": 2604,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 2554,
"end": 2604,
"ctxt": 0
},
"types": [
{
"type": "TsTypeLiteral",
"span": {
"start": 2554,
"end": 2578,
"ctxt": 0
},
"members": [
{
"type": "TsIndexSignature",
"params": [
{
"type": "Identifier",
"span": {
"start": 2557,
"end": 2566,
"ctxt": 0
},
"value": "s",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2558,
"end": 2566,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 2560,
"end": 2566,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2567,
"end": 2576,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 2569,
"end": 2576,
"ctxt": 0
},
"kind": "boolean"
}
},
"readonly": false,
"static": false,
"span": {
"start": 2556,
"end": 2576,
"ctxt": 0
}
}
]
},
{
"type": "TsTypeLiteral",
"span": {
"start": 2581,
"end": 2604,
"ctxt": 0
},
"members": [
{
"type": "TsIndexSignature",
"params": [
{
"type": "Identifier",
"span": {
"start": 2584,
"end": 2593,
"ctxt": 0
},
"value": "s",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2585,
"end": 2593,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 2587,
"end": 2593,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2594,
"end": 2602,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 2596,
"end": 2602,
"ctxt": 0
},
"kind": "number"
}
},
"readonly": false,
"static": false,
"span": {
"start": 2583,
"end": 2602,
"ctxt": 0
}
}
]
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 2622,
"end": 2670,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 2628,
"end": 2669,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 2628,
"end": 2630,
"ctxt": 0
},
"value": "f1",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2630,
"end": 2648,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 2632,
"end": 2648,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 2632,
"end": 2639,
"ctxt": 0
},
"kind": "boolean"
},
{
"type": "TsKeywordType",
"span": {
"start": 2642,
"end": 2648,
"ctxt": 0
},
"kind": "number"
}
]
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 2651,
"end": 2669,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 2651,
"end": 2662,
"ctxt": 0
},
"value": "strMapUnion",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 2662,
"end": 2669,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 2663,
"end": 2668,
"ctxt": 0
},
"value": "foo",
"raw": "\"foo\""
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 2699,
"end": 2730,
"ctxt": 0
},
"kind": "const",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 2713,
"end": 2729,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 2713,
"end": 2714,
"ctxt": 0
},
"value": "s",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2714,
"end": 2729,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeOperator",
"span": {
"start": 2716,
"end": 2729,
"ctxt": 0
},
"op": "unique",
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 2723,
"end": 2729,
"ctxt": 0
},
"kind": "symbol"
}
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 2731,
"end": 2772,
"ctxt": 0
},
"kind": "const",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 2745,
"end": 2771,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 2745,
"end": 2754,
"ctxt": 0
},
"value": "symbolMap",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2754,
"end": 2771,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 2756,
"end": 2771,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 2758,
"end": 2769,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 2759,
"end": 2760,
"ctxt": 0
},
"value": "s",
"optional": false
},
"computed": true,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2761,
"end": 2769,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 2763,
"end": 2769,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 2773,
"end": 2806,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 2779,
"end": 2805,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 2779,
"end": 2782,
"ctxt": 0
},
"value": "e15",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2782,
"end": 2790,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 2784,
"end": 2790,
"ctxt": 0
},
"kind": "string"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 2793,
"end": 2805,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 2793,
"end": 2802,
"ctxt": 0
},
"value": "symbolMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 2802,
"end": 2805,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 2803,
"end": 2804,
"ctxt": 0
},
"value": "s",
"optional": false
}
}
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 2820,
"end": 2845,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 2820,
"end": 2844,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 2820,
"end": 2832,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 2820,
"end": 2829,
"ctxt": 0
},
"value": "symbolMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 2829,
"end": 2832,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 2830,
"end": 2831,
"ctxt": 0
},
"value": "s",
"optional": false
}
}
},
"right": {
"type": "Identifier",
"span": {
"start": 2835,
"end": 2844,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 2882,
"end": 2939,
"ctxt": 0
},
"kind": "const",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 2896,
"end": 2938,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 2896,
"end": 2915,
"ctxt": 0
},
"value": "nonEmptyStringArray",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2915,
"end": 2938,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTupleType",
"span": {
"start": 2917,
"end": 2938,
"ctxt": 0
},
"elemTypes": [
{
"type": "TsTupleElement",
"span": {
"start": 2918,
"end": 2924,
"ctxt": 0
},
"label": null,
"ty": {
"type": "TsKeywordType",
"span": {
"start": 2918,
"end": 2924,
"ctxt": 0
},
"kind": "string"
}
},
{
"type": "TsTupleElement",
"span": {
"start": 2926,
"end": 2937,
"ctxt": 0
},
"label": null,
"ty": {
"type": "TsRestType",
"span": {
"start": 2926,
"end": 2937,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 2929,
"end": 2937,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 2929,
"end": 2935,
"ctxt": 0
},
"kind": "string"
}
}
}
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 2940,
"end": 2991,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 2946,
"end": 2990,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 2946,
"end": 2957,
"ctxt": 0
},
"value": "variadicOk1",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2957,
"end": 2965,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 2959,
"end": 2965,
"ctxt": 0
},
"kind": "string"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 2968,
"end": 2990,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 2968,
"end": 2987,
"ctxt": 0
},
"value": "nonEmptyStringArray",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 2987,
"end": 2990,
"ctxt": 0
},
"expression": {
"type": "NumericLiteral",
"span": {
"start": 2988,
"end": 2989,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 3006,
"end": 3060,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 3012,
"end": 3059,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 3012,
"end": 3026,
"ctxt": 0
},
"value": "variadicError1",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 3026,
"end": 3034,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 3028,
"end": 3034,
"ctxt": 0
},
"kind": "string"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 3037,
"end": 3059,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 3037,
"end": 3056,
"ctxt": 0
},
"value": "nonEmptyStringArray",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 3056,
"end": 3059,
"ctxt": 0
},
"expression": {
"type": "NumericLiteral",
"span": {
"start": 3057,
"end": 3058,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 3100,
"end": 3150,
"ctxt": 0
},
"kind": "const",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 3114,
"end": 3149,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 3114,
"end": 3123,
"ctxt": 0
},
"value": "myRecord1",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 3123,
"end": 3149,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 3125,
"end": 3149,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 3127,
"end": 3137,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 3127,
"end": 3128,
"ctxt": 0
},
"value": "a",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 3128,
"end": 3136,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 3130,
"end": 3136,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 3138,
"end": 3147,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 3138,
"end": 3139,
"ctxt": 0
},
"value": "b",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 3139,
"end": 3147,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 3141,
"end": 3147,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 3151,
"end": 3224,
"ctxt": 0
},
"kind": "const",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 3165,
"end": 3223,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 3165,
"end": 3174,
"ctxt": 0
},
"value": "myRecord2",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 3174,
"end": 3223,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 3176,
"end": 3223,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 3178,
"end": 3188,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 3178,
"end": 3179,
"ctxt": 0
},
"value": "a",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 3179,
"end": 3187,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 3181,
"end": 3187,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 3189,
"end": 3199,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 3189,
"end": 3190,
"ctxt": 0
},
"value": "b",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 3190,
"end": 3198,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 3192,
"end": 3198,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsIndexSignature",
"params": [
{
"type": "Identifier",
"span": {
"start": 3201,
"end": 3212,
"ctxt": 0
},
"value": "key",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 3204,
"end": 3212,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 3206,
"end": 3212,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 3213,
"end": 3221,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 3215,
"end": 3221,
"ctxt": 0
},
"kind": "string"
}
},
"readonly": false,
"static": false,
"span": {
"start": 3200,
"end": 3221,
"ctxt": 0
}
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 3225,
"end": 3310,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 3231,
"end": 3309,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 3231,
"end": 3234,
"ctxt": 0
},
"value": "fn1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrowFunctionExpression",
"span": {
"start": 3237,
"end": 3309,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 3274,
"end": 3282,
"ctxt": 0
},
"value": "key",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 3277,
"end": 3282,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 3279,
"end": 3282,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 3279,
"end": 3282,
"ctxt": 0
},
"value": "Key",
"optional": false
},
"typeParams": null
}
}
}
],
"body": {
"type": "MemberExpression",
"span": {
"start": 3295,
"end": 3309,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 3295,
"end": 3304,
"ctxt": 0
},
"value": "myRecord1",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 3304,
"end": 3309,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 3305,
"end": 3308,
"ctxt": 0
},
"value": "key",
"optional": false
}
}
},
"async": false,
"generator": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 3237,
"end": 3273,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 3238,
"end": 3272,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 3238,
"end": 3241,
"ctxt": 0
},
"value": "Key",
"optional": false
},
"in": false,
"out": false,
"constraint": {
"type": "TsTypeOperator",
"span": {
"start": 3250,
"end": 3272,
"ctxt": 0
},
"op": "keyof",
"typeAnnotation": {
"type": "TsTypeQuery",
"span": {
"start": 3256,
"end": 3272,
"ctxt": 0
},
"exprName": {
"type": "Identifier",
"span": {
"start": 3263,
"end": 3272,
"ctxt": 0
},
"value": "myRecord1",
"optional": false
},
"typeArguments": null
}
},
"default": null
}
]
},
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 3283,
"end": 3291,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 3285,
"end": 3291,
"ctxt": 0
},
"kind": "string"
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 3324,
"end": 3409,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 3330,
"end": 3408,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 3330,
"end": 3333,
"ctxt": 0
},
"value": "fn2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrowFunctionExpression",
"span": {
"start": 3336,
"end": 3408,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 3373,
"end": 3381,
"ctxt": 0
},
"value": "key",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 3376,
"end": 3381,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 3378,
"end": 3381,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 3378,
"end": 3381,
"ctxt": 0
},
"value": "Key",
"optional": false
},
"typeParams": null
}
}
}
],
"body": {
"type": "MemberExpression",
"span": {
"start": 3394,
"end": 3408,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 3394,
"end": 3403,
"ctxt": 0
},
"value": "myRecord2",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 3403,
"end": 3408,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 3404,
"end": 3407,
"ctxt": 0
},
"value": "key",
"optional": false
}
}
},
"async": false,
"generator": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 3336,
"end": 3372,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 3337,
"end": 3371,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 3337,
"end": 3340,
"ctxt": 0
},
"value": "Key",
"optional": false
},
"in": false,
"out": false,
"constraint": {
"type": "TsTypeOperator",
"span": {
"start": 3349,
"end": 3371,
"ctxt": 0
},
"op": "keyof",
"typeAnnotation": {
"type": "TsTypeQuery",
"span": {
"start": 3355,
"end": 3371,
"ctxt": 0
},
"exprName": {
"type": "Identifier",
"span": {
"start": 3362,
"end": 3371,
"ctxt": 0
},
"value": "myRecord1",
"optional": false
},
"typeArguments": null
}
},
"default": null
}
]
},
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 3382,
"end": 3390,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 3384,
"end": 3390,
"ctxt": 0
},
"kind": "string"
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 3423,
"end": 3591,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 3429,
"end": 3590,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 3429,
"end": 3432,
"ctxt": 0
},
"value": "fn3",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrowFunctionExpression",
"span": {
"start": 3435,
"end": 3590,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 3472,
"end": 3480,
"ctxt": 0
},
"value": "key",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 3475,
"end": 3480,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 3477,
"end": 3480,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 3477,
"end": 3480,
"ctxt": 0
},
"value": "Key",
"optional": false
},
"typeParams": null
}
}
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 3485,
"end": 3590,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 3491,
"end": 3518,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 3491,
"end": 3517,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 3491,
"end": 3505,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 3491,
"end": 3500,
"ctxt": 0
},
"value": "myRecord2",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 3500,
"end": 3505,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 3501,
"end": 3504,
"ctxt": 0
},
"value": "key",
"optional": false
}
}
},
"right": {
"type": "Identifier",
"span": {
"start": 3508,
"end": 3517,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 3539,
"end": 3572,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 3545,
"end": 3571,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 3545,
"end": 3546,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 3546,
"end": 3554,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 3548,
"end": 3554,
"ctxt": 0
},
"kind": "string"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 3557,
"end": 3571,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 3557,
"end": 3566,
"ctxt": 0
},
"value": "myRecord2",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 3566,
"end": 3571,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 3567,
"end": 3570,
"ctxt": 0
},
"value": "key",
"optional": false
}
}
},
"definite": false
}
]
}
]
},
"async": false,
"generator": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 3435,
"end": 3471,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 3436,
"end": 3470,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 3436,
"end": 3439,
"ctxt": 0
},
"value": "Key",
"optional": false
},
"in": false,
"out": false,
"constraint": {
"type": "TsTypeOperator",
"span": {
"start": 3448,
"end": 3470,
"ctxt": 0
},
"op": "keyof",
"typeAnnotation": {
"type": "TsTypeQuery",
"span": {
"start": 3454,
"end": 3470,
"ctxt": 0
},
"exprName": {
"type": "Identifier",
"span": {
"start": 3461,
"end": 3470,
"ctxt": 0
},
"value": "myRecord2",
"optional": false
},
"typeArguments": null
}
},
"default": null
}
]
},
"returnType": null
},
"definite": false
}
]
}
],
"interpreter": null
}