You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,10 @@
1
1
## Contributing
2
+
2
3
TypeScript-Handbook is accepting contributions. If you've submitted a PR for an existing issue, please post a comment in the issue to avoid duplication of effort.
3
4
4
5
5
6
## Housekeeping
7
+
6
8
Your pull request should:
7
9
8
10
* Include a description of what your change intends to do.
Copy file name to clipboardExpand all lines: pages/Classes.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ var greeter = new Greeter("world");
23
23
```
24
24
25
25
The syntax should look familiar if you've used C# or Java before.
26
-
We declare a new class `Greeter`. This class has three members: a property called `greeting`, a constructor, and a method `greet`.
26
+
We declare a new class `Greeter`. This class has three members: a property called `greeting`, a constructor, and a method `greet`.
27
27
28
28
You'll notice that in the class when we refer to one of the members of the class we prepend `this.`.
29
29
This denotes that it's a member access.
@@ -119,7 +119,7 @@ new Animal("Cat").name; // Error: 'name' is private;
119
119
```
120
120
121
121
TypeScript is a structural type system.
122
-
When we compare two different types, regardless of where they came from, if the types of all members are compatible, then we say the types themselves are compatible.
122
+
When we compare two different types, regardless of where they came from, if the types of all members are compatible, then we say the types themselves are compatible.
123
123
124
124
However, when comparing types that have `private` and `protected` members, we treat these types differently.
125
125
For two types to be considered compatible, if one of them has a `private` member, then the other must have a `private` member that originated in the same declaration.
0 commit comments