-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
doc: Buffer UInt -> Uint aliases are not documented #36751
Comments
cc'ing @addaleax who added those aliases in case there was a reason those weren't documented. |
Yeah, I intended them to be typo-catchers and they’re there just for consistency with the typed array naming convention. Adding separate documentation entries to the (already heavily redundant) page seemed relatively pointless. |
I ran into some confusion when someone's code (calling a lowercase version of the method) threw an error on my machine because I was running on a version of Node where the lowercase methods did not exist, and because there's no documentation on this, couldn't figure out why it was even working on their machine. While the change has been backported to the current supported LTS releases, it's incredibly confusing to have undocumented method aliases that exist in some versions of Node but not others, with no indication that e.g. |
I guess my point isn’t so much that this should not documented per se, but that it seems hard to do so in a meaningful way that doesn’t clutter the documentation unnecessarily. I guess, my main question is, if you run into this problem, where would you look it up? If you go to the docs for https://nodejs.org/api/buffer.html#buffer_buf_readuint8_offset – which is what I would probably do in a case like this, but that’s just me – you’ll find that this is part of the changelog for the function. If we add a paragraph like “The following aliases are provided: |
I think that would be useful--when I was trying to figure out why I didn't think to check the History section; I assumed that if I was on the latest version of the docs, everything relating to the current state of the function (aliases included) would be outside the History section. |
I suggest an update to the docs here: #36796 |
Fixes: #36751 PR-URL: #36796 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Harshitha K P <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
Fixes: #36751 PR-URL: #36796 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Harshitha K P <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
📗 API Reference Docs Problem
Location
Affected URL(s):
Description
The
Buffer.[read/write]UInt
->Buffer.[read/write]Uint
aliases added in #34729 do not appear in the rendered documentation, despite appearing in the YAML sections.submit a pull request.
The text was updated successfully, but these errors were encountered: