Skip to content

Conversation

@mediremi
Copy link
Member

@mediremi mediremi commented Jun 19, 2025

Since v12 (or since v11 if using Core), the standard library's Array.get returns an option instead of throwing an exception if an index isn't found.

I've removed an outdated note from Belt_Array.resi that mentions the old behaviour of Array.get.

Also, since v11, arr[0] in ReScript is compiled to arr[0] in JavaScript, contrary to what the Belt_Array.resi docs said.

@mediremi mediremi marked this pull request as ready for review June 19, 2025 11:52
@pkg-pr-new
Copy link

pkg-pr-new bot commented Jun 19, 2025

Open in StackBlitz

rescript

npm i https://pkg.pr.new/rescript-lang/rescript@7570

@rescript/darwin-arm64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/darwin-arm64@7570

@rescript/darwin-x64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/darwin-x64@7570

@rescript/linux-arm64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/linux-arm64@7570

@rescript/linux-x64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/linux-x64@7570

@rescript/win32-x64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/win32-x64@7570

commit: ee88861

Copy link
Member

@cknitt cknitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@nojaf nojaf merged commit 75afc52 into rescript-lang:master Jun 20, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants