TS1389

error TS1389: ‘this’ is not allowed as a variable declaration name.

Broken Code ❌

1
const this = 'something';

Fixed Code ✔️

The name this cannot be used to declare a variable because it is already a reserved keyword to refer to the current object in a method or constructor.

That’s why you have to choose a different name:

1
const that = 'something';