• 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": "TSTupleType",
14              "elementTypes": [
15                {
16                  "type": "TSNumberKeyword",
17                  "loc": {
18                    "start": {
19                      "line": 17,
20                      "column": 9
21                    },
22                    "end": {
23                      "line": 17,
24                      "column": 16
25                    }
26                  }
27                },
28                {
29                  "type": "TSStringKeyword",
30                  "loc": {
31                    "start": {
32                      "line": 17,
33                      "column": 17
34                    },
35                    "end": {
36                      "line": 17,
37                      "column": 24
38                    }
39                  }
40                },
41                {
42                  "type": "TSBooleanKeyword",
43                  "loc": {
44                    "start": {
45                      "line": 17,
46                      "column": 25
47                    },
48                    "end": {
49                      "line": 17,
50                      "column": 33
51                    }
52                  }
53                },
54                {
55                  "type": "TSNumberKeyword",
56                  "loc": {
57                    "start": {
58                      "line": 17,
59                      "column": 34
60                    },
61                    "end": {
62                      "line": 17,
63                      "column": 41
64                    }
65                  }
66                },
67                {
68                  "type": "TSStringKeyword",
69                  "loc": {
70                    "start": {
71                      "line": 17,
72                      "column": 42
73                    },
74                    "end": {
75                      "line": 17,
76                      "column": 49
77                    }
78                  }
79                }
80              ],
81              "loc": {
82                "start": {
83                  "line": 17,
84                  "column": 8
85                },
86                "end": {
87                  "line": 17,
88                  "column": 49
89                }
90              }
91            },
92            "decorators": [],
93            "loc": {
94              "start": {
95                "line": 17,
96                "column": 5
97              },
98              "end": {
99                "line": 17,
100                "column": 6
101              }
102            }
103          },
104          "init": {
105            "type": "ArrayExpression",
106            "elements": [
107              {
108                "type": "NumberLiteral",
109                "value": 1,
110                "loc": {
111                  "start": {
112                    "line": 17,
113                    "column": 53
114                  },
115                  "end": {
116                    "line": 17,
117                    "column": 54
118                  }
119                }
120              },
121              {
122                "type": "StringLiteral",
123                "value": "foo",
124                "loc": {
125                  "start": {
126                    "line": 17,
127                    "column": 56
128                  },
129                  "end": {
130                    "line": 17,
131                    "column": 61
132                  }
133                }
134              },
135              {
136                "type": "BooleanLiteral",
137                "value": true,
138                "loc": {
139                  "start": {
140                    "line": 17,
141                    "column": 63
142                  },
143                  "end": {
144                    "line": 17,
145                    "column": 67
146                  }
147                }
148              },
149              {
150                "type": "NumberLiteral",
151                "value": 5,
152                "loc": {
153                  "start": {
154                    "line": 17,
155                    "column": 69
156                  },
157                  "end": {
158                    "line": 17,
159                    "column": 70
160                  }
161                }
162              },
163              {
164                "type": "NumberLiteral",
165                "value": 6,
166                "loc": {
167                  "start": {
168                    "line": 17,
169                    "column": 72
170                  },
171                  "end": {
172                    "line": 17,
173                    "column": 73
174                  }
175                }
176              }
177            ],
178            "loc": {
179              "start": {
180                "line": 17,
181                "column": 52
182              },
183              "end": {
184                "line": 17,
185                "column": 74
186              }
187            }
188          },
189          "loc": {
190            "start": {
191              "line": 17,
192              "column": 5
193            },
194            "end": {
195              "line": 17,
196              "column": 74
197            }
198          }
199        }
200      ],
201      "kind": "var",
202      "loc": {
203        "start": {
204          "line": 17,
205          "column": 1
206        },
207        "end": {
208          "line": 17,
209          "column": 74
210        }
211      }
212    }
213  ],
214  "loc": {
215    "start": {
216      "line": 1,
217      "column": 1
218    },
219    "end": {
220      "line": 18,
221      "column": 1
222    }
223  }
224}
225TypeError: Type 'number' is not assignable to type 'string'. [tupleAssignability8.ts:17:72]
226