access modifier in TypeScript

TypeScript supports access modifiers at the class level. TypeScript automatically sets the public modifier access to all class members as a default modifier.
Access modifier | Meaning
----- | -----
Public | By default, members (properties and methods) of the TypeScript class are public - so you don’t need to prefix members with the public keyword. Public members are accessible everywhere without restrictions even from the multiple level sub-classes without any compile errors.
Private | Private members can be accessed only within the class and even their subclasses won't be allowed to use their private properties and attributes.
Protected | Protected members can be accessed only within the class and by the instance of its sub/child class.