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