• 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": "ObjectPattern",
11            "properties": [
12              {
13                "type": "Property",
14                "method": false,
15                "shorthand": false,
16                "computed": false,
17                "key": {
18                  "type": "Identifier",
19                  "name": "a",
20                  "decorators": [],
21                  "loc": {
22                    "start": {
23                      "line": 17,
24                      "column": 7
25                    },
26                    "end": {
27                      "line": 17,
28                      "column": 8
29                    }
30                  }
31                },
32                "value": {
33                  "type": "ArrayPattern",
34                  "elements": [
35                    {
36                      "type": "AssignmentPattern",
37                      "left": {
38                        "type": "Identifier",
39                        "name": "b",
40                        "decorators": [],
41                        "loc": {
42                          "start": {
43                            "line": 17,
44                            "column": 11
45                          },
46                          "end": {
47                            "line": 17,
48                            "column": 12
49                          }
50                        }
51                      },
52                      "right": {
53                        "type": "NumberLiteral",
54                        "value": 5,
55                        "loc": {
56                          "start": {
57                            "line": 17,
58                            "column": 15
59                          },
60                          "end": {
61                            "line": 17,
62                            "column": 16
63                          }
64                        }
65                      },
66                      "loc": {
67                        "start": {
68                          "line": 17,
69                          "column": 11
70                        },
71                        "end": {
72                          "line": 17,
73                          "column": 16
74                        }
75                      }
76                    },
77                    {
78                      "type": "Identifier",
79                      "name": "c",
80                      "decorators": [],
81                      "loc": {
82                        "start": {
83                          "line": 17,
84                          "column": 18
85                        },
86                        "end": {
87                          "line": 17,
88                          "column": 19
89                        }
90                      }
91                    }
92                  ],
93                  "loc": {
94                    "start": {
95                      "line": 17,
96                      "column": 10
97                    },
98                    "end": {
99                      "line": 17,
100                      "column": 20
101                    }
102                  }
103                },
104                "kind": "init",
105                "loc": {
106                  "start": {
107                    "line": 17,
108                    "column": 7
109                  },
110                  "end": {
111                    "line": 17,
112                    "column": 20
113                  }
114                }
115              }
116            ],
117            "loc": {
118              "start": {
119                "line": 17,
120                "column": 5
121              },
122              "end": {
123                "line": 17,
124                "column": 22
125              }
126            }
127          },
128          "init": {
129            "type": "ObjectExpression",
130            "properties": [
131              {
132                "type": "Property",
133                "method": false,
134                "shorthand": false,
135                "computed": false,
136                "key": {
137                  "type": "Identifier",
138                  "name": "a",
139                  "decorators": [],
140                  "loc": {
141                    "start": {
142                      "line": 17,
143                      "column": 27
144                    },
145                    "end": {
146                      "line": 17,
147                      "column": 28
148                    }
149                  }
150                },
151                "value": {
152                  "type": "NumberLiteral",
153                  "value": 5,
154                  "loc": {
155                    "start": {
156                      "line": 17,
157                      "column": 30
158                    },
159                    "end": {
160                      "line": 17,
161                      "column": 31
162                    }
163                  }
164                },
165                "kind": "init",
166                "loc": {
167                  "start": {
168                    "line": 17,
169                    "column": 27
170                  },
171                  "end": {
172                    "line": 17,
173                    "column": 31
174                  }
175                }
176              }
177            ],
178            "loc": {
179              "start": {
180                "line": 17,
181                "column": 25
182              },
183              "end": {
184                "line": 17,
185                "column": 33
186              }
187            }
188          },
189          "loc": {
190            "start": {
191              "line": 17,
192              "column": 5
193            },
194            "end": {
195              "line": 17,
196              "column": 33
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": 34
210        }
211      }
212    }
213  ],
214  "loc": {
215    "start": {
216      "line": 1,
217      "column": 1
218    },
219    "end": {
220      "line": 17,
221      "column": 34
222    }
223  }
224}
225TypeError: Type number must have a '[Symbol.iterator]()' method that returns an iterator. [objectDestructuring4.ts:17:10]
226