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

2298 lines
60 KiB
JSON

{
"type": "Script",
"span": {
"start": 54,
"end": 1745,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 54,
"end": 87,
"ctxt": 0
},
"kind": "const",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 68,
"end": 86,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 68,
"end": 76,
"ctxt": 0
},
"value": "strArray",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 76,
"end": 86,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 78,
"end": 86,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 78,
"end": 84,
"ctxt": 0
},
"kind": "string"
}
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 88,
"end": 132,
"ctxt": 0
},
"kind": "const",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 102,
"end": 131,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 102,
"end": 113,
"ctxt": 0
},
"value": "strStrTuple",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 113,
"end": 131,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTupleType",
"span": {
"start": 115,
"end": 131,
"ctxt": 0
},
"elemTypes": [
{
"type": "TsTupleElement",
"span": {
"start": 116,
"end": 122,
"ctxt": 0
},
"label": null,
"ty": {
"type": "TsKeywordType",
"span": {
"start": 116,
"end": 122,
"ctxt": 0
},
"kind": "string"
}
},
{
"type": "TsTupleElement",
"span": {
"start": 124,
"end": 130,
"ctxt": 0
},
"label": null,
"ty": {
"type": "TsKeywordType",
"span": {
"start": 124,
"end": 130,
"ctxt": 0
},
"kind": "string"
}
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 238,
"end": 260,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 244,
"end": 259,
"ctxt": 0
},
"id": {
"type": "ArrayPattern",
"span": {
"start": 244,
"end": 248,
"ctxt": 0
},
"elements": [
{
"type": "Identifier",
"span": {
"start": 245,
"end": 247,
"ctxt": 0
},
"value": "s1",
"optional": false,
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "Identifier",
"span": {
"start": 251,
"end": 259,
"ctxt": 0
},
"value": "strArray",
"optional": false
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 261,
"end": 275,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 261,
"end": 274,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 261,
"end": 272,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 261,
"end": 263,
"ctxt": 0
},
"value": "s1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 264,
"end": 272,
"ctxt": 0
},
"value": "toString",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 376,
"end": 401,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 382,
"end": 400,
"ctxt": 0
},
"id": {
"type": "ArrayPattern",
"span": {
"start": 382,
"end": 389,
"ctxt": 0
},
"elements": [
{
"type": "RestElement",
"span": {
"start": 383,
"end": 388,
"ctxt": 0
},
"rest": {
"start": 383,
"end": 386,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 386,
"end": 388,
"ctxt": 0
},
"value": "s2",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "Identifier",
"span": {
"start": 392,
"end": 400,
"ctxt": 0
},
"value": "strArray",
"optional": false
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 402,
"end": 421,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 402,
"end": 420,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 402,
"end": 409,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 402,
"end": 404,
"ctxt": 0
},
"value": "s2",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 405,
"end": 409,
"ctxt": 0
},
"value": "push",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 410,
"end": 419,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
}
],
"typeArguments": null
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 542,
"end": 571,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 548,
"end": 570,
"ctxt": 0
},
"id": {
"type": "ArrayPattern",
"span": {
"start": 548,
"end": 559,
"ctxt": 0
},
"elements": [
null,
null,
{
"type": "RestElement",
"span": {
"start": 553,
"end": 558,
"ctxt": 0
},
"rest": {
"start": 553,
"end": 556,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 556,
"end": 558,
"ctxt": 0
},
"value": "s3",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "Identifier",
"span": {
"start": 562,
"end": 570,
"ctxt": 0
},
"value": "strArray",
"optional": false
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 572,
"end": 591,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 572,
"end": 590,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 572,
"end": 579,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 572,
"end": 574,
"ctxt": 0
},
"value": "s3",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 575,
"end": 579,
"ctxt": 0
},
"value": "push",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 580,
"end": 589,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
}
],
"typeArguments": null
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 699,
"end": 745,
"ctxt": 0
},
"kind": "const",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 713,
"end": 744,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 713,
"end": 719,
"ctxt": 0
},
"value": "strMap",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 719,
"end": 744,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 721,
"end": 744,
"ctxt": 0
},
"members": [
{
"type": "TsIndexSignature",
"params": [
{
"type": "Identifier",
"span": {
"start": 724,
"end": 733,
"ctxt": 0
},
"value": "s",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 725,
"end": 733,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 727,
"end": 733,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 734,
"end": 742,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 736,
"end": 742,
"ctxt": 0
},
"kind": "string"
}
},
"readonly": false,
"static": false,
"span": {
"start": 723,
"end": 742,
"ctxt": 0
}
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 747,
"end": 769,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 753,
"end": 768,
"ctxt": 0
},
"id": {
"type": "ObjectPattern",
"span": {
"start": 753,
"end": 759,
"ctxt": 0
},
"properties": [
{
"type": "AssignmentPatternProperty",
"span": {
"start": 755,
"end": 757,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 755,
"end": 757,
"ctxt": 0
},
"value": "t1",
"optional": false
},
"value": null
}
],
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "Identifier",
"span": {
"start": 762,
"end": 768,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 770,
"end": 784,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 770,
"end": 783,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 770,
"end": 781,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 770,
"end": 772,
"ctxt": 0
},
"value": "t1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 773,
"end": 781,
"ctxt": 0
},
"value": "toString",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 825,
"end": 850,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 831,
"end": 849,
"ctxt": 0
},
"id": {
"type": "ObjectPattern",
"span": {
"start": 831,
"end": 840,
"ctxt": 0
},
"properties": [
{
"type": "RestElement",
"span": {
"start": 833,
"end": 838,
"ctxt": 0
},
"rest": {
"start": 833,
"end": 836,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 836,
"end": 838,
"ctxt": 0
},
"value": "t2",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "Identifier",
"span": {
"start": 843,
"end": 849,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 851,
"end": 867,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 851,
"end": 866,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 851,
"end": 864,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 851,
"end": 855,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 851,
"end": 853,
"ctxt": 0
},
"value": "t2",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 854,
"end": 855,
"ctxt": 0
},
"value": "z",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 856,
"end": 864,
"ctxt": 0
},
"value": "toString",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 932,
"end": 1009,
"ctxt": 0
},
"kind": "const",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 946,
"end": 1008,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 946,
"end": 957,
"ctxt": 0
},
"value": "numMapPoint",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 957,
"end": 1008,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
"start": 959,
"end": 1008,
"ctxt": 0
},
"types": [
{
"type": "TsTypeLiteral",
"span": {
"start": 959,
"end": 982,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 961,
"end": 971,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 961,
"end": 962,
"ctxt": 0
},
"value": "x",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 962,
"end": 970,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 964,
"end": 970,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 972,
"end": 981,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 972,
"end": 973,
"ctxt": 0
},
"value": "y",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 973,
"end": 981,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 975,
"end": 981,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
}
]
},
{
"type": "TsTypeLiteral",
"span": {
"start": 985,
"end": 1008,
"ctxt": 0
},
"members": [
{
"type": "TsIndexSignature",
"params": [
{
"type": "Identifier",
"span": {
"start": 988,
"end": 997,
"ctxt": 0
},
"value": "s",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 989,
"end": 997,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 991,
"end": 997,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 998,
"end": 1006,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1000,
"end": 1006,
"ctxt": 0
},
"kind": "number"
}
},
"readonly": false,
"static": false,
"span": {
"start": 987,
"end": 1006,
"ctxt": 0
}
}
]
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "BlockStatement",
"span": {
"start": 1010,
"end": 1143,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 1016,
"end": 1048,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1022,
"end": 1047,
"ctxt": 0
},
"id": {
"type": "ObjectPattern",
"span": {
"start": 1022,
"end": 1033,
"ctxt": 0
},
"properties": [
{
"type": "AssignmentPatternProperty",
"span": {
"start": 1024,
"end": 1025,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 1024,
"end": 1025,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": null
},
{
"type": "AssignmentPatternProperty",
"span": {
"start": 1027,
"end": 1028,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 1027,
"end": 1028,
"ctxt": 0
},
"value": "y",
"optional": false
},
"value": null
},
{
"type": "AssignmentPatternProperty",
"span": {
"start": 1030,
"end": 1031,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 1030,
"end": 1031,
"ctxt": 0
},
"value": "z",
"optional": false
},
"value": null
}
],
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "Identifier",
"span": {
"start": 1036,
"end": 1047,
"ctxt": 0
},
"value": "numMapPoint",
"optional": false
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 1053,
"end": 1065,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 1053,
"end": 1064,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 1053,
"end": 1062,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1053,
"end": 1054,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1055,
"end": 1062,
"ctxt": 0
},
"value": "toFixed",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1083,
"end": 1095,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 1083,
"end": 1094,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 1083,
"end": 1092,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1083,
"end": 1084,
"ctxt": 0
},
"value": "y",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1085,
"end": 1092,
"ctxt": 0
},
"value": "toFixed",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1113,
"end": 1125,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 1113,
"end": 1124,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 1113,
"end": 1122,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1113,
"end": 1114,
"ctxt": 0
},
"value": "z",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1115,
"end": 1122,
"ctxt": 0
},
"value": "toFixed",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
}
]
},
{
"type": "BlockStatement",
"span": {
"start": 1145,
"end": 1282,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 1151,
"end": 1183,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1157,
"end": 1182,
"ctxt": 0
},
"id": {
"type": "ObjectPattern",
"span": {
"start": 1157,
"end": 1168,
"ctxt": 0
},
"properties": [
{
"type": "AssignmentPatternProperty",
"span": {
"start": 1159,
"end": 1160,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 1159,
"end": 1160,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": null
},
{
"type": "RestElement",
"span": {
"start": 1162,
"end": 1166,
"ctxt": 0
},
"rest": {
"start": 1162,
"end": 1165,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 1165,
"end": 1166,
"ctxt": 0
},
"value": "q",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "Identifier",
"span": {
"start": 1171,
"end": 1182,
"ctxt": 0
},
"value": "numMapPoint",
"optional": false
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 1188,
"end": 1200,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 1188,
"end": 1199,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 1188,
"end": 1197,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1188,
"end": 1189,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1190,
"end": 1197,
"ctxt": 0
},
"value": "toFixed",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1218,
"end": 1232,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 1218,
"end": 1231,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 1218,
"end": 1229,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 1218,
"end": 1221,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1218,
"end": 1219,
"ctxt": 0
},
"value": "q",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1220,
"end": 1221,
"ctxt": 0
},
"value": "y",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 1222,
"end": 1229,
"ctxt": 0
},
"value": "toFixed",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1250,
"end": 1264,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 1250,
"end": 1263,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 1250,
"end": 1261,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 1250,
"end": 1253,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1250,
"end": 1251,
"ctxt": 0
},
"value": "q",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1252,
"end": 1253,
"ctxt": 0
},
"value": "z",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 1254,
"end": 1261,
"ctxt": 0
},
"value": "toFixed",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1285,
"end": 1319,
"ctxt": 0
},
"kind": "let",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1297,
"end": 1318,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1297,
"end": 1310,
"ctxt": 0
},
"value": "target_string",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1310,
"end": 1318,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1312,
"end": 1318,
"ctxt": 0
},
"kind": "string"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1320,
"end": 1372,
"ctxt": 0
},
"kind": "let",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1332,
"end": 1371,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1332,
"end": 1351,
"ctxt": 0
},
"value": "target_string_undef",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1351,
"end": 1371,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 1353,
"end": 1371,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 1353,
"end": 1359,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
"start": 1362,
"end": 1371,
"ctxt": 0
},
"kind": "undefined"
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1373,
"end": 1413,
"ctxt": 0
},
"kind": "let",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1385,
"end": 1412,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1385,
"end": 1402,
"ctxt": 0
},
"value": "target_string_arr",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1402,
"end": 1412,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 1404,
"end": 1412,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 1404,
"end": 1410,
"ctxt": 0
},
"kind": "string"
}
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 1435,
"end": 1462,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1435,
"end": 1461,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "ArrayPattern",
"span": {
"start": 1435,
"end": 1450,
"ctxt": 0
},
"elements": [
{
"type": "Identifier",
"span": {
"start": 1436,
"end": 1449,
"ctxt": 0
},
"value": "target_string",
"optional": false,
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 1453,
"end": 1461,
"ctxt": 0
},
"value": "strArray",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1479,
"end": 1512,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1479,
"end": 1511,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "ArrayPattern",
"span": {
"start": 1479,
"end": 1500,
"ctxt": 0
},
"elements": [
{
"type": "Identifier",
"span": {
"start": 1480,
"end": 1499,
"ctxt": 0
},
"value": "target_string_undef",
"optional": false,
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 1503,
"end": 1511,
"ctxt": 0
},
"value": "strArray",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1527,
"end": 1565,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1527,
"end": 1564,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "ArrayPattern",
"span": {
"start": 1527,
"end": 1553,
"ctxt": 0
},
"elements": [
null,
null,
null,
{
"type": "RestElement",
"span": {
"start": 1535,
"end": 1552,
"ctxt": 0
},
"rest": {
"start": 1532,
"end": 1535,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 1535,
"end": 1552,
"ctxt": 0
},
"value": "target_string_arr",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 1556,
"end": 1564,
"ctxt": 0
},
"value": "strArray",
"optional": false
}
}
},
{
"type": "BlockStatement",
"span": {
"start": 1580,
"end": 1745,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 1586,
"end": 1634,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1590,
"end": 1599,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1590,
"end": 1591,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1591,
"end": 1599,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1593,
"end": 1599,
"ctxt": 0
},
"kind": "number"
}
}
},
"init": null,
"definite": false
},
{
"type": "VariableDeclarator",
"span": {
"start": 1601,
"end": 1610,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1601,
"end": 1602,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1602,
"end": 1610,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1604,
"end": 1610,
"ctxt": 0
},
"kind": "number"
}
}
},
"init": null,
"definite": false
},
{
"type": "VariableDeclarator",
"span": {
"start": 1612,
"end": 1633,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1612,
"end": 1613,
"ctxt": 0
},
"value": "z",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1613,
"end": 1633,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 1615,
"end": 1633,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 1615,
"end": 1621,
"ctxt": 0
},
"kind": "number"
},
{
"type": "TsKeywordType",
"span": {
"start": 1624,
"end": 1633,
"ctxt": 0
},
"kind": "undefined"
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 1639,
"end": 1667,
"ctxt": 0
},
"expression": {
"type": "ParenthesisExpression",
"span": {
"start": 1639,
"end": 1666,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1640,
"end": 1665,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "ObjectPattern",
"span": {
"start": 1640,
"end": 1651,
"ctxt": 0
},
"properties": [
{
"type": "AssignmentPatternProperty",
"span": {
"start": 1642,
"end": 1643,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 1642,
"end": 1643,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": null
},
{
"type": "AssignmentPatternProperty",
"span": {
"start": 1645,
"end": 1646,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 1645,
"end": 1646,
"ctxt": 0
},
"value": "y",
"optional": false
},
"value": null
},
{
"type": "AssignmentPatternProperty",
"span": {
"start": 1648,
"end": 1649,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 1648,
"end": 1649,
"ctxt": 0
},
"value": "z",
"optional": false
},
"value": null
}
],
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 1654,
"end": 1665,
"ctxt": 0
},
"value": "numMapPoint",
"optional": false
}
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 1686,
"end": 1700,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1690,
"end": 1699,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1690,
"end": 1691,
"ctxt": 0
},
"value": "q",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1691,
"end": 1699,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1693,
"end": 1699,
"ctxt": 0
},
"kind": "number"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 1705,
"end": 1727,
"ctxt": 0
},
"expression": {
"type": "ParenthesisExpression",
"span": {
"start": 1705,
"end": 1726,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1706,
"end": 1725,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "ObjectPattern",
"span": {
"start": 1706,
"end": 1711,
"ctxt": 0
},
"properties": [
{
"type": "AssignmentPatternProperty",
"span": {
"start": 1708,
"end": 1709,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 1708,
"end": 1709,
"ctxt": 0
},
"value": "q",
"optional": false
},
"value": null
}
],
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 1714,
"end": 1725,
"ctxt": 0
},
"value": "numMapPoint",
"optional": false
}
}
}
}
]
}
],
"interpreter": null
}