Skip to content

Fix Array module docstrings #168

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 1 commit into from
Dec 30, 2023

Conversation

DZakh
Copy link
Member

@DZakh DZakh commented Dec 11, 2023

No description provided.

@DZakh DZakh force-pushed the array-documentation-improvements branch from f5e3785 to d767be9 Compare December 11, 2023 15:14
@@ -4,6 +4,9 @@ let eq = (a, b) => a == b

Test.run(__POS_OF__("make"), Array.make(~length=6, 7), eq, [7, 7, 7, 7, 7, 7])

Test.run(__POS_OF__("getUnsafe - existing"), [0, 1, 2]->Array.getUnsafe(1), eq, 1)
Test.run(__POS_OF__("getUnsafe - missing"), [0, 1, 2]->Array.getUnsafe(10), eq, %raw(`undefined`))
Copy link
Member Author

Choose a reason for hiding this comment

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

In practice it happened not to raise 😅

@zth
Copy link
Collaborator

zth commented Dec 11, 2023

So the existing fn is wrong...?

@DZakh
Copy link
Member Author

DZakh commented Dec 11, 2023

If you're talking about Array.getUnsafe, I think it works as it should. What was wrong is the docstrings.

@DZakh
Copy link
Member Author

DZakh commented Dec 21, 2023

@zth What about merging the PR?

@dsiu
Copy link

dsiu commented Dec 31, 2023

If you're talking about Array.getUnsafe, I think it works as it should. What was wrong is the docstrings.

Yup. It works as it should just like JS but the doc was incorrect. Thanks for the fix.

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.

3 participants