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

6773 lines
177 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 53,
"end": 3590,
"ctxt": 0
},
"body": [
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 53,
"end": 100,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 58,
"end": 74,
"ctxt": 0
},
"value": "CheckBooleanOnly",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 74,
"end": 93,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 75,
"end": 92,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 75,
"end": 76,
"ctxt": 0
},
"value": "T",
"optional": false
},
"constraint": {
"type": "TsKeywordType",
"span": {
"start": 85,
"end": 92,
"ctxt": 0
},
"kind": "boolean"
},
"default": null
}
]
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 96,
"end": 99,
"ctxt": 0
},
"kind": "any"
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 151,
"end": 203,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 156,
"end": 162,
"ctxt": 0
},
"value": "T_ERR1",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 165,
"end": 202,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 165,
"end": 181,
"ctxt": 0
},
"value": "CheckBooleanOnly",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 181,
"end": 202,
"ctxt": 0
},
"params": [
{
"type": "TsUnionType",
"span": {
"start": 182,
"end": 201,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 182,
"end": 189,
"ctxt": 0
},
"kind": "boolean"
},
{
"type": "TsKeywordType",
"span": {
"start": 192,
"end": 201,
"ctxt": 0
},
"kind": "undefined"
}
]
}
]
}
}
},
{
"type": "TsEnumDeclaration",
"span": {
"start": 205,
"end": 234,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 210,
"end": 222,
"ctxt": 0
},
"value": "NumericEnum1",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 225,
"end": 226,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 225,
"end": 226,
"ctxt": 0
},
"value": "A",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 228,
"end": 229,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 228,
"end": 229,
"ctxt": 0
},
"value": "B",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 231,
"end": 232,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 231,
"end": 232,
"ctxt": 0
},
"value": "C",
"optional": false
},
"init": null
}
]
},
{
"type": "TsEnumDeclaration",
"span": {
"start": 235,
"end": 277,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 240,
"end": 252,
"ctxt": 0
},
"value": "NumericEnum2",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 255,
"end": 260,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 255,
"end": 256,
"ctxt": 0
},
"value": "A",
"optional": false
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 259,
"end": 260,
"ctxt": 0
},
"value": 0.0
}
},
{
"type": "TsEnumMember",
"span": {
"start": 262,
"end": 267,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 262,
"end": 263,
"ctxt": 0
},
"value": "B",
"optional": false
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 266,
"end": 267,
"ctxt": 0
},
"value": 1.0
}
},
{
"type": "TsEnumMember",
"span": {
"start": 270,
"end": 275,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 270,
"end": 271,
"ctxt": 0
},
"value": "C",
"optional": false
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 274,
"end": 275,
"ctxt": 0
},
"value": 2.0
}
}
]
},
{
"type": "TsEnumDeclaration",
"span": {
"start": 278,
"end": 322,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 283,
"end": 294,
"ctxt": 0
},
"value": "StringEnum1",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 297,
"end": 308,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 297,
"end": 298,
"ctxt": 0
},
"value": "A",
"optional": false
},
"init": {
"type": "StringLiteral",
"span": {
"start": 301,
"end": 308,
"ctxt": 0
},
"value": "Alpha",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
},
{
"type": "TsEnumMember",
"span": {
"start": 310,
"end": 320,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 310,
"end": 311,
"ctxt": 0
},
"value": "B",
"optional": false
},
"init": {
"type": "StringLiteral",
"span": {
"start": 314,
"end": 320,
"ctxt": 0
},
"value": "Beta",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 324,
"end": 371,
"ctxt": 0
},
"kind": "const",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 338,
"end": 370,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 338,
"end": 344,
"ctxt": 0
},
"value": "strMap",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 344,
"end": 370,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 346,
"end": 370,
"ctxt": 0
},
"members": [
{
"type": "TsIndexSignature",
"params": [
{
"type": "Identifier",
"span": {
"start": 349,
"end": 358,
"ctxt": 0
},
"value": "s",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 350,
"end": 358,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 352,
"end": 358,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 359,
"end": 368,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 361,
"end": 368,
"ctxt": 0
},
"kind": "boolean"
}
},
"readonly": false,
"static": false,
"span": {
"start": 348,
"end": 368,
"ctxt": 0
}
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 406,
"end": 440,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 412,
"end": 439,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 412,
"end": 414,
"ctxt": 0
},
"value": "e1",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 414,
"end": 423,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 416,
"end": 423,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 426,
"end": 439,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 426,
"end": 432,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 432,
"end": 439,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 433,
"end": 438,
"ctxt": 0
},
"value": "foo",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 441,
"end": 472,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 447,
"end": 471,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 447,
"end": 449,
"ctxt": 0
},
"value": "e2",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 449,
"end": 458,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 451,
"end": 458,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 461,
"end": 471,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 461,
"end": 467,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 468,
"end": 471,
"ctxt": 0
},
"value": "bar",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 473,
"end": 503,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 479,
"end": 502,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 479,
"end": 481,
"ctxt": 0
},
"value": "e3",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 481,
"end": 490,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 483,
"end": 490,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 493,
"end": 502,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 493,
"end": 499,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 499,
"end": 502,
"ctxt": 0
},
"expression": {
"type": "NumericLiteral",
"span": {
"start": 500,
"end": 501,
"ctxt": 0
},
"value": 0.0
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 504,
"end": 553,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 510,
"end": 552,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 510,
"end": 512,
"ctxt": 0
},
"value": "e4",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 512,
"end": 521,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 514,
"end": 521,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 524,
"end": 552,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 524,
"end": 530,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 530,
"end": 552,
"ctxt": 0
},
"expression": {
"type": "TsAsExpression",
"span": {
"start": 531,
"end": 551,
"ctxt": 0
},
"expression": {
"type": "NumericLiteral",
"span": {
"start": 531,
"end": 532,
"ctxt": 0
},
"value": 0.0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 536,
"end": 551,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 536,
"end": 542,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
"start": 545,
"end": 551,
"ctxt": 0
},
"kind": "number"
}
]
}
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 554,
"end": 602,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 560,
"end": 601,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 560,
"end": 562,
"ctxt": 0
},
"value": "e5",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 562,
"end": 571,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 564,
"end": 571,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 574,
"end": 601,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 574,
"end": 580,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 580,
"end": 601,
"ctxt": 0
},
"expression": {
"type": "TsAsExpression",
"span": {
"start": 581,
"end": 600,
"ctxt": 0
},
"expression": {
"type": "NumericLiteral",
"span": {
"start": 581,
"end": 582,
"ctxt": 0
},
"value": 0.0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 586,
"end": 600,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 586,
"end": 592,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsLiteralType",
"span": {
"start": 595,
"end": 596,
"ctxt": 0
},
"literal": {
"type": "NumericLiteral",
"span": {
"start": 595,
"end": 596,
"ctxt": 0
},
"value": 0.0
}
},
{
"type": "TsLiteralType",
"span": {
"start": 599,
"end": 600,
"ctxt": 0
},
"literal": {
"type": "NumericLiteral",
"span": {
"start": 599,
"end": 600,
"ctxt": 0
},
"value": 1.0
}
}
]
}
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 603,
"end": 642,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 609,
"end": 641,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 609,
"end": 611,
"ctxt": 0
},
"value": "e6",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 611,
"end": 620,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 613,
"end": 620,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 623,
"end": 641,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 623,
"end": 629,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 629,
"end": 641,
"ctxt": 0
},
"expression": {
"type": "TsAsExpression",
"span": {
"start": 630,
"end": 640,
"ctxt": 0
},
"expression": {
"type": "NumericLiteral",
"span": {
"start": 630,
"end": 631,
"ctxt": 0
},
"value": 0.0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 635,
"end": 640,
"ctxt": 0
},
"types": [
{
"type": "TsLiteralType",
"span": {
"start": 635,
"end": 636,
"ctxt": 0
},
"literal": {
"type": "NumericLiteral",
"span": {
"start": 635,
"end": 636,
"ctxt": 0
},
"value": 0.0
}
},
{
"type": "TsLiteralType",
"span": {
"start": 639,
"end": 640,
"ctxt": 0
},
"literal": {
"type": "NumericLiteral",
"span": {
"start": 639,
"end": 640,
"ctxt": 0
},
"value": 1.0
}
}
]
}
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 643,
"end": 694,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 649,
"end": 693,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 649,
"end": 651,
"ctxt": 0
},
"value": "e7",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 651,
"end": 660,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 653,
"end": 660,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 663,
"end": 693,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 663,
"end": 669,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 669,
"end": 693,
"ctxt": 0
},
"expression": {
"type": "TsAsExpression",
"span": {
"start": 670,
"end": 692,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 670,
"end": 675,
"ctxt": 0
},
"value": "foo",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 679,
"end": 692,
"ctxt": 0
},
"types": [
{
"type": "TsLiteralType",
"span": {
"start": 679,
"end": 684,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
"start": 679,
"end": 684,
"ctxt": 0
},
"value": "foo",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
},
{
"type": "TsLiteralType",
"span": {
"start": 687,
"end": 692,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
"start": 687,
"end": 692,
"ctxt": 0
},
"value": "baz",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
]
}
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 695,
"end": 738,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 701,
"end": 737,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 701,
"end": 703,
"ctxt": 0
},
"value": "e8",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 703,
"end": 712,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 705,
"end": 712,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 715,
"end": 737,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 715,
"end": 721,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 721,
"end": 737,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 722,
"end": 736,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 722,
"end": 734,
"ctxt": 0
},
"value": "NumericEnum1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 735,
"end": 736,
"ctxt": 0
},
"value": "A",
"optional": false
}
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 739,
"end": 782,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 745,
"end": 781,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 745,
"end": 747,
"ctxt": 0
},
"value": "e9",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 747,
"end": 756,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 749,
"end": 756,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 759,
"end": 781,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 759,
"end": 765,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 765,
"end": 781,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 766,
"end": 780,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 766,
"end": 778,
"ctxt": 0
},
"value": "NumericEnum2",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 779,
"end": 780,
"ctxt": 0
},
"value": "A",
"optional": false
}
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 783,
"end": 826,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 789,
"end": 825,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 789,
"end": 792,
"ctxt": 0
},
"value": "e10",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 792,
"end": 801,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 794,
"end": 801,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 804,
"end": 825,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 804,
"end": 810,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 810,
"end": 825,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 811,
"end": 824,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 811,
"end": 822,
"ctxt": 0
},
"value": "StringEnum1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 823,
"end": 824,
"ctxt": 0
},
"value": "A",
"optional": false
}
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 827,
"end": 885,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 833,
"end": 884,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 833,
"end": 836,
"ctxt": 0
},
"value": "e11",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 836,
"end": 845,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 838,
"end": 845,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 848,
"end": 884,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 848,
"end": 854,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 854,
"end": 884,
"ctxt": 0
},
"expression": {
"type": "TsAsExpression",
"span": {
"start": 855,
"end": 883,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 855,
"end": 868,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 855,
"end": 866,
"ctxt": 0
},
"value": "StringEnum1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 867,
"end": 868,
"ctxt": 0
},
"value": "A",
"optional": false
}
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 872,
"end": 883,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 872,
"end": 883,
"ctxt": 0
},
"value": "StringEnum1",
"optional": false
},
"typeParams": null
}
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 886,
"end": 946,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 892,
"end": 945,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 892,
"end": 895,
"ctxt": 0
},
"value": "e12",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 895,
"end": 904,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 897,
"end": 904,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 907,
"end": 945,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 907,
"end": 913,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 913,
"end": 945,
"ctxt": 0
},
"expression": {
"type": "TsAsExpression",
"span": {
"start": 914,
"end": 944,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 914,
"end": 928,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 914,
"end": 926,
"ctxt": 0
},
"value": "NumericEnum1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 927,
"end": 928,
"ctxt": 0
},
"value": "A",
"optional": false
}
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 932,
"end": 944,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 932,
"end": 944,
"ctxt": 0
},
"value": "NumericEnum1",
"optional": false
},
"typeParams": null
}
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 947,
"end": 1007,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 953,
"end": 1006,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 953,
"end": 956,
"ctxt": 0
},
"value": "e13",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 956,
"end": 965,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 958,
"end": 965,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 968,
"end": 1006,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 968,
"end": 974,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 974,
"end": 1006,
"ctxt": 0
},
"expression": {
"type": "TsAsExpression",
"span": {
"start": 975,
"end": 1005,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 975,
"end": 989,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 975,
"end": 987,
"ctxt": 0
},
"value": "NumericEnum2",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 988,
"end": 989,
"ctxt": 0
},
"value": "A",
"optional": false
}
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 993,
"end": 1005,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 993,
"end": 1005,
"ctxt": 0
},
"value": "NumericEnum2",
"optional": false
},
"typeParams": null
}
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1008,
"end": 1049,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1014,
"end": 1048,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1014,
"end": 1017,
"ctxt": 0
},
"value": "e14",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1017,
"end": 1026,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1019,
"end": 1026,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 1029,
"end": 1048,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1029,
"end": 1035,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 1035,
"end": 1048,
"ctxt": 0
},
"expression": {
"type": "TsAsExpression",
"span": {
"start": 1036,
"end": 1047,
"ctxt": 0
},
"expression": {
"type": "NullLiteral",
"span": {
"start": 1036,
"end": 1040,
"ctxt": 0
}
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1044,
"end": 1047,
"ctxt": 0
},
"kind": "any"
}
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1067,
"end": 1114,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1073,
"end": 1113,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1073,
"end": 1076,
"ctxt": 0
},
"value": "ok1",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1076,
"end": 1097,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 1078,
"end": 1097,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 1078,
"end": 1085,
"ctxt": 0
},
"kind": "boolean"
},
{
"type": "TsKeywordType",
"span": {
"start": 1088,
"end": 1097,
"ctxt": 0
},
"kind": "undefined"
}
]
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 1100,
"end": 1113,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1100,
"end": 1106,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 1106,
"end": 1113,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 1107,
"end": 1112,
"ctxt": 0
},
"value": "foo",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1115,
"end": 1159,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1121,
"end": 1158,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1121,
"end": 1124,
"ctxt": 0
},
"value": "ok2",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1124,
"end": 1145,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 1126,
"end": 1145,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 1126,
"end": 1133,
"ctxt": 0
},
"kind": "boolean"
},
{
"type": "TsKeywordType",
"span": {
"start": 1136,
"end": 1145,
"ctxt": 0
},
"kind": "undefined"
}
]
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 1148,
"end": 1158,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1148,
"end": 1154,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1155,
"end": 1158,
"ctxt": 0
},
"value": "bar",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 1161,
"end": 1216,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 1166,
"end": 1171,
"ctxt": 0
},
"value": "T_OK1",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1174,
"end": 1215,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1174,
"end": 1190,
"ctxt": 0
},
"value": "CheckBooleanOnly",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 1190,
"end": 1215,
"ctxt": 0
},
"params": [
{
"type": "TsIndexedAccessType",
"span": {
"start": 1191,
"end": 1214,
"ctxt": 0
},
"readonly": false,
"objectType": {
"type": "TsParenthesizedType",
"span": {
"start": 1191,
"end": 1206,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeQuery",
"span": {
"start": 1192,
"end": 1205,
"ctxt": 0
},
"exprName": {
"type": "Identifier",
"span": {
"start": 1199,
"end": 1205,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"typeArguments": null
}
},
"indexType": {
"type": "TsKeywordType",
"span": {
"start": 1207,
"end": 1213,
"ctxt": 0
},
"kind": "string"
}
}
]
}
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 1217,
"end": 1271,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 1222,
"end": 1227,
"ctxt": 0
},
"value": "T_OK2",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1230,
"end": 1270,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1230,
"end": 1246,
"ctxt": 0
},
"value": "CheckBooleanOnly",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 1246,
"end": 1270,
"ctxt": 0
},
"params": [
{
"type": "TsIndexedAccessType",
"span": {
"start": 1247,
"end": 1269,
"ctxt": 0
},
"readonly": false,
"objectType": {
"type": "TsParenthesizedType",
"span": {
"start": 1247,
"end": 1262,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeQuery",
"span": {
"start": 1248,
"end": 1261,
"ctxt": 0
},
"exprName": {
"type": "Identifier",
"span": {
"start": 1255,
"end": 1261,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"typeArguments": null
}
},
"indexType": {
"type": "TsLiteralType",
"span": {
"start": 1263,
"end": 1268,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
"start": 1263,
"end": 1268,
"ctxt": 0
},
"value": "foo",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
}
]
}
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 1272,
"end": 1334,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 1277,
"end": 1282,
"ctxt": 0
},
"value": "T_OK3",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1285,
"end": 1333,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1285,
"end": 1301,
"ctxt": 0
},
"value": "CheckBooleanOnly",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 1301,
"end": 1333,
"ctxt": 0
},
"params": [
{
"type": "TsIndexedAccessType",
"span": {
"start": 1302,
"end": 1332,
"ctxt": 0
},
"readonly": false,
"objectType": {
"type": "TsParenthesizedType",
"span": {
"start": 1302,
"end": 1317,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeQuery",
"span": {
"start": 1303,
"end": 1316,
"ctxt": 0
},
"exprName": {
"type": "Identifier",
"span": {
"start": 1310,
"end": 1316,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"typeArguments": null
}
},
"indexType": {
"type": "TsUnionType",
"span": {
"start": 1318,
"end": 1331,
"ctxt": 0
},
"types": [
{
"type": "TsLiteralType",
"span": {
"start": 1318,
"end": 1323,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
"start": 1318,
"end": 1323,
"ctxt": 0
},
"value": "bar",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
},
{
"type": "TsLiteralType",
"span": {
"start": 1326,
"end": 1331,
"ctxt": 0
},
"literal": {
"type": "StringLiteral",
"span": {
"start": 1326,
"end": 1331,
"ctxt": 0
},
"value": "baz",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
]
}
}
]
}
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 1335,
"end": 1390,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 1340,
"end": 1345,
"ctxt": 0
},
"value": "T_OK4",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1348,
"end": 1389,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1348,
"end": 1364,
"ctxt": 0
},
"value": "CheckBooleanOnly",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 1364,
"end": 1389,
"ctxt": 0
},
"params": [
{
"type": "TsIndexedAccessType",
"span": {
"start": 1365,
"end": 1388,
"ctxt": 0
},
"readonly": false,
"objectType": {
"type": "TsParenthesizedType",
"span": {
"start": 1365,
"end": 1380,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeQuery",
"span": {
"start": 1366,
"end": 1379,
"ctxt": 0
},
"exprName": {
"type": "Identifier",
"span": {
"start": 1373,
"end": 1379,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"typeArguments": null
}
},
"indexType": {
"type": "TsKeywordType",
"span": {
"start": 1381,
"end": 1387,
"ctxt": 0
},
"kind": "number"
}
}
]
}
}
},
{
"type": "TsTypeAliasDeclaration",
"span": {
"start": 1391,
"end": 1443,
"ctxt": 0
},
"declare": false,
"id": {
"type": "Identifier",
"span": {
"start": 1396,
"end": 1401,
"ctxt": 0
},
"value": "T_OK5",
"optional": false
},
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1404,
"end": 1442,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 1404,
"end": 1420,
"ctxt": 0
},
"value": "CheckBooleanOnly",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 1420,
"end": 1442,
"ctxt": 0
},
"params": [
{
"type": "TsIndexedAccessType",
"span": {
"start": 1421,
"end": 1441,
"ctxt": 0
},
"readonly": false,
"objectType": {
"type": "TsParenthesizedType",
"span": {
"start": 1421,
"end": 1436,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeQuery",
"span": {
"start": 1422,
"end": 1435,
"ctxt": 0
},
"exprName": {
"type": "Identifier",
"span": {
"start": 1429,
"end": 1435,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"typeArguments": null
}
},
"indexType": {
"type": "TsKeywordType",
"span": {
"start": 1437,
"end": 1440,
"ctxt": 0
},
"kind": "any"
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1501,
"end": 1527,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1501,
"end": 1526,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 1501,
"end": 1514,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1501,
"end": 1507,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 1507,
"end": 1514,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 1508,
"end": 1513,
"ctxt": 0
},
"value": "baz",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
},
"right": {
"type": "Identifier",
"span": {
"start": 1517,
"end": 1526,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1528,
"end": 1551,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1528,
"end": 1550,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 1528,
"end": 1538,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1528,
"end": 1534,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1535,
"end": 1538,
"ctxt": 0
},
"value": "qua",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 1541,
"end": 1550,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1552,
"end": 1574,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1552,
"end": 1573,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 1552,
"end": 1561,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1552,
"end": 1558,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 1558,
"end": 1561,
"ctxt": 0
},
"expression": {
"type": "NumericLiteral",
"span": {
"start": 1559,
"end": 1560,
"ctxt": 0
},
"value": 0.0
}
}
},
"right": {
"type": "Identifier",
"span": {
"start": 1564,
"end": 1573,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1575,
"end": 1607,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1575,
"end": 1606,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 1575,
"end": 1594,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1575,
"end": 1581,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 1581,
"end": 1594,
"ctxt": 0
},
"expression": {
"type": "TsAsExpression",
"span": {
"start": 1582,
"end": 1593,
"ctxt": 0
},
"expression": {
"type": "NullLiteral",
"span": {
"start": 1582,
"end": 1586,
"ctxt": 0
}
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1590,
"end": 1593,
"ctxt": 0
},
"kind": "any"
}
}
}
},
"right": {
"type": "Identifier",
"span": {
"start": 1597,
"end": 1606,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 1643,
"end": 1690,
"ctxt": 0
},
"kind": "const",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1657,
"end": 1689,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1657,
"end": 1663,
"ctxt": 0
},
"value": "numMap",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1663,
"end": 1689,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 1665,
"end": 1689,
"ctxt": 0
},
"members": [
{
"type": "TsIndexSignature",
"params": [
{
"type": "Identifier",
"span": {
"start": 1668,
"end": 1677,
"ctxt": 0
},
"value": "s",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1669,
"end": 1677,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1671,
"end": 1677,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1678,
"end": 1687,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1680,
"end": 1687,
"ctxt": 0
},
"kind": "boolean"
}
},
"readonly": false,
"static": false,
"span": {
"start": 1667,
"end": 1687,
"ctxt": 0
}
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1720,
"end": 1755,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1726,
"end": 1754,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1726,
"end": 1733,
"ctxt": 0
},
"value": "num_ok1",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1733,
"end": 1742,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1735,
"end": 1742,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 1745,
"end": 1754,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1745,
"end": 1751,
"ctxt": 0
},
"value": "numMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 1751,
"end": 1754,
"ctxt": 0
},
"expression": {
"type": "NumericLiteral",
"span": {
"start": 1752,
"end": 1753,
"ctxt": 0
},
"value": 0.0
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1756,
"end": 1801,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1762,
"end": 1800,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1762,
"end": 1769,
"ctxt": 0
},
"value": "num_ok2",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1769,
"end": 1778,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1771,
"end": 1778,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 1781,
"end": 1800,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1781,
"end": 1787,
"ctxt": 0
},
"value": "numMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 1787,
"end": 1800,
"ctxt": 0
},
"expression": {
"type": "TsAsExpression",
"span": {
"start": 1788,
"end": 1799,
"ctxt": 0
},
"expression": {
"type": "NumericLiteral",
"span": {
"start": 1788,
"end": 1789,
"ctxt": 0
},
"value": 0.0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1793,
"end": 1799,
"ctxt": 0
},
"kind": "number"
}
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1802,
"end": 1846,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1808,
"end": 1845,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1808,
"end": 1815,
"ctxt": 0
},
"value": "num_ok3",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1815,
"end": 1824,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1817,
"end": 1824,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 1827,
"end": 1845,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1827,
"end": 1833,
"ctxt": 0
},
"value": "numMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 1833,
"end": 1845,
"ctxt": 0
},
"expression": {
"type": "TsAsExpression",
"span": {
"start": 1834,
"end": 1844,
"ctxt": 0
},
"expression": {
"type": "NumericLiteral",
"span": {
"start": 1834,
"end": 1835,
"ctxt": 0
},
"value": 0.0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 1839,
"end": 1844,
"ctxt": 0
},
"types": [
{
"type": "TsLiteralType",
"span": {
"start": 1839,
"end": 1840,
"ctxt": 0
},
"literal": {
"type": "NumericLiteral",
"span": {
"start": 1839,
"end": 1840,
"ctxt": 0
},
"value": 0.0
}
},
{
"type": "TsLiteralType",
"span": {
"start": 1843,
"end": 1844,
"ctxt": 0
},
"literal": {
"type": "NumericLiteral",
"span": {
"start": 1843,
"end": 1844,
"ctxt": 0
},
"value": 1.0
}
}
]
}
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1847,
"end": 1895,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1853,
"end": 1894,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1853,
"end": 1860,
"ctxt": 0
},
"value": "num_ok4",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1860,
"end": 1869,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1862,
"end": 1869,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 1872,
"end": 1894,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1872,
"end": 1878,
"ctxt": 0
},
"value": "numMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 1878,
"end": 1894,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 1879,
"end": 1893,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1879,
"end": 1891,
"ctxt": 0
},
"value": "NumericEnum1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1892,
"end": 1893,
"ctxt": 0
},
"value": "A",
"optional": false
}
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1896,
"end": 1944,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1902,
"end": 1943,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1902,
"end": 1909,
"ctxt": 0
},
"value": "num_ok5",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1909,
"end": 1918,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1911,
"end": 1918,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 1921,
"end": 1943,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1921,
"end": 1927,
"ctxt": 0
},
"value": "numMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 1927,
"end": 1943,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 1928,
"end": 1942,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1928,
"end": 1940,
"ctxt": 0
},
"value": "NumericEnum2",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1941,
"end": 1942,
"ctxt": 0
},
"value": "A",
"optional": false
}
}
}
},
"definite": false
}
]
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 1967,
"end": 1975,
"ctxt": 0
},
"value": "generic1",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 2012,
"end": 2018,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 2012,
"end": 2018,
"ctxt": 0
},
"value": "arg",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2015,
"end": 2018,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 2017,
"end": 2018,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 2017,
"end": 2018,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 1958,
"end": 2076,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 2029,
"end": 2076,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 2055,
"end": 2074,
"ctxt": 0
},
"argument": {
"type": "MemberExpression",
"span": {
"start": 2062,
"end": 2073,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 2062,
"end": 2065,
"ctxt": 0
},
"value": "arg",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 2065,
"end": 2073,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 2066,
"end": 2072,
"ctxt": 0
},
"value": "blah",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 1975,
"end": 2011,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 1976,
"end": 2010,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 1976,
"end": 1977,
"ctxt": 0
},
"value": "T",
"optional": false
},
"constraint": {
"type": "TsTypeLiteral",
"span": {
"start": 1986,
"end": 2010,
"ctxt": 0
},
"members": [
{
"type": "TsIndexSignature",
"params": [
{
"type": "Identifier",
"span": {
"start": 1989,
"end": 1998,
"ctxt": 0
},
"value": "s",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1990,
"end": 1998,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1992,
"end": 1998,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1999,
"end": 2008,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 2001,
"end": 2008,
"ctxt": 0
},
"kind": "boolean"
}
},
"readonly": false,
"static": false,
"span": {
"start": 1988,
"end": 2008,
"ctxt": 0
}
}
]
},
"default": null
}
]
},
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 2019,
"end": 2028,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 2021,
"end": 2028,
"ctxt": 0
},
"kind": "boolean"
}
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 2086,
"end": 2094,
"ctxt": 0
},
"value": "generic2",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 2131,
"end": 2137,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 2131,
"end": 2137,
"ctxt": 0
},
"value": "arg",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2134,
"end": 2137,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 2136,
"end": 2137,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 2136,
"end": 2137,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 2077,
"end": 2193,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 2148,
"end": 2193,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 2171,
"end": 2191,
"ctxt": 0
},
"argument": {
"type": "TsNonNullExpression",
"span": {
"start": 2178,
"end": 2190,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 2178,
"end": 2189,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 2178,
"end": 2181,
"ctxt": 0
},
"value": "arg",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 2181,
"end": 2189,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 2182,
"end": 2188,
"ctxt": 0
},
"value": "blah",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 2094,
"end": 2130,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 2095,
"end": 2129,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 2095,
"end": 2096,
"ctxt": 0
},
"value": "T",
"optional": false
},
"constraint": {
"type": "TsTypeLiteral",
"span": {
"start": 2105,
"end": 2129,
"ctxt": 0
},
"members": [
{
"type": "TsIndexSignature",
"params": [
{
"type": "Identifier",
"span": {
"start": 2108,
"end": 2117,
"ctxt": 0
},
"value": "s",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2109,
"end": 2117,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 2111,
"end": 2117,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2118,
"end": 2127,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 2120,
"end": 2127,
"ctxt": 0
},
"kind": "boolean"
}
},
"readonly": false,
"static": false,
"span": {
"start": 2107,
"end": 2127,
"ctxt": 0
}
}
]
},
"default": null
}
]
},
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 2138,
"end": 2147,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 2140,
"end": 2147,
"ctxt": 0
},
"kind": "boolean"
}
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 2203,
"end": 2211,
"ctxt": 0
},
"value": "generic3",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 2230,
"end": 2236,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 2230,
"end": 2236,
"ctxt": 0
},
"value": "arg",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2233,
"end": 2236,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 2235,
"end": 2236,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 2235,
"end": 2236,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 2194,
"end": 2294,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 2247,
"end": 2294,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 2273,
"end": 2292,
"ctxt": 0
},
"argument": {
"type": "MemberExpression",
"span": {
"start": 2280,
"end": 2291,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 2280,
"end": 2286,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 2286,
"end": 2291,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 2287,
"end": 2290,
"ctxt": 0
},
"value": "arg",
"optional": false
}
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 2211,
"end": 2229,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 2212,
"end": 2228,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 2212,
"end": 2213,
"ctxt": 0
},
"value": "T",
"optional": false
},
"constraint": {
"type": "TsKeywordType",
"span": {
"start": 2222,
"end": 2228,
"ctxt": 0
},
"kind": "string"
},
"default": null
}
]
},
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 2237,
"end": 2246,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 2239,
"end": 2246,
"ctxt": 0
},
"kind": "boolean"
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 2342,
"end": 2419,
"ctxt": 0
},
"kind": "const",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 2356,
"end": 2418,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 2356,
"end": 2360,
"ctxt": 0
},
"value": "obj1",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2360,
"end": 2418,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 2362,
"end": 2418,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 2364,
"end": 2374,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 2364,
"end": 2365,
"ctxt": 0
},
"value": "x",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2365,
"end": 2373,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 2367,
"end": 2373,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 2375,
"end": 2385,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 2375,
"end": 2376,
"ctxt": 0
},
"value": "y",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2376,
"end": 2384,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 2378,
"end": 2384,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
},
{
"type": "TsIndexSignature",
"params": [
{
"type": "Identifier",
"span": {
"start": 2387,
"end": 2398,
"ctxt": 0
},
"value": "key",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2390,
"end": 2398,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 2392,
"end": 2398,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2399,
"end": 2416,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 2401,
"end": 2416,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 2401,
"end": 2407,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
"start": 2410,
"end": 2416,
"ctxt": 0
},
"kind": "number"
}
]
}
},
"readonly": false,
"static": false,
"span": {
"start": 2386,
"end": 2416,
"ctxt": 0
}
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 2420,
"end": 2430,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 2420,
"end": 2429,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 2420,
"end": 2424,
"ctxt": 0
},
"value": "obj1",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 2424,
"end": 2429,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 2425,
"end": 2428,
"ctxt": 0
},
"value": "x",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 2431,
"end": 2445,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 2437,
"end": 2444,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 2437,
"end": 2438,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "StringLiteral",
"span": {
"start": 2441,
"end": 2444,
"ctxt": 0
},
"value": "y",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 2446,
"end": 2454,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 2446,
"end": 2453,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 2446,
"end": 2450,
"ctxt": 0
},
"value": "obj1",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 2450,
"end": 2453,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 2451,
"end": 2452,
"ctxt": 0
},
"value": "y",
"optional": false
}
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 2455,
"end": 2468,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 2459,
"end": 2467,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 2459,
"end": 2461,
"ctxt": 0
},
"value": "yy",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "StringLiteral",
"span": {
"start": 2464,
"end": 2467,
"ctxt": 0
},
"value": "y",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 2469,
"end": 2478,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 2469,
"end": 2477,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 2469,
"end": 2473,
"ctxt": 0
},
"value": "obj1",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 2473,
"end": 2477,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 2474,
"end": 2476,
"ctxt": 0
},
"value": "yy",
"optional": false
}
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 2479,
"end": 2491,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 2483,
"end": 2490,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 2483,
"end": 2484,
"ctxt": 0
},
"value": "z",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "StringLiteral",
"span": {
"start": 2487,
"end": 2490,
"ctxt": 0
},
"value": "z",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 2492,
"end": 2500,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 2492,
"end": 2499,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 2492,
"end": 2496,
"ctxt": 0
},
"value": "obj1",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 2496,
"end": 2499,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 2497,
"end": 2498,
"ctxt": 0
},
"value": "z",
"optional": false
}
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 2526,
"end": 2604,
"ctxt": 0
},
"kind": "const",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 2540,
"end": 2603,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 2540,
"end": 2551,
"ctxt": 0
},
"value": "strMapUnion",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2551,
"end": 2603,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 2553,
"end": 2603,
"ctxt": 0
},
"types": [
{
"type": "TsTypeLiteral",
"span": {
"start": 2553,
"end": 2577,
"ctxt": 0
},
"members": [
{
"type": "TsIndexSignature",
"params": [
{
"type": "Identifier",
"span": {
"start": 2556,
"end": 2565,
"ctxt": 0
},
"value": "s",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2557,
"end": 2565,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 2559,
"end": 2565,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2566,
"end": 2575,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 2568,
"end": 2575,
"ctxt": 0
},
"kind": "boolean"
}
},
"readonly": false,
"static": false,
"span": {
"start": 2555,
"end": 2575,
"ctxt": 0
}
}
]
},
{
"type": "TsTypeLiteral",
"span": {
"start": 2580,
"end": 2603,
"ctxt": 0
},
"members": [
{
"type": "TsIndexSignature",
"params": [
{
"type": "Identifier",
"span": {
"start": 2583,
"end": 2592,
"ctxt": 0
},
"value": "s",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2584,
"end": 2592,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 2586,
"end": 2592,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2593,
"end": 2601,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 2595,
"end": 2601,
"ctxt": 0
},
"kind": "number"
}
},
"readonly": false,
"static": false,
"span": {
"start": 2582,
"end": 2601,
"ctxt": 0
}
}
]
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 2621,
"end": 2669,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 2627,
"end": 2668,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 2627,
"end": 2629,
"ctxt": 0
},
"value": "f1",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2629,
"end": 2647,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 2631,
"end": 2647,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 2631,
"end": 2638,
"ctxt": 0
},
"kind": "boolean"
},
{
"type": "TsKeywordType",
"span": {
"start": 2641,
"end": 2647,
"ctxt": 0
},
"kind": "number"
}
]
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 2650,
"end": 2668,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 2650,
"end": 2661,
"ctxt": 0
},
"value": "strMapUnion",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 2661,
"end": 2668,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 2662,
"end": 2667,
"ctxt": 0
},
"value": "foo",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 2698,
"end": 2729,
"ctxt": 0
},
"kind": "const",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 2712,
"end": 2728,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 2712,
"end": 2713,
"ctxt": 0
},
"value": "s",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2713,
"end": 2728,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeOperator",
"span": {
"start": 2715,
"end": 2728,
"ctxt": 0
},
"op": "unique",
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 2722,
"end": 2728,
"ctxt": 0
},
"kind": "symbol"
}
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 2730,
"end": 2771,
"ctxt": 0
},
"kind": "const",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 2744,
"end": 2770,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 2744,
"end": 2753,
"ctxt": 0
},
"value": "symbolMap",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2753,
"end": 2770,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 2755,
"end": 2770,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 2757,
"end": 2768,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 2758,
"end": 2759,
"ctxt": 0
},
"value": "s",
"optional": false
},
"computed": true,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2760,
"end": 2768,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 2762,
"end": 2768,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 2772,
"end": 2805,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 2778,
"end": 2804,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 2778,
"end": 2781,
"ctxt": 0
},
"value": "e15",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2781,
"end": 2789,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 2783,
"end": 2789,
"ctxt": 0
},
"kind": "string"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 2792,
"end": 2804,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 2792,
"end": 2801,
"ctxt": 0
},
"value": "symbolMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 2801,
"end": 2804,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 2802,
"end": 2803,
"ctxt": 0
},
"value": "s",
"optional": false
}
}
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 2819,
"end": 2844,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 2819,
"end": 2843,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 2819,
"end": 2831,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 2819,
"end": 2828,
"ctxt": 0
},
"value": "symbolMap",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 2828,
"end": 2831,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 2829,
"end": 2830,
"ctxt": 0
},
"value": "s",
"optional": false
}
}
},
"right": {
"type": "Identifier",
"span": {
"start": 2834,
"end": 2843,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 2881,
"end": 2938,
"ctxt": 0
},
"kind": "const",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 2895,
"end": 2937,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 2895,
"end": 2914,
"ctxt": 0
},
"value": "nonEmptyStringArray",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2914,
"end": 2937,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTupleType",
"span": {
"start": 2916,
"end": 2937,
"ctxt": 0
},
"elemTypes": [
{
"type": "TsTupleElement",
"span": {
"start": 2917,
"end": 2923,
"ctxt": 0
},
"label": null,
"ty": {
"type": "TsKeywordType",
"span": {
"start": 2917,
"end": 2923,
"ctxt": 0
},
"kind": "string"
}
},
{
"type": "TsTupleElement",
"span": {
"start": 2925,
"end": 2936,
"ctxt": 0
},
"label": null,
"ty": {
"type": "TsRestType",
"span": {
"start": 2925,
"end": 2936,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 2928,
"end": 2936,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 2928,
"end": 2934,
"ctxt": 0
},
"kind": "string"
}
}
}
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 2939,
"end": 2990,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 2945,
"end": 2989,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 2945,
"end": 2956,
"ctxt": 0
},
"value": "variadicOk1",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 2956,
"end": 2964,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 2958,
"end": 2964,
"ctxt": 0
},
"kind": "string"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 2967,
"end": 2989,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 2967,
"end": 2986,
"ctxt": 0
},
"value": "nonEmptyStringArray",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 2986,
"end": 2989,
"ctxt": 0
},
"expression": {
"type": "NumericLiteral",
"span": {
"start": 2987,
"end": 2988,
"ctxt": 0
},
"value": 0.0
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 3005,
"end": 3059,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 3011,
"end": 3058,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 3011,
"end": 3025,
"ctxt": 0
},
"value": "variadicError1",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 3025,
"end": 3033,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 3027,
"end": 3033,
"ctxt": 0
},
"kind": "string"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 3036,
"end": 3058,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 3036,
"end": 3055,
"ctxt": 0
},
"value": "nonEmptyStringArray",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 3055,
"end": 3058,
"ctxt": 0
},
"expression": {
"type": "NumericLiteral",
"span": {
"start": 3056,
"end": 3057,
"ctxt": 0
},
"value": 1.0
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 3099,
"end": 3149,
"ctxt": 0
},
"kind": "const",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 3113,
"end": 3148,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 3113,
"end": 3122,
"ctxt": 0
},
"value": "myRecord1",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 3122,
"end": 3148,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 3124,
"end": 3148,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 3126,
"end": 3136,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 3126,
"end": 3127,
"ctxt": 0
},
"value": "a",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 3127,
"end": 3135,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 3129,
"end": 3135,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 3137,
"end": 3146,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 3137,
"end": 3138,
"ctxt": 0
},
"value": "b",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 3138,
"end": 3146,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 3140,
"end": 3146,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 3150,
"end": 3223,
"ctxt": 0
},
"kind": "const",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 3164,
"end": 3222,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 3164,
"end": 3173,
"ctxt": 0
},
"value": "myRecord2",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 3173,
"end": 3222,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 3175,
"end": 3222,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 3177,
"end": 3187,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 3177,
"end": 3178,
"ctxt": 0
},
"value": "a",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 3178,
"end": 3186,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 3180,
"end": 3186,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 3188,
"end": 3198,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 3188,
"end": 3189,
"ctxt": 0
},
"value": "b",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 3189,
"end": 3197,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 3191,
"end": 3197,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsIndexSignature",
"params": [
{
"type": "Identifier",
"span": {
"start": 3200,
"end": 3211,
"ctxt": 0
},
"value": "key",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 3203,
"end": 3211,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 3205,
"end": 3211,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 3212,
"end": 3220,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 3214,
"end": 3220,
"ctxt": 0
},
"kind": "string"
}
},
"readonly": false,
"static": false,
"span": {
"start": 3199,
"end": 3220,
"ctxt": 0
}
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 3224,
"end": 3309,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 3230,
"end": 3308,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 3230,
"end": 3233,
"ctxt": 0
},
"value": "fn1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrowFunctionExpression",
"span": {
"start": 3236,
"end": 3308,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 3273,
"end": 3281,
"ctxt": 0
},
"value": "key",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 3276,
"end": 3281,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 3278,
"end": 3281,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 3278,
"end": 3281,
"ctxt": 0
},
"value": "Key",
"optional": false
},
"typeParams": null
}
}
}
],
"body": {
"type": "MemberExpression",
"span": {
"start": 3294,
"end": 3308,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 3294,
"end": 3303,
"ctxt": 0
},
"value": "myRecord1",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 3303,
"end": 3308,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 3304,
"end": 3307,
"ctxt": 0
},
"value": "key",
"optional": false
}
}
},
"async": false,
"generator": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 3236,
"end": 3272,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 3237,
"end": 3271,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 3237,
"end": 3240,
"ctxt": 0
},
"value": "Key",
"optional": false
},
"constraint": {
"type": "TsTypeOperator",
"span": {
"start": 3249,
"end": 3271,
"ctxt": 0
},
"op": "keyof",
"typeAnnotation": {
"type": "TsTypeQuery",
"span": {
"start": 3255,
"end": 3271,
"ctxt": 0
},
"exprName": {
"type": "Identifier",
"span": {
"start": 3262,
"end": 3271,
"ctxt": 0
},
"value": "myRecord1",
"optional": false
},
"typeArguments": null
}
},
"default": null
}
]
},
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 3282,
"end": 3290,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 3284,
"end": 3290,
"ctxt": 0
},
"kind": "string"
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 3323,
"end": 3408,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 3329,
"end": 3407,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 3329,
"end": 3332,
"ctxt": 0
},
"value": "fn2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrowFunctionExpression",
"span": {
"start": 3335,
"end": 3407,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 3372,
"end": 3380,
"ctxt": 0
},
"value": "key",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 3375,
"end": 3380,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 3377,
"end": 3380,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 3377,
"end": 3380,
"ctxt": 0
},
"value": "Key",
"optional": false
},
"typeParams": null
}
}
}
],
"body": {
"type": "MemberExpression",
"span": {
"start": 3393,
"end": 3407,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 3393,
"end": 3402,
"ctxt": 0
},
"value": "myRecord2",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 3402,
"end": 3407,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 3403,
"end": 3406,
"ctxt": 0
},
"value": "key",
"optional": false
}
}
},
"async": false,
"generator": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 3335,
"end": 3371,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 3336,
"end": 3370,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 3336,
"end": 3339,
"ctxt": 0
},
"value": "Key",
"optional": false
},
"constraint": {
"type": "TsTypeOperator",
"span": {
"start": 3348,
"end": 3370,
"ctxt": 0
},
"op": "keyof",
"typeAnnotation": {
"type": "TsTypeQuery",
"span": {
"start": 3354,
"end": 3370,
"ctxt": 0
},
"exprName": {
"type": "Identifier",
"span": {
"start": 3361,
"end": 3370,
"ctxt": 0
},
"value": "myRecord1",
"optional": false
},
"typeArguments": null
}
},
"default": null
}
]
},
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 3381,
"end": 3389,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 3383,
"end": 3389,
"ctxt": 0
},
"kind": "string"
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 3422,
"end": 3590,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 3428,
"end": 3589,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 3428,
"end": 3431,
"ctxt": 0
},
"value": "fn3",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrowFunctionExpression",
"span": {
"start": 3434,
"end": 3589,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 3471,
"end": 3479,
"ctxt": 0
},
"value": "key",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 3474,
"end": 3479,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 3476,
"end": 3479,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 3476,
"end": 3479,
"ctxt": 0
},
"value": "Key",
"optional": false
},
"typeParams": null
}
}
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 3484,
"end": 3589,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 3490,
"end": 3517,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 3490,
"end": 3516,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 3490,
"end": 3504,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 3490,
"end": 3499,
"ctxt": 0
},
"value": "myRecord2",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 3499,
"end": 3504,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 3500,
"end": 3503,
"ctxt": 0
},
"value": "key",
"optional": false
}
}
},
"right": {
"type": "Identifier",
"span": {
"start": 3507,
"end": 3516,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 3538,
"end": 3571,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 3544,
"end": 3570,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 3544,
"end": 3545,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 3545,
"end": 3553,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 3547,
"end": 3553,
"ctxt": 0
},
"kind": "string"
}
}
},
"init": {
"type": "MemberExpression",
"span": {
"start": 3556,
"end": 3570,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 3556,
"end": 3565,
"ctxt": 0
},
"value": "myRecord2",
"optional": false
},
"property": {
"type": "Computed",
"span": {
"start": 3565,
"end": 3570,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 3566,
"end": 3569,
"ctxt": 0
},
"value": "key",
"optional": false
}
}
},
"definite": false
}
]
}
]
},
"async": false,
"generator": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 3434,
"end": 3470,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 3435,
"end": 3469,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 3435,
"end": 3438,
"ctxt": 0
},
"value": "Key",
"optional": false
},
"constraint": {
"type": "TsTypeOperator",
"span": {
"start": 3447,
"end": 3469,
"ctxt": 0
},
"op": "keyof",
"typeAnnotation": {
"type": "TsTypeQuery",
"span": {
"start": 3453,
"end": 3469,
"ctxt": 0
},
"exprName": {
"type": "Identifier",
"span": {
"start": 3460,
"end": 3469,
"ctxt": 0
},
"value": "myRecord2",
"optional": false
},
"typeArguments": null
}
},
"default": null
}
]
},
"returnType": null
},
"definite": false
}
]
}
],
"interpreter": null
}