# TS2451: Cannot redeclare block-scoped variable '…'.

> A let, const or class name is declared twice in the same scope. Rename one of them, or remove the duplicate.

## What it means

Block-scoped declarations (`let`, `const`, `class`) can't share a name with another declaration
in the same block. In script files (without imports or exports) the top-level scope is shared by
every script, so the duplicate can be in another file.

## Example

```ts
export {};
let user = "ada";
let user = "grace";
```

## How to fix

- Rename one of the variables, or reassign instead of redeclaring: `user = "grace"`.
- If the clash is across script files, make the files modules by adding an `import` or `export`.

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