# TS2629: Cannot assign to '…' because it is a class.

> A class name is used as an assignment target. Class declarations can't be reassigned; use a variable if you need to swap classes.

## What it means

The left side of the assignment is a class declaration. A class declaration's name can't be
rebound.

## Example

```ts
class Store {}
Store = class {};
export {};
```

## How to fix

- Use a variable that holds the class: `let Impl: typeof Store = Store;` and reassign that.
- Or rename the new class.

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