- Notifications
You must be signed in to change notification settings - Fork471
Stdlib: add DataView with littleEndian get/set#7881
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
pkg-pr-newbot commentedSep 12, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
rescript@rescript/darwin-arm64@rescript/darwin-x64@rescript/linux-arm64@rescript/linux-x64@rescript/runtime@rescript/win32-x64commit: |
@htoooth Thank you for your contribution! 👍 Instead of two bindings per function like @sendexternalgetInt16: (t,int)=>int="getInt16"@sendexternalgetInt16LittleEndian: (t,int, @as(1)_)=>int="getInt16" could you do single bindings like @sendexternalgetInt16: (t,int, ~littleEndian:bool=?)=>int="getInt16" please? (Bonus points for adding doc strings with tests/code examples 🙂.) |
htoooth commentedSep 12, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
By the way, I also initially thought of adding a parameter like your said@cknitt Where to add tests and documentation? I couldn't find the previous documents and test cases |
Using |
cknitt commentedSep 12, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
In previous ReScript versions, the approach with the optional argument was not really ergonomic because a trailing unit argument was required. Now that it has become feasible, we have moved to single bindings in the stdlib where possible, as this is much clearer to JS devs, basically resulting in a 1:1 correspondence with the JS APIs as documented on MDN. E.g. Therefore, also the Docstrings are in a corresponding .resi file and contain examples that are automatically verified as test assertions during the CI build. Example:
|
@cknitt I have made the revisions and added the doc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thanks!
CI does not build yet though.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Christoph Knittel <christoph@knittel.cc>
htoooth commentedSep 15, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@cknitt I have passed the CI |
@htoooth Looks great now! One last thing - could you add a CHANGELOG entry, please? |
done |
1bef891 intorescript-lang:masterUh oh!
There was an error while loading.Please reload this page.


No description provided.