1{ 2 "type": "Program", 3 "statements": [ 4 { 5 "type": "VariableDeclaration", 6 "declarations": [ 7 { 8 "type": "VariableDeclarator", 9 "id": { 10 "type": "ArrayPattern", 11 "elements": [ 12 { 13 "type": "RestElement", 14 "argument": { 15 "type": "Identifier", 16 "name": "a", 17 "decorators": [], 18 "loc": { 19 "start": { 20 "line": 17, 21 "column": 9 22 }, 23 "end": { 24 "line": 17, 25 "column": 10 26 } 27 } 28 }, 29 "loc": { 30 "start": { 31 "line": 17, 32 "column": 6 33 }, 34 "end": { 35 "line": 17, 36 "column": 10 37 } 38 } 39 } 40 ], 41 "loc": { 42 "start": { 43 "line": 17, 44 "column": 5 45 }, 46 "end": { 47 "line": 17, 48 "column": 11 49 } 50 } 51 }, 52 "init": { 53 "type": "ArrayExpression", 54 "elements": [ 55 { 56 "type": "NumberLiteral", 57 "value": 1, 58 "loc": { 59 "start": { 60 "line": 17, 61 "column": 15 62 }, 63 "end": { 64 "line": 17, 65 "column": 16 66 } 67 } 68 }, 69 { 70 "type": "StringLiteral", 71 "value": "foo", 72 "loc": { 73 "start": { 74 "line": 17, 75 "column": 18 76 }, 77 "end": { 78 "line": 17, 79 "column": 23 80 } 81 } 82 }, 83 { 84 "type": "BooleanLiteral", 85 "value": true, 86 "loc": { 87 "start": { 88 "line": 17, 89 "column": 25 90 }, 91 "end": { 92 "line": 17, 93 "column": 29 94 } 95 } 96 } 97 ], 98 "loc": { 99 "start": { 100 "line": 17, 101 "column": 14 102 }, 103 "end": { 104 "line": 17, 105 "column": 30 106 } 107 } 108 }, 109 "loc": { 110 "start": { 111 "line": 17, 112 "column": 5 113 }, 114 "end": { 115 "line": 17, 116 "column": 30 117 } 118 } 119 } 120 ], 121 "kind": "var", 122 "loc": { 123 "start": { 124 "line": 17, 125 "column": 1 126 }, 127 "end": { 128 "line": 17, 129 "column": 31 130 } 131 } 132 }, 133 { 134 "type": "ExpressionStatement", 135 "expression": { 136 "type": "AssignmentExpression", 137 "operator": "=", 138 "left": { 139 "type": "Identifier", 140 "name": "a", 141 "decorators": [], 142 "loc": { 143 "start": { 144 "line": 18, 145 "column": 1 146 }, 147 "end": { 148 "line": 18, 149 "column": 2 150 } 151 } 152 }, 153 "right": { 154 "type": "ObjectExpression", 155 "properties": [], 156 "loc": { 157 "start": { 158 "line": 18, 159 "column": 5 160 }, 161 "end": { 162 "line": 18, 163 "column": 7 164 } 165 } 166 }, 167 "loc": { 168 "start": { 169 "line": 18, 170 "column": 1 171 }, 172 "end": { 173 "line": 18, 174 "column": 7 175 } 176 } 177 }, 178 "loc": { 179 "start": { 180 "line": 18, 181 "column": 1 182 }, 183 "end": { 184 "line": 18, 185 "column": 8 186 } 187 } 188 } 189 ], 190 "loc": { 191 "start": { 192 "line": 1, 193 "column": 1 194 }, 195 "end": { 196 "line": 18, 197 "column": 8 198 } 199 } 200} 201TypeError: Type '{ }' is not assignable to type '[number, string, boolean]'. [arrayDestructuring11.ts:18:1] 202