Skip to content

Commit 6640a01

Browse files
Mention bigint
1 parent a4fa47b commit 6640a01

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

_blogposts/2024-02-01-release-11-1-0.mdx

+23-1
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,36 @@ console.log(buttonCss);
107107
```
108108
</CodeTab>
109109

110+
## BigInt support
111+
112+
ReScript now natively supports [JavaScript's `bigint` type](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt).
113+
114+
<CodeTab labels={["ReScript", "JS Output"]}>
115+
116+
```res example
117+
open! Js.BigInt
118+
119+
let a = 9007199254740991n + 9007199254740991n
120+
let b = 2n ** 2n
121+
```
122+
```js
123+
var a = 9007199254740991n + 9007199254740991n;
124+
125+
var p = 2n ** 2n;
126+
```
127+
128+
</CodeTab>
129+
130+
See [big integer docs](https://rescript-lang.org/docs/manual/latest/primitive-types#big-integers-experimental) for more.
131+
110132
## Array spread syntax
111133

112134
The spread syntax, which was already supported for records and lists for a long time, now also supports arrays!
113135

114136
```rescript
115137
let animals = ["🐶", "🐱", "🐷"]
116138
let moreAnimals = [...animals, "🐔", "🐴", "🐮"]
117-
````
139+
```
118140

119141
## Hyphens in JSX tag names
120142

0 commit comments

Comments
 (0)