• 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": "TSArrayType",
14              "elementType": {
15                "type": "TSNumberKeyword",
16                "loc": {
17                  "start": {
18                    "line": 17,
19                    "column": 8
20                  },
21                  "end": {
22                    "line": 17,
23                    "column": 14
24                  }
25                }
26              },
27              "loc": {
28                "start": {
29                  "line": 17,
30                  "column": 8
31                },
32                "end": {
33                  "line": 17,
34                  "column": 16
35                }
36              }
37            },
38            "decorators": [],
39            "loc": {
40              "start": {
41                "line": 17,
42                "column": 5
43              },
44              "end": {
45                "line": 17,
46                "column": 6
47              }
48            }
49          },
50          "init": null,
51          "loc": {
52            "start": {
53              "line": 17,
54              "column": 5
55            },
56            "end": {
57              "line": 17,
58              "column": 6
59            }
60          }
61        }
62      ],
63      "kind": "var",
64      "loc": {
65        "start": {
66          "line": 17,
67          "column": 1
68        },
69        "end": {
70          "line": 17,
71          "column": 6
72        }
73      }
74    },
75    {
76      "type": "VariableDeclaration",
77      "declarations": [
78        {
79          "type": "VariableDeclarator",
80          "id": {
81            "type": "Identifier",
82            "name": "a",
83            "typeAnnotation": {
84              "type": "TSArrayType",
85              "elementType": {
86                "type": "TSStringKeyword",
87                "loc": {
88                  "start": {
89                    "line": 18,
90                    "column": 8
91                  },
92                  "end": {
93                    "line": 18,
94                    "column": 14
95                  }
96                }
97              },
98              "loc": {
99                "start": {
100                  "line": 18,
101                  "column": 8
102                },
103                "end": {
104                  "line": 18,
105                  "column": 16
106                }
107              }
108            },
109            "decorators": [],
110            "loc": {
111              "start": {
112                "line": 18,
113                "column": 5
114              },
115              "end": {
116                "line": 18,
117                "column": 6
118              }
119            }
120          },
121          "init": null,
122          "loc": {
123            "start": {
124              "line": 18,
125              "column": 5
126            },
127            "end": {
128              "line": 18,
129              "column": 6
130            }
131          }
132        }
133      ],
134      "kind": "var",
135      "loc": {
136        "start": {
137          "line": 18,
138          "column": 1
139        },
140        "end": {
141          "line": 18,
142          "column": 6
143        }
144      }
145    }
146  ],
147  "loc": {
148    "start": {
149      "line": 1,
150      "column": 1
151    },
152    "end": {
153      "line": 18,
154      "column": 16
155    }
156  }
157}
158TypeError: Subsequent variable declaration must have the same type. Variable 'a' must be of type 'number[]', but here has type 'string[]'. [varRedeclaration4.ts:18:5]
159