Skip to content

Commit 9e3a3ce

Browse files
authored
Fix confusing statement & correction
1 parent b60caa9 commit 9e3a3ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ TypeScript offers `public`, `private`, and protected modifiers to every class me
630630

631631
## Private Members
632632

633-
When a member is marked `private`, it cannot be accessed from outside of its containing class. **However, should a class `X` inherit properties from `Person`, class `A` will be able to access all private properties from `Person` (e.g. `type and setType`) due to being inside (or having access to) the protected scope**. More on what class inheritance is all about just below, but here's an example;
633+
When a class inherits from another class, private members of the parent class are not accessible directly in the child class. Instead, interaction with private members can only be done through public or protected methods of the parent class.
634634

635635
```ts
636636
class Type {

0 commit comments

Comments
 (0)