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