TS18016
error TS18016: Private identifiers are not allowed outside class bodies.
Broken Code ❌
1 |
|
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:
1 |
|