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