TS2612

Property myVariable will overwrite the base property in MyBaseClass. If this is intentional, add an initializer. Otherwise, add a declare modifier or remove the redundant declaration.

Broken Code ❌

class MyBaseClass {
  myVariable = '123';
}
 
export class MyExtendedClass extends MyBaseClass {
  myVariable;
 
  logMyVariable = () => {
    console.log(this.myVariable);
  };
}

Fixed Code ✔️

If you don't intend to reinitialize an inherited variable, you can simply avoid it to be redeclared:

class MyBaseClass {
  myVariable = '123';
}
 
export class MyExtendedClass extends MyBaseClass {
  logMyVariable = () => {
    console.log(this.myVariable);
  };
}