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": "ObjectPattern", 29 "properties": [ 30 { 31 "type": "Property", 32 "method": false, 33 "shorthand": false, 34 "computed": false, 35 "key": { 36 "type": "Identifier", 37 "name": "x", 38 "decorators": [], 39 "loc": { 40 "start": { 41 "line": 17, 42 "column": 16 43 }, 44 "end": { 45 "line": 17, 46 "column": 17 47 } 48 } 49 }, 50 "value": { 51 "type": "ObjectPattern", 52 "properties": [ 53 { 54 "type": "Property", 55 "method": false, 56 "shorthand": true, 57 "computed": false, 58 "key": { 59 "type": "Identifier", 60 "name": "asd", 61 "decorators": [], 62 "loc": { 63 "start": { 64 "line": 17, 65 "column": 21 66 }, 67 "end": { 68 "line": 17, 69 "column": 24 70 } 71 } 72 }, 73 "value": { 74 "type": "Identifier", 75 "name": "asd", 76 "decorators": [], 77 "loc": { 78 "start": { 79 "line": 17, 80 "column": 21 81 }, 82 "end": { 83 "line": 17, 84 "column": 24 85 } 86 } 87 }, 88 "kind": "init", 89 "loc": { 90 "start": { 91 "line": 17, 92 "column": 21 93 }, 94 "end": { 95 "line": 17, 96 "column": 24 97 } 98 } 99 } 100 ], 101 "loc": { 102 "start": { 103 "line": 17, 104 "column": 19 105 }, 106 "end": { 107 "line": 17, 108 "column": 26 109 } 110 } 111 }, 112 "kind": "init", 113 "loc": { 114 "start": { 115 "line": 17, 116 "column": 16 117 }, 118 "end": { 119 "line": 17, 120 "column": 26 121 } 122 } 123 }, 124 { 125 "type": "Property", 126 "method": false, 127 "shorthand": false, 128 "computed": false, 129 "key": { 130 "type": "Identifier", 131 "name": "y", 132 "decorators": [], 133 "loc": { 134 "start": { 135 "line": 17, 136 "column": 28 137 }, 138 "end": { 139 "line": 17, 140 "column": 29 141 } 142 } 143 }, 144 "value": { 145 "type": "AssignmentPattern", 146 "left": { 147 "type": "ObjectPattern", 148 "properties": [ 149 { 150 "type": "Property", 151 "method": false, 152 "shorthand": true, 153 "computed": false, 154 "key": { 155 "type": "Identifier", 156 "name": "t", 157 "decorators": [], 158 "loc": { 159 "start": { 160 "line": 17, 161 "column": 33 162 }, 163 "end": { 164 "line": 17, 165 "column": 34 166 } 167 } 168 }, 169 "value": { 170 "type": "AssignmentPattern", 171 "left": { 172 "type": "Identifier", 173 "name": "t", 174 "decorators": [], 175 "loc": { 176 "start": { 177 "line": 17, 178 "column": 33 179 }, 180 "end": { 181 "line": 17, 182 "column": 34 183 } 184 } 185 }, 186 "right": { 187 "type": "NumberLiteral", 188 "value": 6, 189 "loc": { 190 "start": { 191 "line": 17, 192 "column": 37 193 }, 194 "end": { 195 "line": 17, 196 "column": 38 197 } 198 } 199 }, 200 "loc": { 201 "start": { 202 "line": 17, 203 "column": 33 204 }, 205 "end": { 206 "line": 17, 207 "column": 38 208 } 209 } 210 }, 211 "kind": "init", 212 "loc": { 213 "start": { 214 "line": 17, 215 "column": 33 216 }, 217 "end": { 218 "line": 17, 219 "column": 38 220 } 221 } 222 }, 223 { 224 "type": "Property", 225 "method": false, 226 "shorthand": true, 227 "computed": false, 228 "key": { 229 "type": "Identifier", 230 "name": "r", 231 "decorators": [], 232 "loc": { 233 "start": { 234 "line": 17, 235 "column": 40 236 }, 237 "end": { 238 "line": 17, 239 "column": 41 240 } 241 } 242 }, 243 "value": { 244 "type": "AssignmentPattern", 245 "left": { 246 "type": "Identifier", 247 "name": "r", 248 "decorators": [], 249 "loc": { 250 "start": { 251 "line": 17, 252 "column": 40 253 }, 254 "end": { 255 "line": 17, 256 "column": 41 257 } 258 } 259 }, 260 "right": { 261 "type": "StringLiteral", 262 "value": "foo", 263 "loc": { 264 "start": { 265 "line": 17, 266 "column": 44 267 }, 268 "end": { 269 "line": 17, 270 "column": 49 271 } 272 } 273 }, 274 "loc": { 275 "start": { 276 "line": 17, 277 "column": 40 278 }, 279 "end": { 280 "line": 17, 281 "column": 49 282 } 283 } 284 }, 285 "kind": "init", 286 "loc": { 287 "start": { 288 "line": 17, 289 "column": 40 290 }, 291 "end": { 292 "line": 17, 293 "column": 49 294 } 295 } 296 } 297 ], 298 "loc": { 299 "start": { 300 "line": 17, 301 "column": 31 302 }, 303 "end": { 304 "line": 17, 305 "column": 51 306 } 307 } 308 }, 309 "right": { 310 "type": "ObjectExpression", 311 "properties": [ 312 { 313 "type": "Property", 314 "method": false, 315 "shorthand": false, 316 "computed": false, 317 "key": { 318 "type": "Identifier", 319 "name": "t", 320 "decorators": [], 321 "loc": { 322 "start": { 323 "line": 17, 324 "column": 56 325 }, 326 "end": { 327 "line": 17, 328 "column": 57 329 } 330 } 331 }, 332 "value": { 333 "type": "StringLiteral", 334 "value": "foo", 335 "loc": { 336 "start": { 337 "line": 17, 338 "column": 59 339 }, 340 "end": { 341 "line": 17, 342 "column": 64 343 } 344 } 345 }, 346 "kind": "init", 347 "loc": { 348 "start": { 349 "line": 17, 350 "column": 56 351 }, 352 "end": { 353 "line": 17, 354 "column": 64 355 } 356 } 357 } 358 ], 359 "loc": { 360 "start": { 361 "line": 17, 362 "column": 54 363 }, 364 "end": { 365 "line": 17, 366 "column": 66 367 } 368 } 369 }, 370 "loc": { 371 "start": { 372 "line": 17, 373 "column": 31 374 }, 375 "end": { 376 "line": 17, 377 "column": 66 378 } 379 } 380 }, 381 "kind": "init", 382 "loc": { 383 "start": { 384 "line": 17, 385 "column": 28 386 }, 387 "end": { 388 "line": 17, 389 "column": 66 390 } 391 } 392 } 393 ], 394 "loc": { 395 "start": { 396 "line": 17, 397 "column": 14 398 }, 399 "end": { 400 "line": 17, 401 "column": 68 402 } 403 } 404 } 405 ], 406 "body": { 407 "type": "BlockStatement", 408 "statements": [], 409 "loc": { 410 "start": { 411 "line": 17, 412 "column": 70 413 }, 414 "end": { 415 "line": 19, 416 "column": 2 417 } 418 } 419 }, 420 "loc": { 421 "start": { 422 "line": 17, 423 "column": 1 424 }, 425 "end": { 426 "line": 19, 427 "column": 2 428 } 429 } 430 }, 431 "loc": { 432 "start": { 433 "line": 17, 434 "column": 1 435 }, 436 "end": { 437 "line": 19, 438 "column": 2 439 } 440 } 441 }, 442 { 443 "type": "ExpressionStatement", 444 "expression": { 445 "type": "BinaryExpression", 446 "operator": "+", 447 "left": { 448 "type": "Identifier", 449 "name": "foo", 450 "decorators": [], 451 "loc": { 452 "start": { 453 "line": 21, 454 "column": 1 455 }, 456 "end": { 457 "line": 21, 458 "column": 4 459 } 460 } 461 }, 462 "right": { 463 "type": "NumberLiteral", 464 "value": 5, 465 "loc": { 466 "start": { 467 "line": 21, 468 "column": 7 469 }, 470 "end": { 471 "line": 21, 472 "column": 8 473 } 474 } 475 }, 476 "loc": { 477 "start": { 478 "line": 21, 479 "column": 1 480 }, 481 "end": { 482 "line": 21, 483 "column": 8 484 } 485 } 486 }, 487 "loc": { 488 "start": { 489 "line": 21, 490 "column": 1 491 }, 492 "end": { 493 "line": 21, 494 "column": 9 495 } 496 } 497 } 498 ], 499 "loc": { 500 "start": { 501 "line": 1, 502 "column": 1 503 }, 504 "end": { 505 "line": 21, 506 "column": 9 507 } 508 } 509} 510TypeError: operator + cannot be applied to types ({ x: { asd }, y: { t, r } }: { x?: { asd: any; }; y?: { t: string; }; }) => void and number [functionWithPattern3.ts:21:1] 511