1{ 2 "type": "Program", 3 "statements": [ 4 { 5 "type": "FunctionDeclaration", 6 "function": { 7 "type": "ScriptFunction", 8 "id": { 9 "type": "Identifier", 10 "name": "foo", 11 "decorators": [], 12 "loc": { 13 "start": { 14 "line": 17, 15 "column": 10 16 }, 17 "end": { 18 "line": 17, 19 "column": 13 20 } 21 } 22 }, 23 "generator": false, 24 "async": false, 25 "expression": false, 26 "params": [ 27 { 28 "type": "AssignmentPattern", 29 "left": { 30 "type": "ArrayPattern", 31 "elements": [ 32 { 33 "type": "ObjectPattern", 34 "properties": [ 35 { 36 "type": "Property", 37 "method": false, 38 "shorthand": true, 39 "computed": false, 40 "key": { 41 "type": "Identifier", 42 "name": "x", 43 "decorators": [], 44 "loc": { 45 "start": { 46 "line": 17, 47 "column": 17 48 }, 49 "end": { 50 "line": 17, 51 "column": 18 52 } 53 } 54 }, 55 "value": { 56 "type": "AssignmentPattern", 57 "left": { 58 "type": "Identifier", 59 "name": "x", 60 "decorators": [], 61 "loc": { 62 "start": { 63 "line": 17, 64 "column": 17 65 }, 66 "end": { 67 "line": 17, 68 "column": 18 69 } 70 } 71 }, 72 "right": { 73 "type": "NumberLiteral", 74 "value": 6, 75 "loc": { 76 "start": { 77 "line": 17, 78 "column": 21 79 }, 80 "end": { 81 "line": 17, 82 "column": 22 83 } 84 } 85 }, 86 "loc": { 87 "start": { 88 "line": 17, 89 "column": 17 90 }, 91 "end": { 92 "line": 17, 93 "column": 22 94 } 95 } 96 }, 97 "kind": "init", 98 "loc": { 99 "start": { 100 "line": 17, 101 "column": 17 102 }, 103 "end": { 104 "line": 17, 105 "column": 22 106 } 107 } 108 } 109 ], 110 "loc": { 111 "start": { 112 "line": 17, 113 "column": 15 114 }, 115 "end": { 116 "line": 17, 117 "column": 24 118 } 119 } 120 }, 121 { 122 "type": "AssignmentPattern", 123 "left": { 124 "type": "Identifier", 125 "name": "y", 126 "decorators": [], 127 "loc": { 128 "start": { 129 "line": 17, 130 "column": 26 131 }, 132 "end": { 133 "line": 17, 134 "column": 27 135 } 136 } 137 }, 138 "right": { 139 "type": "StringLiteral", 140 "value": "foo", 141 "loc": { 142 "start": { 143 "line": 17, 144 "column": 30 145 }, 146 "end": { 147 "line": 17, 148 "column": 35 149 } 150 } 151 }, 152 "loc": { 153 "start": { 154 "line": 17, 155 "column": 26 156 }, 157 "end": { 158 "line": 17, 159 "column": 35 160 } 161 } 162 }, 163 { 164 "type": "Identifier", 165 "name": "z", 166 "decorators": [], 167 "loc": { 168 "start": { 169 "line": 17, 170 "column": 37 171 }, 172 "end": { 173 "line": 17, 174 "column": 38 175 } 176 } 177 } 178 ], 179 "loc": { 180 "start": { 181 "line": 17, 182 "column": 14 183 }, 184 "end": { 185 "line": 17, 186 "column": 39 187 } 188 } 189 }, 190 "right": { 191 "type": "ArrayExpression", 192 "elements": [ 193 { 194 "type": "ObjectExpression", 195 "properties": [ 196 { 197 "type": "Property", 198 "method": false, 199 "shorthand": false, 200 "computed": false, 201 "key": { 202 "type": "Identifier", 203 "name": "x", 204 "decorators": [], 205 "loc": { 206 "start": { 207 "line": 17, 208 "column": 45 209 }, 210 "end": { 211 "line": 17, 212 "column": 46 213 } 214 } 215 }, 216 "value": { 217 "type": "StringLiteral", 218 "value": "foo", 219 "loc": { 220 "start": { 221 "line": 17, 222 "column": 48 223 }, 224 "end": { 225 "line": 17, 226 "column": 53 227 } 228 } 229 }, 230 "kind": "init", 231 "loc": { 232 "start": { 233 "line": 17, 234 "column": 45 235 }, 236 "end": { 237 "line": 17, 238 "column": 53 239 } 240 } 241 } 242 ], 243 "loc": { 244 "start": { 245 "line": 17, 246 "column": 43 247 }, 248 "end": { 249 "line": 17, 250 "column": 55 251 } 252 } 253 }, 254 { 255 "type": "NumberLiteral", 256 "value": 2, 257 "loc": { 258 "start": { 259 "line": 17, 260 "column": 57 261 }, 262 "end": { 263 "line": 17, 264 "column": 58 265 } 266 } 267 }, 268 { 269 "type": "NumberLiteral", 270 "value": 3, 271 "loc": { 272 "start": { 273 "line": 17, 274 "column": 60 275 }, 276 "end": { 277 "line": 17, 278 "column": 61 279 } 280 } 281 } 282 ], 283 "loc": { 284 "start": { 285 "line": 17, 286 "column": 42 287 }, 288 "end": { 289 "line": 17, 290 "column": 62 291 } 292 } 293 }, 294 "loc": { 295 "start": { 296 "line": 17, 297 "column": 14 298 }, 299 "end": { 300 "line": 17, 301 "column": 62 302 } 303 } 304 } 305 ], 306 "body": { 307 "type": "BlockStatement", 308 "statements": [], 309 "loc": { 310 "start": { 311 "line": 17, 312 "column": 64 313 }, 314 "end": { 315 "line": 19, 316 "column": 2 317 } 318 } 319 }, 320 "loc": { 321 "start": { 322 "line": 17, 323 "column": 1 324 }, 325 "end": { 326 "line": 19, 327 "column": 2 328 } 329 } 330 }, 331 "loc": { 332 "start": { 333 "line": 17, 334 "column": 1 335 }, 336 "end": { 337 "line": 19, 338 "column": 2 339 } 340 } 341 }, 342 { 343 "type": "ExpressionStatement", 344 "expression": { 345 "type": "BinaryExpression", 346 "operator": "+", 347 "left": { 348 "type": "Identifier", 349 "name": "foo", 350 "decorators": [], 351 "loc": { 352 "start": { 353 "line": 21, 354 "column": 1 355 }, 356 "end": { 357 "line": 21, 358 "column": 4 359 } 360 } 361 }, 362 "right": { 363 "type": "NumberLiteral", 364 "value": 5, 365 "loc": { 366 "start": { 367 "line": 21, 368 "column": 7 369 }, 370 "end": { 371 "line": 21, 372 "column": 8 373 } 374 } 375 }, 376 "loc": { 377 "start": { 378 "line": 21, 379 "column": 1 380 }, 381 "end": { 382 "line": 21, 383 "column": 8 384 } 385 } 386 }, 387 "loc": { 388 "start": { 389 "line": 21, 390 "column": 1 391 }, 392 "end": { 393 "line": 21, 394 "column": 9 395 } 396 } 397 } 398 ], 399 "loc": { 400 "start": { 401 "line": 1, 402 "column": 1 403 }, 404 "end": { 405 "line": 21, 406 "column": 9 407 } 408 } 409} 410TypeError: operator + cannot be applied to types ([{ x }, y, z]?: [{ x: string; }, number, number]) => void and number [functionWithPattern1.ts:21:1] 411