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