• 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": "TSIndexSignature",
11            "parameters": {
12              "type": "Identifier",
13              "name": "x",
14              "typeAnnotation": {
15                "type": "TSNumberKeyword",
16                "loc": {
17                  "start": {
18                    "line": 18,
19                    "column": 9
20                  },
21                  "end": {
22                    "line": 18,
23                    "column": 15
24                  }
25                }
26              },
27              "decorators": [],
28              "loc": {
29                "start": {
30                  "line": 18,
31                  "column": 6
32                },
33                "end": {
34                  "line": 18,
35                  "column": 7
36                }
37              }
38            },
39            "typeAnnotation": {
40              "type": "TSNumberKeyword",
41              "loc": {
42                "start": {
43                  "line": 18,
44                  "column": 18
45                },
46                "end": {
47                  "line": 18,
48                  "column": 24
49                }
50              }
51            },
52            "readonly": false,
53            "loc": {
54              "start": {
55                "line": 18,
56                "column": 5
57              },
58              "end": {
59                "line": 18,
60                "column": 25
61              }
62            }
63          }
64        ],
65        "loc": {
66          "start": {
67            "line": 17,
68            "column": 13
69          },
70          "end": {
71            "line": 19,
72            "column": 2
73          }
74        }
75      },
76      "id": {
77        "type": "Identifier",
78        "name": "A",
79        "decorators": [],
80        "loc": {
81          "start": {
82            "line": 17,
83            "column": 11
84          },
85          "end": {
86            "line": 17,
87            "column": 12
88          }
89        }
90      },
91      "extends": [],
92      "loc": {
93        "start": {
94          "line": 17,
95          "column": 1
96        },
97        "end": {
98          "line": 19,
99          "column": 2
100        }
101      }
102    },
103    {
104      "type": "TSInterfaceDeclaration",
105      "body": {
106        "type": "TSInterfaceBody",
107        "body": [
108          {
109            "type": "TSPropertySignature",
110            "computed": false,
111            "optional": false,
112            "readonly": false,
113            "key": {
114              "type": "NumberLiteral",
115              "value": 5,
116              "loc": {
117                "start": {
118                  "line": 22,
119                  "column": 5
120                },
121                "end": {
122                  "line": 22,
123                  "column": 6
124                }
125              }
126            },
127            "typeAnnotation": {
128              "type": "TSBooleanKeyword",
129              "loc": {
130                "start": {
131                  "line": 22,
132                  "column": 8
133                },
134                "end": {
135                  "line": 22,
136                  "column": 15
137                }
138              }
139            },
140            "loc": {
141              "start": {
142                "line": 22,
143                "column": 5
144              },
145              "end": {
146                "line": 22,
147                "column": 16
148              }
149            }
150          }
151        ],
152        "loc": {
153          "start": {
154            "line": 21,
155            "column": 23
156          },
157          "end": {
158            "line": 23,
159            "column": 2
160          }
161        }
162      },
163      "id": {
164        "type": "Identifier",
165        "name": "B",
166        "decorators": [],
167        "loc": {
168          "start": {
169            "line": 21,
170            "column": 11
171          },
172          "end": {
173            "line": 21,
174            "column": 12
175          }
176        }
177      },
178      "extends": [
179        {
180          "type": "TSInterfaceHeritage",
181          "expression": {
182            "type": "TSTypeReference",
183            "typeName": {
184              "type": "Identifier",
185              "name": "A",
186              "decorators": [],
187              "loc": {
188                "start": {
189                  "line": 21,
190                  "column": 21
191                },
192                "end": {
193                  "line": 21,
194                  "column": 22
195                }
196              }
197            },
198            "loc": {
199              "start": {
200                "line": 21,
201                "column": 23
202              },
203              "end": {
204                "line": 21,
205                "column": 22
206              }
207            }
208          },
209          "loc": {
210            "start": {
211              "line": 21,
212              "column": 23
213            },
214            "end": {
215              "line": 21,
216              "column": 22
217            }
218          }
219        }
220      ],
221      "loc": {
222        "start": {
223          "line": 21,
224          "column": 1
225        },
226        "end": {
227          "line": 23,
228          "column": 2
229        }
230      }
231    }
232  ],
233  "loc": {
234    "start": {
235      "line": 1,
236      "column": 1
237    },
238    "end": {
239      "line": 23,
240      "column": 2
241    }
242  }
243}
244TypeError: Property '5' of type 'boolean' is not assignable to numeric index type 'number'. [interfaceInheritance3.ts:22:5]
245