{ "type": "Program", "statements": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "a", "decorators": [], "loc": { "start": { "line": 17, "column": 7 }, "end": { "line": 17, "column": 8 } } }, "init": { "type": "NumberLiteral", "value": 5, "loc": { "start": { "line": 17, "column": 11 }, "end": { "line": 17, "column": 12 } } }, "loc": { "start": { "line": 17, "column": 7 }, "end": { "line": 17, "column": 12 } } } ], "kind": "const", "loc": { "start": { "line": 17, "column": 1 }, "end": { "line": 17, "column": 13 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "a", "decorators": [], "loc": { "start": { "line": 18, "column": 1 }, "end": { "line": 18, "column": 2 } } }, "right": { "type": "NumberLiteral", "value": 5, "loc": { "start": { "line": 18, "column": 5 }, "end": { "line": 18, "column": 6 } } }, "loc": { "start": { "line": 18, "column": 1 }, "end": { "line": 18, "column": 6 } } }, "loc": { "start": { "line": 18, "column": 1 }, "end": { "line": 18, "column": 7 } } } ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 19, "column": 1 } } } TypeError: Cannot assign to a because it is a constant. [cannotAssignToConst.ts:18:1]