diff --git a/pages/docs/manual/latest/record.mdx b/pages/docs/manual/latest/record.mdx index 53c114a9b..b251d7aa4 100644 --- a/pages/docs/manual/latest/record.mdx +++ b/pages/docs/manual/latest/record.mdx @@ -426,7 +426,7 @@ type c = { } ``` -Record type spreads act as a 'copy-paste' mechanism for fields from one or more records into a new record. This operation inlines the fields from the spread records directly into the new record definition, while preserving their original properties, such as whether they are optional or mandatory. It's important to note that duplicate field names are not allowed across the records being spread, even if the fields share the same type. +Record type spreads act as a 'copy-paste' mechanism for fields from one or more records into a new record. This operation inlines the fields from the spread records directly into the new record definition, while preserving their original properties, such as whether they are optional or mandatory. It's important to note that duplicate field names are not allowed across the records being spread, even if the fields have the same type. ## Record Type Coercion diff --git a/pages/docs/manual/latest/variant.mdx b/pages/docs/manual/latest/variant.mdx index 862b835a1..a0fbb8cab 100644 --- a/pages/docs/manual/latest/variant.mdx +++ b/pages/docs/manual/latest/variant.mdx @@ -346,18 +346,17 @@ let getBestFriendsAge = user => } ``` -> Notice how `@as` allows us to say that an unboxed variant case should map to a specific underlying _primitive_. `Present` has a type variable, so it can hold any type. And since it's an unboxed type, only the payloads `'a` or `null` will be kept at runtime. That's where the magic comes from. +> Notice how `@as` allows us to say that an untagged variant case should map to a specific underlying _primitive_. `Present` has a type variable, so it can hold any type. And since it's an unboxed type, only the payloads `'a` or `null` will be kept at runtime. That's where the magic comes from. ### Decoding and encoding JSON idiomatically -With unboxed variants, we have everything we need to define a JSON type: +With untagged variants, we have everything we need to define a JSON type: ```rescript @unboxed type rec json = - | @as(false) False - | @as(true) True | @as(null) Null + | Boolean(bool) | String(string) | Number(float) | Object(Js.Dict.t)