Skip to content

Remove outdated Belt.Array documentation regarding stdlib's Array.get #7570

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 20, 2025

Conversation

mediremi
Copy link
Contributor

@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
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