Skip to content

Commit d3c97fa

Browse files
authored
document that tuples are allowed in untagged variants (#778)
1 parent d5906ae commit d3c97fa

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pages/docs/manual/latest/variant.mdx

+1
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,7 @@ Here's a list of all possible things you can unbox:
366366
- `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.
367367
- `bool`: `Boolean(bool)`
368368
- `array<'value>`: `List(array<string>)`
369+
- `('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.
369370
- `promise<'value>`: `Promise(promise<string>)`
370371
- `Dict.t`: `Object(Dict.t<string>)`
371372
- `Date.t`: `Date(Date.t)`. A JavaScript date.

0 commit comments

Comments
 (0)