-
Notifications
You must be signed in to change notification settings - Fork 23
feat(buffer): add some new function bindings. #33
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
Conversation
- readBig(U)Int64(BE/LE) - subarray(ToEnd) NOTE: Buffer.slice is now deprecated (since node 16.x LTS) Refs. ======= - https://nodejs.org/docs/latest-v16.x/api/buffer.html#bufslicestart-end
| external readUintLE: (t, ~offset: int, ~length: int) => float = "readUintLE" | ||
|
|
||
| @send | ||
| external readBigInt64BE: (t, ~offset: int) => bigint = "readBigInt64BE" |
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.
CI says there are compilation errors here:
We've found a bug for you!
/home/runner/work/rescript-nodejs/rescript-nodejs/src/Buffer.res:276:47-52
274 │
275 │ @send
276 │ external readBigInt64BE: (t, ~offset: int) => bigint = "readBigInt64BE
│ "
277 │
278 │ @send
This type constructor, `bigint`, can't be found.
If you wanted to write a recursive type, don't forget the `rec` in `type rec`But rescript 11.1 already treats bigint as primitive type: Primitive Types | Big Integer.
Maybe it's because the rescript version in the devDependencies of the current project is 11.0.1:
"devDependencies": {
"rescript": "^11.0.1",
},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.
Yes, this repo is quite out of date, feel free to upgrade.
Feel free to add an |
5a82174 to
447f398
Compare
- Upgrade rescript to v11.1.0 - Add rescript.json configuration file - Mark Buffer.slice methods as deprecated in favor of subarray methods - Update Cluster module classification logic
|
Hello, I have fixed the CI bug (upgraded rescript to ^11.1.0) and added some @deprecated annotations~ |
|
Thank you! I'll look at it soon |
NOTE: Buffer.slice is now deprecated (since node 16.x LTS)
Refs.