# TS2588: Cannot assign to '…' because it is a constant.

> A const variable is assigned a new value. Declare it with let if it needs to change, or assign to a new variable.

## What it means

A `const` binding can't be reassigned after it's declared. This covers `=`, compound assignments
like `+=`, and `++`/`--`. The object a `const` refers to can still be changed through its
properties.

## Example

```ts
const total: number = 1;
total = 2;
export {};
```

## How to fix

- Declare it with `let` if it really changes.
- Or keep it `const` and put the new value in a new variable.

Source: https://ts-r.dev/errors/TS2588/
