TS18016

Private identifiers are not allowed outside class bodies.

Broken Code ❌

interface Person {
  #age: number;
}

Fixed Code ✔️

Private properties can only be used in classes but not in interfaces. We therefore need to convert the interface into a class in order to be able to compile the code:

class Person {
  #age: number;
}