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": "TSTypeLiteral", 14 "members": [ 15 { 16 "type": "TSIndexSignature", 17 "parameters": { 18 "type": "Identifier", 19 "name": "a", 20 "typeAnnotation": { 21 "type": "TSNumberKeyword", 22 "loc": { 23 "start": { 24 "line": 17, 25 "column": 12 26 }, 27 "end": { 28 "line": 17, 29 "column": 18 30 } 31 } 32 }, 33 "decorators": [], 34 "loc": { 35 "start": { 36 "line": 17, 37 "column": 10 38 }, 39 "end": { 40 "line": 17, 41 "column": 11 42 } 43 } 44 }, 45 "typeAnnotation": { 46 "type": "TSNumberKeyword", 47 "loc": { 48 "start": { 49 "line": 17, 50 "column": 20 51 }, 52 "end": { 53 "line": 17, 54 "column": 26 55 } 56 } 57 }, 58 "readonly": false, 59 "loc": { 60 "start": { 61 "line": 17, 62 "column": 9 63 }, 64 "end": { 65 "line": 17, 66 "column": 27 67 } 68 } 69 }, 70 { 71 "type": "TSIndexSignature", 72 "parameters": { 73 "type": "Identifier", 74 "name": "b", 75 "typeAnnotation": { 76 "type": "TSStringKeyword", 77 "loc": { 78 "start": { 79 "line": 17, 80 "column": 40 81 }, 82 "end": { 83 "line": 17, 84 "column": 46 85 } 86 } 87 }, 88 "decorators": [], 89 "loc": { 90 "start": { 91 "line": 17, 92 "column": 38 93 }, 94 "end": { 95 "line": 17, 96 "column": 39 97 } 98 } 99 }, 100 "typeAnnotation": { 101 "type": "TSNumberKeyword", 102 "loc": { 103 "start": { 104 "line": 17, 105 "column": 48 106 }, 107 "end": { 108 "line": 17, 109 "column": 54 110 } 111 } 112 }, 113 "readonly": true, 114 "loc": { 115 "start": { 116 "line": 17, 117 "column": 28 118 }, 119 "end": { 120 "line": 17, 121 "column": 55 122 } 123 } 124 } 125 ], 126 "loc": { 127 "start": { 128 "line": 17, 129 "column": 8 130 }, 131 "end": { 132 "line": 17, 133 "column": 55 134 } 135 } 136 }, 137 "decorators": [], 138 "loc": { 139 "start": { 140 "line": 17, 141 "column": 5 142 }, 143 "end": { 144 "line": 17, 145 "column": 6 146 } 147 } 148 }, 149 "init": null, 150 "loc": { 151 "start": { 152 "line": 17, 153 "column": 5 154 }, 155 "end": { 156 "line": 17, 157 "column": 6 158 } 159 } 160 } 161 ], 162 "kind": "var", 163 "loc": { 164 "start": { 165 "line": 17, 166 "column": 1 167 }, 168 "end": { 169 "line": 17, 170 "column": 56 171 } 172 } 173 }, 174 { 175 "type": "ExpressionStatement", 176 "expression": { 177 "type": "AssignmentExpression", 178 "operator": "=", 179 "left": { 180 "type": "MemberExpression", 181 "object": { 182 "type": "Identifier", 183 "name": "a", 184 "decorators": [], 185 "loc": { 186 "start": { 187 "line": 18, 188 "column": 1 189 }, 190 "end": { 191 "line": 18, 192 "column": 2 193 } 194 } 195 }, 196 "property": { 197 "type": "StringLiteral", 198 "value": "foo", 199 "loc": { 200 "start": { 201 "line": 18, 202 "column": 3 203 }, 204 "end": { 205 "line": 18, 206 "column": 8 207 } 208 } 209 }, 210 "computed": true, 211 "optional": false, 212 "loc": { 213 "start": { 214 "line": 18, 215 "column": 1 216 }, 217 "end": { 218 "line": 18, 219 "column": 9 220 } 221 } 222 }, 223 "right": { 224 "type": "NumberLiteral", 225 "value": 5, 226 "loc": { 227 "start": { 228 "line": 18, 229 "column": 12 230 }, 231 "end": { 232 "line": 18, 233 "column": 13 234 } 235 } 236 }, 237 "loc": { 238 "start": { 239 "line": 18, 240 "column": 1 241 }, 242 "end": { 243 "line": 18, 244 "column": 13 245 } 246 } 247 }, 248 "loc": { 249 "start": { 250 "line": 18, 251 "column": 1 252 }, 253 "end": { 254 "line": 18, 255 "column": 14 256 } 257 } 258 } 259 ], 260 "loc": { 261 "start": { 262 "line": 1, 263 "column": 1 264 }, 265 "end": { 266 "line": 19, 267 "column": 1 268 } 269 } 270} 271TypeError: Cannot assign to this property because it is readonly. [member_expression_71.ts:18:1] 272