Skip to content

Commit

Permalink
document that tuples are allowed in untagged variants (#778)
Browse files Browse the repository at this point in the history
  • Loading branch information
tsnobip authored Jan 8, 2024
1 parent d5906ae commit d3c97fa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pages/docs/manual/latest/variant.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ Here's a list of all possible things you can unbox:
- `float`: `Number(float)`. Notice `int` cannot be unboxed, because JavaScript only has `number` (not actually `int` and `float` like in ReScript) so we can't disambiguate between `float` and `int` at runtime.
- `bool`: `Boolean(bool)`
- `array<'value>`: `List(array<string>)`
- `('a, 'b, 'c)`: `Tuple((string, int, bool))`. Any size of tuples works, but you can have only one case of array or tuple in a variant.
- `promise<'value>`: `Promise(promise<string>)`
- `Dict.t`: `Object(Dict.t<string>)`
- `Date.t`: `Date(Date.t)`. A JavaScript date.
Expand Down

0 comments on commit d3c97fa

Please sign in to comment.