• 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": "TSNumberKeyword",
14              "loc": {
15                "start": {
16                  "line": 16,
17                  "column": 8
18                },
19                "end": {
20                  "line": 16,
21                  "column": 14
22                }
23              }
24            },
25            "decorators": [],
26            "loc": {
27              "start": {
28                "line": 16,
29                "column": 5
30              },
31              "end": {
32                "line": 16,
33                "column": 6
34              }
35            }
36          },
37          "init": null,
38          "loc": {
39            "start": {
40              "line": 16,
41              "column": 5
42            },
43            "end": {
44              "line": 16,
45              "column": 6
46            }
47          }
48        }
49      ],
50      "kind": "var",
51      "loc": {
52        "start": {
53          "line": 16,
54          "column": 1
55        },
56        "end": {
57          "line": 16,
58          "column": 15
59        }
60      }
61    },
62    {
63      "type": "ExpressionStatement",
64      "expression": {
65        "type": "AssignmentExpression",
66        "operator": "=",
67        "left": {
68          "type": "ObjectPattern",
69          "properties": [
70            {
71              "type": "Property",
72              "method": false,
73              "shorthand": true,
74              "computed": false,
75              "key": {
76                "type": "Identifier",
77                "name": "a",
78                "decorators": [],
79                "loc": {
80                  "start": {
81                    "line": 17,
82                    "column": 3
83                  },
84                  "end": {
85                    "line": 17,
86                    "column": 4
87                  }
88                }
89              },
90              "value": {
91                "type": "Identifier",
92                "name": "a",
93                "decorators": [],
94                "loc": {
95                  "start": {
96                    "line": 17,
97                    "column": 3
98                  },
99                  "end": {
100                    "line": 17,
101                    "column": 4
102                  }
103                }
104              },
105              "kind": "init",
106              "loc": {
107                "start": {
108                  "line": 17,
109                  "column": 3
110                },
111                "end": {
112                  "line": 17,
113                  "column": 4
114                }
115              }
116            }
117          ],
118          "loc": {
119            "start": {
120              "line": 17,
121              "column": 2
122            },
123            "end": {
124              "line": 17,
125              "column": 5
126            }
127          }
128        },
129        "right": {
130          "type": "StringLiteral",
131          "value": "foo",
132          "loc": {
133            "start": {
134              "line": 17,
135              "column": 8
136            },
137            "end": {
138              "line": 17,
139              "column": 13
140            }
141          }
142        },
143        "loc": {
144          "start": {
145            "line": 17,
146            "column": 1
147          },
148          "end": {
149            "line": 17,
150            "column": 14
151          }
152        }
153      },
154      "loc": {
155        "start": {
156          "line": 17,
157          "column": 1
158        },
159        "end": {
160          "line": 17,
161          "column": 14
162        }
163      }
164    }
165  ],
166  "loc": {
167    "start": {
168      "line": 1,
169      "column": 1
170    },
171    "end": {
172      "line": 19,
173      "column": 1
174    }
175  }
176}
177TypeError: Property a does not exist on type "foo". [objectDestructuring29.ts:17:2]
178