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": true, 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": "Identifier", 34 "name": "a", 35 "decorators": [], 36 "loc": { 37 "start": { 38 "line": 17, 39 "column": 7 40 }, 41 "end": { 42 "line": 17, 43 "column": 8 44 } 45 } 46 }, 47 "kind": "init", 48 "loc": { 49 "start": { 50 "line": 17, 51 "column": 7 52 }, 53 "end": { 54 "line": 17, 55 "column": 8 56 } 57 } 58 } 59 ], 60 "loc": { 61 "start": { 62 "line": 17, 63 "column": 5 64 }, 65 "end": { 66 "line": 17, 67 "column": 10 68 } 69 } 70 }, 71 "init": { 72 "type": "ObjectExpression", 73 "properties": [ 74 { 75 "type": "Property", 76 "method": false, 77 "shorthand": false, 78 "computed": false, 79 "key": { 80 "type": "Identifier", 81 "name": "a", 82 "decorators": [], 83 "loc": { 84 "start": { 85 "line": 17, 86 "column": 15 87 }, 88 "end": { 89 "line": 17, 90 "column": 16 91 } 92 } 93 }, 94 "value": { 95 "type": "StringLiteral", 96 "value": "foo", 97 "loc": { 98 "start": { 99 "line": 17, 100 "column": 18 101 }, 102 "end": { 103 "line": 17, 104 "column": 23 105 } 106 } 107 }, 108 "kind": "init", 109 "loc": { 110 "start": { 111 "line": 17, 112 "column": 15 113 }, 114 "end": { 115 "line": 17, 116 "column": 23 117 } 118 } 119 }, 120 { 121 "type": "Property", 122 "method": false, 123 "shorthand": false, 124 "computed": false, 125 "key": { 126 "type": "Identifier", 127 "name": "b", 128 "decorators": [], 129 "loc": { 130 "start": { 131 "line": 17, 132 "column": 25 133 }, 134 "end": { 135 "line": 17, 136 "column": 26 137 } 138 } 139 }, 140 "value": { 141 "type": "NumberLiteral", 142 "value": 5, 143 "loc": { 144 "start": { 145 "line": 17, 146 "column": 28 147 }, 148 "end": { 149 "line": 17, 150 "column": 29 151 } 152 } 153 }, 154 "kind": "init", 155 "loc": { 156 "start": { 157 "line": 17, 158 "column": 25 159 }, 160 "end": { 161 "line": 17, 162 "column": 29 163 } 164 } 165 } 166 ], 167 "loc": { 168 "start": { 169 "line": 17, 170 "column": 13 171 }, 172 "end": { 173 "line": 17, 174 "column": 31 175 } 176 } 177 }, 178 "loc": { 179 "start": { 180 "line": 17, 181 "column": 5 182 }, 183 "end": { 184 "line": 17, 185 "column": 31 186 } 187 } 188 } 189 ], 190 "kind": "var", 191 "loc": { 192 "start": { 193 "line": 17, 194 "column": 1 195 }, 196 "end": { 197 "line": 17, 198 "column": 32 199 } 200 } 201 } 202 ], 203 "loc": { 204 "start": { 205 "line": 1, 206 "column": 1 207 }, 208 "end": { 209 "line": 17, 210 "column": 32 211 } 212 } 213} 214TypeError: Object literal may only specify known properties, and property 'b' does not exist in the pattern. [objectDestructuring2.ts:17:5] 215