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