1{ 2 "type": "Program", 3 "statements": [ 4 { 5 "type": "VariableDeclaration", 6 "declarations": [ 7 { 8 "type": "VariableDeclarator", 9 "id": { 10 "type": "ArrayPattern", 11 "elements": [ 12 { 13 "type": "AssignmentPattern", 14 "left": { 15 "type": "Identifier", 16 "name": "a", 17 "decorators": [], 18 "loc": { 19 "start": { 20 "line": 17, 21 "column": 6 22 }, 23 "end": { 24 "line": 17, 25 "column": 7 26 } 27 } 28 }, 29 "right": { 30 "type": "NumberLiteral", 31 "value": 1, 32 "loc": { 33 "start": { 34 "line": 17, 35 "column": 10 36 }, 37 "end": { 38 "line": 17, 39 "column": 11 40 } 41 } 42 }, 43 "loc": { 44 "start": { 45 "line": 17, 46 "column": 6 47 }, 48 "end": { 49 "line": 17, 50 "column": 11 51 } 52 } 53 }, 54 { 55 "type": "AssignmentPattern", 56 "left": { 57 "type": "Identifier", 58 "name": "b", 59 "decorators": [], 60 "loc": { 61 "start": { 62 "line": 17, 63 "column": 13 64 }, 65 "end": { 66 "line": 17, 67 "column": 14 68 } 69 } 70 }, 71 "right": { 72 "type": "StringLiteral", 73 "value": "foo", 74 "loc": { 75 "start": { 76 "line": 17, 77 "column": 17 78 }, 79 "end": { 80 "line": 17, 81 "column": 22 82 } 83 } 84 }, 85 "loc": { 86 "start": { 87 "line": 17, 88 "column": 13 89 }, 90 "end": { 91 "line": 17, 92 "column": 22 93 } 94 } 95 } 96 ], 97 "typeAnnotation": { 98 "type": "TSTupleType", 99 "elementTypes": [ 100 { 101 "type": "TSNumberKeyword", 102 "loc": { 103 "start": { 104 "line": 17, 105 "column": 26 106 }, 107 "end": { 108 "line": 17, 109 "column": 33 110 } 111 } 112 }, 113 { 114 "type": "TSNumberKeyword", 115 "loc": { 116 "start": { 117 "line": 17, 118 "column": 34 119 }, 120 "end": { 121 "line": 17, 122 "column": 41 123 } 124 } 125 } 126 ], 127 "loc": { 128 "start": { 129 "line": 17, 130 "column": 25 131 }, 132 "end": { 133 "line": 17, 134 "column": 41 135 } 136 } 137 }, 138 "loc": { 139 "start": { 140 "line": 17, 141 "column": 5 142 }, 143 "end": { 144 "line": 17, 145 "column": 23 146 } 147 } 148 }, 149 "init": { 150 "type": "ArrayExpression", 151 "elements": [ 152 { 153 "type": "NumberLiteral", 154 "value": 1, 155 "loc": { 156 "start": { 157 "line": 17, 158 "column": 45 159 }, 160 "end": { 161 "line": 17, 162 "column": 46 163 } 164 } 165 }, 166 { 167 "type": "NumberLiteral", 168 "value": 1, 169 "loc": { 170 "start": { 171 "line": 17, 172 "column": 48 173 }, 174 "end": { 175 "line": 17, 176 "column": 49 177 } 178 } 179 } 180 ], 181 "loc": { 182 "start": { 183 "line": 17, 184 "column": 44 185 }, 186 "end": { 187 "line": 17, 188 "column": 50 189 } 190 } 191 }, 192 "loc": { 193 "start": { 194 "line": 17, 195 "column": 5 196 }, 197 "end": { 198 "line": 17, 199 "column": 50 200 } 201 } 202 } 203 ], 204 "kind": "var", 205 "loc": { 206 "start": { 207 "line": 17, 208 "column": 1 209 }, 210 "end": { 211 "line": 17, 212 "column": 51 213 } 214 } 215 } 216 ], 217 "loc": { 218 "start": { 219 "line": 1, 220 "column": 1 221 }, 222 "end": { 223 "line": 17, 224 "column": 51 225 } 226 } 227} 228TypeError: Type 'string' is not assignable to type 'number'. [arrayDestructuring5.ts:17:13] 229