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