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: packages/documentation/copy/en/reference/Enums.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,7 +88,7 @@ enum Direction {
88
88
```
89
89
90
90
While string enums don't have auto-incrementing behavior, string enums have the benefit that they "serialize" well.
91
-
In other words, if you were debugging and had to read the runtime value of a numeric enum, the value is often opaque - it doesn't convey any useful meaning on its own (though [reverse mapping](#reverse-mappings) can often help), string enums allow you to give a meaningful and readable value when your code runs, independent of the name of the enum member itself.
91
+
In other words, if you were debugging and had to read the runtime value of a numeric enum, the value is often opaque - it doesn't convey any useful meaning on its own (though [reverse mapping](#reverse-mappings) can often help). String enums allow you to give a meaningful and readable value when your code runs, independent of the name of the enum member itself.
92
92
93
93
## Heterogeneous enums
94
94
@@ -171,7 +171,7 @@ A literal enum member is a constant enum member with no initialized value, or wi
171
171
- any numeric literal (e.g. `1`, `100`)
172
172
- a unary minus applied to any numeric literal (e.g. `-1`, `-100`)
173
173
174
-
When all members in an enum have literal enum values, some special semantics come to play.
174
+
When all members in an enum have literal enum values, some special semantics come into play.
175
175
176
176
The first is that enum members also become types as well!
177
177
For example, we can say that certain members can _only_ have the value of an enum member:
@@ -405,7 +405,7 @@ declare enum Enum {
405
405
```
406
406
407
407
One important difference between ambient and non-ambient enums is that, in regular enums, members that don't have an initializer will be considered constant if its preceding enum member is considered constant.
408
-
In contrast, an ambient (and non-const) enum member that does not have initializer is _always_ considered computed.
408
+
By contrast, an ambient (and non-const) enum member that does not have an initializer is _always_ considered computed.
0 commit comments