@@ -101,7 +101,7 @@ definitions: either *primitive* or *struct type definitions*.
101
101
102
102
#### Options
103
103
104
- Tje optional `options` parameter can influence certain aspects of a struct's semantics.
104
+ The optional `options` parameter can influence certain aspects of a struct's semantics.
105
105
Options are specified using fields on an object passed as the `options` parameter.
106
106
107
107
##### Option: defaults
@@ -358,7 +358,7 @@ throws a `TypeError`.
358
358
## Assigning fields
359
359
360
360
When you assign to a field, the backing store is modified accordingly.
361
- As long as the rhs has the required structure, the process is precisely the same as when
361
+ As long as the right hand side has the required structure, the process is precisely the same as when
362
362
providing an initial value for a typed object. This means that you can write things like:
363
363
364
364
``` js
@@ -382,7 +382,7 @@ line.to = {x: 22}; // Throws.
382
382
The rationale for this behavior is that both alternatives - leaving absent fields
383
383
unchanged or resetting them to their default values - are very likely to cover up
384
384
subtle bugs. This is especially true when gradually converting an existing code base
385
- to using typed objects. OTOH , ignoring additional fields on the source object doesn't
385
+ to using typed objects. On the other hand , ignoring additional fields on the source object doesn't
386
386
have the same issues: all fields on the target instance are set to predictable values.
387
387
388
388
If a field has primitive type, then when it is assigned, the value is
@@ -410,7 +410,7 @@ adding a dynamic property to the instance. Essentially all struct type instances
410
410
as though ` Object.preventExtensions() ` had been invoked on them.
411
411
412
412
* Rationale* : The canonicalization rules described
413
- [ below] ( #canonicalization-of-typed-objects--equality ) mean that structs don't have a way
413
+ [ below] ( #canonicalization-of-typed-objects-and -equality ) mean that structs don't have a way
414
414
to add dynamic properties to them: they would have to be associated with the starting
415
415
offset of the struct in the underlying buffer because the struct itself is just a fat pointer
416
416
to that location. Only for structs that are not embedded in other structs would it be
0 commit comments