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