Skip to content

Commit 8f9de57

Browse files
committed
remove unboxed doc, point it to untagged variant
1 parent 41012b6 commit 8f9de57

File tree

3 files changed

+7
-162
lines changed

3 files changed

+7
-162
lines changed

misc_docs/syntax/decorator_unboxed.mdx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,16 @@ category: "decorators"
77
---
88

99
The `@unboxed` decorator provides a way to unwrap **variant** constructors
10-
that have a *single* argument, or **record** objects that have a *single* field.
10+
that have no overlap in their runtime representation, or **record** objects that have a *single* field.
1111

1212
### Example
1313

1414
<CodeTab labels={["ReScript", "JS Output"]}>
1515

1616
```res
1717
@unboxed
18-
type name = Name(string)
18+
type listItemValue = String(string) | Boolean(bool) | Number(float)
19+
let myArray = [String("Hello"), Boolean(true), Boolean(false), Number(13.37)]
1920
let studentName = Name("Joe")
2021
2122
@unboxed
@@ -24,12 +25,13 @@ let hi = {message: "hello!"}
2425
```
2526

2627
```js
27-
var studentName = "Joe";
28+
var myArray = ["hello", true, false, 13.37];
2829
var hi = "hello!";
2930
```
3031

3132
</CodeTab>
3233

3334
### References
3435

35-
* [Unboxed](/docs/manual/latest/unboxed)
36+
* [Untagged variants](variant#untagged-variants)
37+
* [Unboxed record](/docs/manual/v10.0.0/unboxed)

pages/docs/manual/latest/interop-cheatsheet.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ This is a glossary with examples. All the features are described by later pages.
4545
- [`@JSX`](jsx)
4646
- `@react.component`: [here](/docs/react/latest/introduction) and [here](https://github.com/reasonml/reason-react)
4747
- [`@warning`](attribute#usage)
48-
- [`@unboxed`](unboxed)
48+
- [`@unboxed`](variant#untagged-variants)
4949

5050
### Extension Points
5151

pages/docs/manual/latest/unboxed.mdx

Lines changed: 0 additions & 157 deletions
This file was deleted.

0 commit comments

Comments
 (0)