From a77c647fd9a39c2aca08cb7a0124d1d3446fa5a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20Tsnobiladz=C3=A9?= Date: Mon, 8 Jan 2024 11:41:28 +0100 Subject: [PATCH] document that tuples are allowed in untagged variants --- pages/docs/manual/latest/variant.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/pages/docs/manual/latest/variant.mdx b/pages/docs/manual/latest/variant.mdx index f0167ef40..ac5a842bb 100644 --- a/pages/docs/manual/latest/variant.mdx +++ b/pages/docs/manual/latest/variant.mdx @@ -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)` +- `('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)` - `Dict.t`: `Object(Dict.t)` - `Date.t`: `Date(Date.t)`. A JavaScript date.