Skip to content

Fix Js.Dict2 mentioned in Js.Dict documentation #84

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
Nov 2, 2020

Conversation

wingyplus
Copy link

The document is section for Js.Dict module but it's mentioned Js.Dict2
in function set section.

The document is section for Js.Dict module but it's mentioned Js.Dict2
in function set section.
@ryyppy
Copy link
Member

ryyppy commented Oct 28, 2020

I need to verify, but it might be that most of the parameter lists of each Js.Dict function are wrong then.

Js.Dict2 has the major difference that the dict value goes in the first parameter position. In Js.Dict it's the last position (legacy pipe-last api).

@wingyplus
Copy link
Author

@ryyppy I'm not sure that Js.Dict2 is simply to Js.Dict or it's a new module for ReScript. But I can make sure that Js.Dict is accepted Js.Dict.t as a first parameter like example below:

let () = {
  let dict = Js.Dict.empty()
  Js.Dict.set(dict, "hello", "world")
  Js.log(dict)
}

@ryyppy ryyppy merged commit bf4f3e7 into rescript-lang:master Nov 2, 2020
@ryyppy
Copy link
Member

ryyppy commented Nov 2, 2020

Just noticed that Js.Dict2 is actually not a thing. Thanks for your patience!

@wingyplus wingyplus deleted the fix-doc branch November 3, 2020 05:59
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