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

2298 lines
60 KiB
JSON

{
"type": "Script",
"span": {
"start": 53,
"end": 1744,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 53,
"end": 86,
"ctxt": 0
},
"kind": "const",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 67,
"end": 85,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 67,
"end": 75,
"ctxt": 0
},
"value": "strArray",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 75,
"end": 85,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 77,
"end": 85,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 77,
"end": 83,
"ctxt": 0
},
"kind": "string"
}
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 87,
"end": 131,
"ctxt": 0
},
"kind": "const",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 101,
"end": 130,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 101,
"end": 112,
"ctxt": 0
},
"value": "strStrTuple",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 112,
"end": 130,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTupleType",
"span": {
"start": 114,
"end": 130,
"ctxt": 0
},
"elemTypes": [
{
"type": "TsTupleElement",
"span": {
"start": 115,
"end": 121,
"ctxt": 0
},
"label": null,
"ty": {
"type": "TsKeywordType",
"span": {
"start": 115,
"end": 121,
"ctxt": 0
},
"kind": "string"
}
},
{
"type": "TsTupleElement",
"span": {
"start": 123,
"end": 129,
"ctxt": 0
},
"label": null,
"ty": {
"type": "TsKeywordType",
"span": {
"start": 123,
"end": 129,
"ctxt": 0
},
"kind": "string"
}
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 237,
"end": 259,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 243,
"end": 258,
"ctxt": 0
},
"id": {
"type": "ArrayPattern",
"span": {
"start": 243,
"end": 247,
"ctxt": 0
},
"elements": [
{
"type": "Identifier",
"span": {
"start": 244,
"end": 246,
"ctxt": 0
},
"value": "s1",
"optional": false,
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "Identifier",
"span": {
"start": 250,
"end": 258,
"ctxt": 0
},
"value": "strArray",
"optional": false
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 260,
"end": 274,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 260,
"end": 273,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 260,
"end": 271,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 260,
"end": 262,
"ctxt": 0
},
"value": "s1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 263,
"end": 271,
"ctxt": 0
},
"value": "toString",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 375,
"end": 400,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 381,
"end": 399,
"ctxt": 0
},
"id": {
"type": "ArrayPattern",
"span": {
"start": 381,
"end": 388,
"ctxt": 0
},
"elements": [
{
"type": "RestElement",
"span": {
"start": 382,
"end": 387,
"ctxt": 0
},
"rest": {
"start": 382,
"end": 385,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 385,
"end": 387,
"ctxt": 0
},
"value": "s2",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "Identifier",
"span": {
"start": 391,
"end": 399,
"ctxt": 0
},
"value": "strArray",
"optional": false
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 401,
"end": 420,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 401,
"end": 419,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 401,
"end": 408,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 401,
"end": 403,
"ctxt": 0
},
"value": "s2",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 404,
"end": 408,
"ctxt": 0
},
"value": "push",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 409,
"end": 418,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
}
],
"typeArguments": null
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 541,
"end": 570,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 547,
"end": 569,
"ctxt": 0
},
"id": {
"type": "ArrayPattern",
"span": {
"start": 547,
"end": 558,
"ctxt": 0
},
"elements": [
null,
null,
{
"type": "RestElement",
"span": {
"start": 552,
"end": 557,
"ctxt": 0
},
"rest": {
"start": 552,
"end": 555,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 555,
"end": 557,
"ctxt": 0
},
"value": "s3",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "Identifier",
"span": {
"start": 561,
"end": 569,
"ctxt": 0
},
"value": "strArray",
"optional": false
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 571,
"end": 590,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 571,
"end": 589,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 571,
"end": 578,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 571,
"end": 573,
"ctxt": 0
},
"value": "s3",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 574,
"end": 578,
"ctxt": 0
},
"value": "push",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 579,
"end": 588,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
}
],
"typeArguments": null
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 698,
"end": 744,
"ctxt": 0
},
"kind": "const",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 712,
"end": 743,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 712,
"end": 718,
"ctxt": 0
},
"value": "strMap",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 718,
"end": 743,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 720,
"end": 743,
"ctxt": 0
},
"members": [
{
"type": "TsIndexSignature",
"params": [
{
"type": "Identifier",
"span": {
"start": 723,
"end": 732,
"ctxt": 0
},
"value": "s",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 724,
"end": 732,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 726,
"end": 732,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 733,
"end": 741,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 735,
"end": 741,
"ctxt": 0
},
"kind": "string"
}
},
"readonly": false,
"static": false,
"span": {
"start": 722,
"end": 741,
"ctxt": 0
}
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 746,
"end": 768,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 752,
"end": 767,
"ctxt": 0
},
"id": {
"type": "ObjectPattern",
"span": {
"start": 752,
"end": 758,
"ctxt": 0
},
"properties": [
{
"type": "AssignmentPatternProperty",
"span": {
"start": 754,
"end": 756,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 754,
"end": 756,
"ctxt": 0
},
"value": "t1",
"optional": false
},
"value": null
}
],
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "Identifier",
"span": {
"start": 761,
"end": 767,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 769,
"end": 783,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 769,
"end": 782,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 769,
"end": 780,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 769,
"end": 771,
"ctxt": 0
},
"value": "t1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 772,
"end": 780,
"ctxt": 0
},
"value": "toString",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 824,
"end": 849,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 830,
"end": 848,
"ctxt": 0
},
"id": {
"type": "ObjectPattern",
"span": {
"start": 830,
"end": 839,
"ctxt": 0
},
"properties": [
{
"type": "RestElement",
"span": {
"start": 832,
"end": 837,
"ctxt": 0
},
"rest": {
"start": 832,
"end": 835,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 835,
"end": 837,
"ctxt": 0
},
"value": "t2",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "Identifier",
"span": {
"start": 842,
"end": 848,
"ctxt": 0
},
"value": "strMap",
"optional": false
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 850,
"end": 866,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 850,
"end": 865,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 850,
"end": 863,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 850,
"end": 854,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 850,
"end": 852,
"ctxt": 0
},
"value": "t2",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 853,
"end": 854,
"ctxt": 0
},
"value": "z",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 855,
"end": 863,
"ctxt": 0
},
"value": "toString",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 931,
"end": 1008,
"ctxt": 0
},
"kind": "const",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 945,
"end": 1007,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 945,
"end": 956,
"ctxt": 0
},
"value": "numMapPoint",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 956,
"end": 1007,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsIntersectionType",
"span": {
"start": 958,
"end": 1007,
"ctxt": 0
},
"types": [
{
"type": "TsTypeLiteral",
"span": {
"start": 958,
"end": 981,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 960,
"end": 970,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 960,
"end": 961,
"ctxt": 0
},
"value": "x",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 961,
"end": 969,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 963,
"end": 969,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 971,
"end": 980,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 971,
"end": 972,
"ctxt": 0
},
"value": "y",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 972,
"end": 980,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 974,
"end": 980,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
}
]
},
{
"type": "TsTypeLiteral",
"span": {
"start": 984,
"end": 1007,
"ctxt": 0
},
"members": [
{
"type": "TsIndexSignature",
"params": [
{
"type": "Identifier",
"span": {
"start": 987,
"end": 996,
"ctxt": 0
},
"value": "s",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 988,
"end": 996,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 990,
"end": 996,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 997,
"end": 1005,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 999,
"end": 1005,
"ctxt": 0
},
"kind": "number"
}
},
"readonly": false,
"static": false,
"span": {
"start": 986,
"end": 1005,
"ctxt": 0
}
}
]
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "BlockStatement",
"span": {
"start": 1009,
"end": 1142,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 1015,
"end": 1047,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1021,
"end": 1046,
"ctxt": 0
},
"id": {
"type": "ObjectPattern",
"span": {
"start": 1021,
"end": 1032,
"ctxt": 0
},
"properties": [
{
"type": "AssignmentPatternProperty",
"span": {
"start": 1023,
"end": 1024,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 1023,
"end": 1024,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": null
},
{
"type": "AssignmentPatternProperty",
"span": {
"start": 1026,
"end": 1027,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 1026,
"end": 1027,
"ctxt": 0
},
"value": "y",
"optional": false
},
"value": null
},
{
"type": "AssignmentPatternProperty",
"span": {
"start": 1029,
"end": 1030,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 1029,
"end": 1030,
"ctxt": 0
},
"value": "z",
"optional": false
},
"value": null
}
],
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "Identifier",
"span": {
"start": 1035,
"end": 1046,
"ctxt": 0
},
"value": "numMapPoint",
"optional": false
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 1052,
"end": 1064,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 1052,
"end": 1063,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 1052,
"end": 1061,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1052,
"end": 1053,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1054,
"end": 1061,
"ctxt": 0
},
"value": "toFixed",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1082,
"end": 1094,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 1082,
"end": 1093,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 1082,
"end": 1091,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1082,
"end": 1083,
"ctxt": 0
},
"value": "y",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1084,
"end": 1091,
"ctxt": 0
},
"value": "toFixed",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1112,
"end": 1124,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 1112,
"end": 1123,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 1112,
"end": 1121,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1112,
"end": 1113,
"ctxt": 0
},
"value": "z",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1114,
"end": 1121,
"ctxt": 0
},
"value": "toFixed",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
}
]
},
{
"type": "BlockStatement",
"span": {
"start": 1144,
"end": 1281,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 1150,
"end": 1182,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1156,
"end": 1181,
"ctxt": 0
},
"id": {
"type": "ObjectPattern",
"span": {
"start": 1156,
"end": 1167,
"ctxt": 0
},
"properties": [
{
"type": "AssignmentPatternProperty",
"span": {
"start": 1158,
"end": 1159,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 1158,
"end": 1159,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": null
},
{
"type": "RestElement",
"span": {
"start": 1161,
"end": 1165,
"ctxt": 0
},
"rest": {
"start": 1161,
"end": 1164,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 1164,
"end": 1165,
"ctxt": 0
},
"value": "q",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "Identifier",
"span": {
"start": 1170,
"end": 1181,
"ctxt": 0
},
"value": "numMapPoint",
"optional": false
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 1187,
"end": 1199,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 1187,
"end": 1198,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 1187,
"end": 1196,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1187,
"end": 1188,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1189,
"end": 1196,
"ctxt": 0
},
"value": "toFixed",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1217,
"end": 1231,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 1217,
"end": 1230,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 1217,
"end": 1228,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 1217,
"end": 1220,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1217,
"end": 1218,
"ctxt": 0
},
"value": "q",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1219,
"end": 1220,
"ctxt": 0
},
"value": "y",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 1221,
"end": 1228,
"ctxt": 0
},
"value": "toFixed",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1249,
"end": 1263,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 1249,
"end": 1262,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 1249,
"end": 1260,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 1249,
"end": 1252,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1249,
"end": 1250,
"ctxt": 0
},
"value": "q",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1251,
"end": 1252,
"ctxt": 0
},
"value": "z",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 1253,
"end": 1260,
"ctxt": 0
},
"value": "toFixed",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1284,
"end": 1318,
"ctxt": 0
},
"kind": "let",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1296,
"end": 1317,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1296,
"end": 1309,
"ctxt": 0
},
"value": "target_string",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1309,
"end": 1317,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1311,
"end": 1317,
"ctxt": 0
},
"kind": "string"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1319,
"end": 1371,
"ctxt": 0
},
"kind": "let",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1331,
"end": 1370,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1331,
"end": 1350,
"ctxt": 0
},
"value": "target_string_undef",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1350,
"end": 1370,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 1352,
"end": 1370,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 1352,
"end": 1358,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
"start": 1361,
"end": 1370,
"ctxt": 0
},
"kind": "undefined"
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1372,
"end": 1412,
"ctxt": 0
},
"kind": "let",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1384,
"end": 1411,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1384,
"end": 1401,
"ctxt": 0
},
"value": "target_string_arr",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1401,
"end": 1411,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 1403,
"end": 1411,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 1403,
"end": 1409,
"ctxt": 0
},
"kind": "string"
}
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 1434,
"end": 1461,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1434,
"end": 1460,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "ArrayPattern",
"span": {
"start": 1434,
"end": 1449,
"ctxt": 0
},
"elements": [
{
"type": "Identifier",
"span": {
"start": 1435,
"end": 1448,
"ctxt": 0
},
"value": "target_string",
"optional": false,
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 1452,
"end": 1460,
"ctxt": 0
},
"value": "strArray",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1478,
"end": 1511,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1478,
"end": 1510,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "ArrayPattern",
"span": {
"start": 1478,
"end": 1499,
"ctxt": 0
},
"elements": [
{
"type": "Identifier",
"span": {
"start": 1479,
"end": 1498,
"ctxt": 0
},
"value": "target_string_undef",
"optional": false,
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 1502,
"end": 1510,
"ctxt": 0
},
"value": "strArray",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 1526,
"end": 1564,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1526,
"end": 1563,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "ArrayPattern",
"span": {
"start": 1526,
"end": 1552,
"ctxt": 0
},
"elements": [
null,
null,
null,
{
"type": "RestElement",
"span": {
"start": 1534,
"end": 1551,
"ctxt": 0
},
"rest": {
"start": 1531,
"end": 1534,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 1534,
"end": 1551,
"ctxt": 0
},
"value": "target_string_arr",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 1555,
"end": 1563,
"ctxt": 0
},
"value": "strArray",
"optional": false
}
}
},
{
"type": "BlockStatement",
"span": {
"start": 1579,
"end": 1744,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 1585,
"end": 1633,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1589,
"end": 1598,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1589,
"end": 1590,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1590,
"end": 1598,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1592,
"end": 1598,
"ctxt": 0
},
"kind": "number"
}
}
},
"init": null,
"definite": false
},
{
"type": "VariableDeclarator",
"span": {
"start": 1600,
"end": 1609,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1600,
"end": 1601,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1601,
"end": 1609,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1603,
"end": 1609,
"ctxt": 0
},
"kind": "number"
}
}
},
"init": null,
"definite": false
},
{
"type": "VariableDeclarator",
"span": {
"start": 1611,
"end": 1632,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1611,
"end": 1612,
"ctxt": 0
},
"value": "z",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1612,
"end": 1632,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 1614,
"end": 1632,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 1614,
"end": 1620,
"ctxt": 0
},
"kind": "number"
},
{
"type": "TsKeywordType",
"span": {
"start": 1623,
"end": 1632,
"ctxt": 0
},
"kind": "undefined"
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 1638,
"end": 1666,
"ctxt": 0
},
"expression": {
"type": "ParenthesisExpression",
"span": {
"start": 1638,
"end": 1665,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1639,
"end": 1664,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "ObjectPattern",
"span": {
"start": 1639,
"end": 1650,
"ctxt": 0
},
"properties": [
{
"type": "AssignmentPatternProperty",
"span": {
"start": 1641,
"end": 1642,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 1641,
"end": 1642,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": null
},
{
"type": "AssignmentPatternProperty",
"span": {
"start": 1644,
"end": 1645,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 1644,
"end": 1645,
"ctxt": 0
},
"value": "y",
"optional": false
},
"value": null
},
{
"type": "AssignmentPatternProperty",
"span": {
"start": 1647,
"end": 1648,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 1647,
"end": 1648,
"ctxt": 0
},
"value": "z",
"optional": false
},
"value": null
}
],
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 1653,
"end": 1664,
"ctxt": 0
},
"value": "numMapPoint",
"optional": false
}
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 1685,
"end": 1699,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1689,
"end": 1698,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1689,
"end": 1690,
"ctxt": 0
},
"value": "q",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1690,
"end": 1698,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1692,
"end": 1698,
"ctxt": 0
},
"kind": "number"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 1704,
"end": 1726,
"ctxt": 0
},
"expression": {
"type": "ParenthesisExpression",
"span": {
"start": 1704,
"end": 1725,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1705,
"end": 1724,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "ObjectPattern",
"span": {
"start": 1705,
"end": 1710,
"ctxt": 0
},
"properties": [
{
"type": "AssignmentPatternProperty",
"span": {
"start": 1707,
"end": 1708,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 1707,
"end": 1708,
"ctxt": 0
},
"value": "q",
"optional": false
},
"value": null
}
],
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "Identifier",
"span": {
"start": 1713,
"end": 1724,
"ctxt": 0
},
"value": "numMapPoint",
"optional": false
}
}
}
}
]
}
],
"interpreter": null
}