TS7008

Member 'name' implicitly has an 'any' type.

Broken Code ❌

abstract class Person {
  accessor name;
}

Fixed Code ✔️

To fix the problem, you can initialize the class member so that TypeScript can infer the type:

abstract class Person {
  accessor name = 'unknown';
}

Alternatively, you can annotate the type:

abstract class Person {
  accessor name: string;
}