TS1070
error TS1070: ‘private’ modifier cannot appear on a type member.
Broken Code ❌
1 |
|
Fixed Code ✔️
Interfaces are structures that define the public contract. This prohibits you from using private
modifiers. Only public
and protected
can be used. To solve the problem, the private
keyword must be removed from the name
property of the Animal
interface:
1 |
|