• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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": "a",
17              "decorators": [],
18              "loc": {
19                "start": {
20                  "line": 18,
21                  "column": 5
22                },
23                "end": {
24                  "line": 18,
25                  "column": 6
26                }
27              }
28            },
29            "typeAnnotation": {
30              "type": "TSParenthesizedType",
31              "typeAnnotation": {
32                "type": "TSUnionType",
33                "types": [
34                  {
35                    "type": "TSTypeLiteral",
36                    "members": [
37                      {
38                        "type": "TSPropertySignature",
39                        "computed": false,
40                        "optional": false,
41                        "readonly": false,
42                        "key": {
43                          "type": "Identifier",
44                          "name": "bar",
45                          "decorators": [],
46                          "loc": {
47                            "start": {
48                              "line": 18,
49                              "column": 10
50                            },
51                            "end": {
52                              "line": 18,
53                              "column": 13
54                            }
55                          }
56                        },
57                        "typeAnnotation": {
58                          "type": "TSStringKeyword",
59                          "loc": {
60                            "start": {
61                              "line": 18,
62                              "column": 15
63                            },
64                            "end": {
65                              "line": 18,
66                              "column": 21
67                            }
68                          }
69                        },
70                        "loc": {
71                          "start": {
72                            "line": 18,
73                            "column": 10
74                          },
75                          "end": {
76                            "line": 18,
77                            "column": 22
78                          }
79                        }
80                      }
81                    ],
82                    "loc": {
83                      "start": {
84                        "line": 18,
85                        "column": 9
86                      },
87                      "end": {
88                        "line": 18,
89                        "column": 22
90                      }
91                    }
92                  },
93                  {
94                    "type": "TSTypeLiteral",
95                    "members": [
96                      {
97                        "type": "TSPropertySignature",
98                        "computed": false,
99                        "optional": false,
100                        "readonly": false,
101                        "key": {
102                          "type": "Identifier",
103                          "name": "bar",
104                          "decorators": [],
105                          "loc": {
106                            "start": {
107                              "line": 18,
108                              "column": 26
109                            },
110                            "end": {
111                              "line": 18,
112                              "column": 29
113                            }
114                          }
115                        },
116                        "typeAnnotation": {
117                          "type": "TSNumberKeyword",
118                          "loc": {
119                            "start": {
120                              "line": 18,
121                              "column": 31
122                            },
123                            "end": {
124                              "line": 18,
125                              "column": 37
126                            }
127                          }
128                        },
129                        "loc": {
130                          "start": {
131                            "line": 18,
132                            "column": 26
133                          },
134                          "end": {
135                            "line": 18,
136                            "column": 38
137                          }
138                        }
139                      }
140                    ],
141                    "loc": {
142                      "start": {
143                        "line": 18,
144                        "column": 25
145                      },
146                      "end": {
147                        "line": 18,
148                        "column": 38
149                      }
150                    }
151                  }
152                ],
153                "loc": {
154                  "start": {
155                    "line": 18,
156                    "column": 9
157                  },
158                  "end": {
159                    "line": 18,
160                    "column": 38
161                  }
162                }
163              },
164              "loc": {
165                "start": {
166                  "line": 18,
167                  "column": 8
168                },
169                "end": {
170                  "line": 18,
171                  "column": 39
172                }
173              }
174            },
175            "loc": {
176              "start": {
177                "line": 18,
178                "column": 5
179              },
180              "end": {
181                "line": 19,
182                "column": 2
183              }
184            }
185          }
186        ],
187        "loc": {
188          "start": {
189            "line": 17,
190            "column": 13
191          },
192          "end": {
193            "line": 19,
194            "column": 2
195          }
196        }
197      },
198      "id": {
199        "type": "Identifier",
200        "name": "a",
201        "decorators": [],
202        "loc": {
203          "start": {
204            "line": 17,
205            "column": 11
206          },
207          "end": {
208            "line": 17,
209            "column": 12
210          }
211        }
212      },
213      "extends": [],
214      "loc": {
215        "start": {
216          "line": 17,
217          "column": 1
218        },
219        "end": {
220          "line": 19,
221          "column": 2
222        }
223      }
224    },
225    {
226      "type": "TSInterfaceDeclaration",
227      "body": {
228        "type": "TSInterfaceBody",
229        "body": [
230          {
231            "type": "TSPropertySignature",
232            "computed": false,
233            "optional": false,
234            "readonly": false,
235            "key": {
236              "type": "Identifier",
237              "name": "foo",
238              "decorators": [],
239              "loc": {
240                "start": {
241                  "line": 21,
242                  "column": 5
243                },
244                "end": {
245                  "line": 21,
246                  "column": 8
247                }
248              }
249            },
250            "typeAnnotation": {
251              "type": "TSArrayType",
252              "elementType": {
253                "type": "TSTypeReference",
254                "typeName": {
255                  "type": "Identifier",
256                  "name": "a",
257                  "decorators": [],
258                  "loc": {
259                    "start": {
260                      "line": 21,
261                      "column": 11
262                    },
263                    "end": {
264                      "line": 21,
265                      "column": 12
266                    }
267                  }
268                },
269                "loc": {
270                  "start": {
271                    "line": 21,
272                    "column": 11
273                  },
274                  "end": {
275                    "line": 21,
276                    "column": 12
277                  }
278                }
279              },
280              "loc": {
281                "start": {
282                  "line": 21,
283                  "column": 11
284                },
285                "end": {
286                  "line": 21,
287                  "column": 14
288                }
289              }
290            },
291            "loc": {
292              "start": {
293                "line": 21,
294                "column": 5
295              },
296              "end": {
297                "line": 22,
298                "column": 2
299              }
300            }
301          }
302        ],
303        "loc": {
304          "start": {
305            "line": 20,
306            "column": 13
307          },
308          "end": {
309            "line": 22,
310            "column": 2
311          }
312        }
313      },
314      "id": {
315        "type": "Identifier",
316        "name": "b",
317        "decorators": [],
318        "loc": {
319          "start": {
320            "line": 20,
321            "column": 11
322          },
323          "end": {
324            "line": 20,
325            "column": 12
326          }
327        }
328      },
329      "extends": [],
330      "loc": {
331        "start": {
332          "line": 20,
333          "column": 1
334        },
335        "end": {
336          "line": 22,
337          "column": 2
338        }
339      }
340    },
341    {
342      "type": "TSInterfaceDeclaration",
343      "body": {
344        "type": "TSInterfaceBody",
345        "body": [
346          {
347            "type": "TSPropertySignature",
348            "computed": false,
349            "optional": false,
350            "readonly": false,
351            "key": {
352              "type": "Identifier",
353              "name": "bar",
354              "decorators": [],
355              "loc": {
356                "start": {
357                  "line": 24,
358                  "column": 5
359                },
360                "end": {
361                  "line": 24,
362                  "column": 8
363                }
364              }
365            },
366            "typeAnnotation": {
367              "type": "TSTypeReference",
368              "typeName": {
369                "type": "Identifier",
370                "name": "b",
371                "decorators": [],
372                "loc": {
373                  "start": {
374                    "line": 24,
375                    "column": 11
376                  },
377                  "end": {
378                    "line": 24,
379                    "column": 12
380                  }
381                }
382              },
383              "loc": {
384                "start": {
385                  "line": 24,
386                  "column": 11
387                },
388                "end": {
389                  "line": 24,
390                  "column": 12
391                }
392              }
393            },
394            "loc": {
395              "start": {
396                "line": 24,
397                "column": 5
398              },
399              "end": {
400                "line": 24,
401                "column": 13
402              }
403            }
404          }
405        ],
406        "loc": {
407          "start": {
408            "line": 23,
409            "column": 13
410          },
411          "end": {
412            "line": 25,
413            "column": 2
414          }
415        }
416      },
417      "id": {
418        "type": "Identifier",
419        "name": "c",
420        "decorators": [],
421        "loc": {
422          "start": {
423            "line": 23,
424            "column": 11
425          },
426          "end": {
427            "line": 23,
428            "column": 12
429          }
430        }
431      },
432      "extends": [],
433      "loc": {
434        "start": {
435          "line": 23,
436          "column": 1
437        },
438        "end": {
439          "line": 25,
440          "column": 2
441        }
442      }
443    },
444    {
445      "type": "VariableDeclaration",
446      "declarations": [
447        {
448          "type": "VariableDeclarator",
449          "id": {
450            "type": "Identifier",
451            "name": "a5",
452            "typeAnnotation": {
453              "type": "TSTypeReference",
454              "typeName": {
455                "type": "Identifier",
456                "name": "c",
457                "decorators": [],
458                "loc": {
459                  "start": {
460                    "line": 26,
461                    "column": 9
462                  },
463                  "end": {
464                    "line": 26,
465                    "column": 10
466                  }
467                }
468              },
469              "loc": {
470                "start": {
471                  "line": 26,
472                  "column": 9
473                },
474                "end": {
475                  "line": 26,
476                  "column": 10
477                }
478              }
479            },
480            "decorators": [],
481            "loc": {
482              "start": {
483                "line": 26,
484                "column": 5
485              },
486              "end": {
487                "line": 26,
488                "column": 7
489              }
490            }
491          },
492          "init": null,
493          "loc": {
494            "start": {
495              "line": 26,
496              "column": 5
497            },
498            "end": {
499              "line": 26,
500              "column": 7
501            }
502          }
503        }
504      ],
505      "kind": "var",
506      "loc": {
507        "start": {
508          "line": 26,
509          "column": 1
510        },
511        "end": {
512          "line": 26,
513          "column": 11
514        }
515      }
516    },
517    {
518      "type": "ExpressionStatement",
519      "expression": {
520        "type": "AssignmentExpression",
521        "operator": "=",
522        "left": {
523          "type": "MemberExpression",
524          "object": {
525            "type": "MemberExpression",
526            "object": {
527              "type": "MemberExpression",
528              "object": {
529                "type": "MemberExpression",
530                "object": {
531                  "type": "MemberExpression",
532                  "object": {
533                    "type": "Identifier",
534                    "name": "a5",
535                    "decorators": [],
536                    "loc": {
537                      "start": {
538                        "line": 27,
539                        "column": 1
540                      },
541                      "end": {
542                        "line": 27,
543                        "column": 3
544                      }
545                    }
546                  },
547                  "property": {
548                    "type": "Identifier",
549                    "name": "bar",
550                    "decorators": [],
551                    "loc": {
552                      "start": {
553                        "line": 27,
554                        "column": 4
555                      },
556                      "end": {
557                        "line": 27,
558                        "column": 7
559                      }
560                    }
561                  },
562                  "computed": false,
563                  "optional": false,
564                  "loc": {
565                    "start": {
566                      "line": 27,
567                      "column": 1
568                    },
569                    "end": {
570                      "line": 27,
571                      "column": 7
572                    }
573                  }
574                },
575                "property": {
576                  "type": "Identifier",
577                  "name": "foo",
578                  "decorators": [],
579                  "loc": {
580                    "start": {
581                      "line": 27,
582                      "column": 8
583                    },
584                    "end": {
585                      "line": 27,
586                      "column": 11
587                    }
588                  }
589                },
590                "computed": false,
591                "optional": false,
592                "loc": {
593                  "start": {
594                    "line": 27,
595                    "column": 1
596                  },
597                  "end": {
598                    "line": 27,
599                    "column": 11
600                  }
601                }
602              },
603              "property": {
604                "type": "NumberLiteral",
605                "value": 0,
606                "loc": {
607                  "start": {
608                    "line": 27,
609                    "column": 12
610                  },
611                  "end": {
612                    "line": 27,
613                    "column": 13
614                  }
615                }
616              },
617              "computed": true,
618              "optional": false,
619              "loc": {
620                "start": {
621                  "line": 27,
622                  "column": 1
623                },
624                "end": {
625                  "line": 27,
626                  "column": 14
627                }
628              }
629            },
630            "property": {
631              "type": "Identifier",
632              "name": "a",
633              "decorators": [],
634              "loc": {
635                "start": {
636                  "line": 27,
637                  "column": 15
638                },
639                "end": {
640                  "line": 27,
641                  "column": 16
642                }
643              }
644            },
645            "computed": false,
646            "optional": false,
647            "loc": {
648              "start": {
649                "line": 27,
650                "column": 1
651              },
652              "end": {
653                "line": 27,
654                "column": 16
655              }
656            }
657          },
658          "property": {
659            "type": "Identifier",
660            "name": "bar",
661            "decorators": [],
662            "loc": {
663              "start": {
664                "line": 27,
665                "column": 17
666              },
667              "end": {
668                "line": 27,
669                "column": 20
670              }
671            }
672          },
673          "computed": false,
674          "optional": false,
675          "loc": {
676            "start": {
677              "line": 27,
678              "column": 1
679            },
680            "end": {
681              "line": 27,
682              "column": 20
683            }
684          }
685        },
686        "right": {
687          "type": "BooleanLiteral",
688          "value": false,
689          "loc": {
690            "start": {
691              "line": 27,
692              "column": 23
693            },
694            "end": {
695              "line": 27,
696              "column": 28
697            }
698          }
699        },
700        "loc": {
701          "start": {
702            "line": 27,
703            "column": 1
704          },
705          "end": {
706            "line": 27,
707            "column": 28
708          }
709        }
710      },
711      "loc": {
712        "start": {
713          "line": 27,
714          "column": 1
715        },
716        "end": {
717          "line": 27,
718          "column": 29
719        }
720      }
721    }
722  ],
723  "loc": {
724    "start": {
725      "line": 1,
726      "column": 1
727    },
728    "end": {
729      "line": 27,
730      "column": 29
731    }
732  }
733}
734TypeError: Type 'boolean' is not assignable to type 'string | number'. [memberExpTest_3.ts:27:1]
735