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: docs/types/freshness.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,7 @@ logIfHasName(random); // okay
53
53
logIfHasName({neme: 'I just misspelled name to neme'}); // Error: object literals must only specify known properties. `neme` is excessive here.
54
54
```
55
55
56
-
The reason why only object literals are type checked this way is because having a object literal created on the spot and passed in with additional properties *that aren't actually used* is almost always a typo or a misunderstanding of the API.
56
+
The reason why only object literals are type checked this way is because having an object literal created on the spot and passed in with additional properties *that aren't actually used* is almost always a typo or a misunderstanding of the API.
57
57
58
58
### Allowing extra properties
59
59
@@ -94,7 +94,7 @@ interface State {
94
94
// You want to do:
95
95
this.setState({foo: "Hello"}); // Yay works fine!
96
96
97
-
// Because of freshness its protected against typos as well!
97
+
// Because of freshness it's protected against typos as well!
98
98
this.setState({foos: "Hello"}}; // Error: Objects may only specify known properties
0 commit comments