Skip to content

Commit 90806a3

Browse files
committed
Document lightweight poly var syntax
1 parent 4cbecd2 commit 90806a3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pages/docs/manual/latest/polymorphic-variant.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ In rare cases (mostly for JS interop reasons), it's also possible to define "inv
8686
<CodeTab labels={["ReScript", "JS Output"]}>
8787

8888
```res
89-
type numbers = [#\"1" | #\"2"]
90-
let one = #\"1"
91-
let oneA = #\"1a"
89+
type numbers = [#"1" | #"2"]
90+
let one = #"1"
91+
let oneA = #"1a"
9292
```
9393

9494
```js
@@ -98,7 +98,7 @@ var oneA = "1a";
9898

9999
</CodeTab>
100100

101-
**Note:** The `\` character will be dropped in future ReScript versions for a cleaner look (`#"1"`).
101+
**Note:** For ReScript versions < 9.0 you'll need to use the `\` character as an escape sequence to represent invalid identifiers (e.g. `#\"1"`).
102102

103103
### Constructor Arguments
104104

0 commit comments

Comments
 (0)