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": "RestElement", 14 "argument": { 15 "type": "Identifier", 16 "name": "a", 17 "decorators": [], 18 "loc": { 19 "start": { 20 "line": 17, 21 "column": 9 22 }, 23 "end": { 24 "line": 17, 25 "column": 10 26 } 27 } 28 }, 29 "loc": { 30 "start": { 31 "line": 17, 32 "column": 6 33 }, 34 "end": { 35 "line": 17, 36 "column": 10 37 } 38 } 39 } 40 ], 41 "typeAnnotation": { 42 "type": "TSUnionType", 43 "types": [ 44 { 45 "type": "TSTupleType", 46 "elementTypes": [ 47 { 48 "type": "TSNumberKeyword", 49 "loc": { 50 "start": { 51 "line": 17, 52 "column": 14 53 }, 54 "end": { 55 "line": 17, 56 "column": 21 57 } 58 } 59 }, 60 { 61 "type": "TSStringKeyword", 62 "loc": { 63 "start": { 64 "line": 17, 65 "column": 22 66 }, 67 "end": { 68 "line": 17, 69 "column": 29 70 } 71 } 72 } 73 ], 74 "loc": { 75 "start": { 76 "line": 17, 77 "column": 13 78 }, 79 "end": { 80 "line": 17, 81 "column": 29 82 } 83 } 84 }, 85 { 86 "type": "TSArrayType", 87 "elementType": { 88 "type": "TSBooleanKeyword", 89 "loc": { 90 "start": { 91 "line": 17, 92 "column": 32 93 }, 94 "end": { 95 "line": 17, 96 "column": 39 97 } 98 } 99 }, 100 "loc": { 101 "start": { 102 "line": 17, 103 "column": 32 104 }, 105 "end": { 106 "line": 17, 107 "column": 41 108 } 109 } 110 }, 111 { 112 "type": "TSTupleType", 113 "elementTypes": [ 114 { 115 "type": "TSBigIntKeyword", 116 "loc": { 117 "start": { 118 "line": 17, 119 "column": 45 120 }, 121 "end": { 122 "line": 17, 123 "column": 52 124 } 125 } 126 }, 127 { 128 "type": "TSVoidKeyword", 129 "loc": { 130 "start": { 131 "line": 17, 132 "column": 53 133 }, 134 "end": { 135 "line": 17, 136 "column": 58 137 } 138 } 139 }, 140 { 141 "type": "TSTypeLiteral", 142 "members": [], 143 "loc": { 144 "start": { 145 "line": 17, 146 "column": 59 147 }, 148 "end": { 149 "line": 17, 150 "column": 62 151 } 152 } 153 } 154 ], 155 "loc": { 156 "start": { 157 "line": 17, 158 "column": 44 159 }, 160 "end": { 161 "line": 17, 162 "column": 62 163 } 164 } 165 } 166 ], 167 "loc": { 168 "start": { 169 "line": 17, 170 "column": 13 171 }, 172 "end": { 173 "line": 17, 174 "column": 62 175 } 176 } 177 }, 178 "loc": { 179 "start": { 180 "line": 17, 181 "column": 5 182 }, 183 "end": { 184 "line": 17, 185 "column": 11 186 } 187 } 188 }, 189 "init": { 190 "type": "ArrayExpression", 191 "elements": [ 192 { 193 "type": "BooleanLiteral", 194 "value": true, 195 "loc": { 196 "start": { 197 "line": 17, 198 "column": 66 199 }, 200 "end": { 201 "line": 17, 202 "column": 70 203 } 204 } 205 }, 206 { 207 "type": "BooleanLiteral", 208 "value": false, 209 "loc": { 210 "start": { 211 "line": 17, 212 "column": 72 213 }, 214 "end": { 215 "line": 17, 216 "column": 77 217 } 218 } 219 } 220 ], 221 "loc": { 222 "start": { 223 "line": 17, 224 "column": 65 225 }, 226 "end": { 227 "line": 17, 228 "column": 78 229 } 230 } 231 }, 232 "loc": { 233 "start": { 234 "line": 17, 235 "column": 5 236 }, 237 "end": { 238 "line": 17, 239 "column": 78 240 } 241 } 242 } 243 ], 244 "kind": "var", 245 "loc": { 246 "start": { 247 "line": 17, 248 "column": 1 249 }, 250 "end": { 251 "line": 17, 252 "column": 79 253 } 254 } 255 }, 256 { 257 "type": "ExpressionStatement", 258 "expression": { 259 "type": "AssignmentExpression", 260 "operator": "=", 261 "left": { 262 "type": "Identifier", 263 "name": "a", 264 "decorators": [], 265 "loc": { 266 "start": { 267 "line": 18, 268 "column": 1 269 }, 270 "end": { 271 "line": 18, 272 "column": 2 273 } 274 } 275 }, 276 "right": { 277 "type": "ObjectExpression", 278 "properties": [], 279 "loc": { 280 "start": { 281 "line": 18, 282 "column": 5 283 }, 284 "end": { 285 "line": 18, 286 "column": 7 287 } 288 } 289 }, 290 "loc": { 291 "start": { 292 "line": 18, 293 "column": 1 294 }, 295 "end": { 296 "line": 18, 297 "column": 7 298 } 299 } 300 }, 301 "loc": { 302 "start": { 303 "line": 18, 304 "column": 1 305 }, 306 "end": { 307 "line": 18, 308 "column": 8 309 } 310 } 311 } 312 ], 313 "loc": { 314 "start": { 315 "line": 1, 316 "column": 1 317 }, 318 "end": { 319 "line": 18, 320 "column": 8 321 } 322 } 323} 324TypeError: Type '{ }' is not assignable to type '(number | string | boolean | bigint | void | { })[]'. [arrayDestructuring18.ts:18:1] 325