Skip to content
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: modify param description for end(),write() in StringDecoder #49285

Merged
merged 1 commit into from
Aug 24, 2023

Conversation

pluris
Copy link
Contributor

@pluris pluris commented Aug 22, 2023

According to the following js code, string is also included in possible arguments.
Therefore, it seems that the string is missing in the API description, so I added it.

* @param {string | Buffer | TypedArray | DataView} buf
* @returns {string}
* @throws {TypeError} Throws when buf is not in one of supported types
*/
StringDecoder.prototype.write = function write(buf) {

node/lib/string_decoder.js

Lines 112 to 115 in 62b2cf3

* @param {string | Buffer | TypedArray | DataView} [buf]
* @returns {string}
*/
StringDecoder.prototype.end = function end(buf) {

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. string_decoder Issues and PRs related to the string_decoder subsystem. labels Aug 22, 2023
@@ -63,7 +63,7 @@ Creates a new `StringDecoder` instance.
added: v0.9.3
-->

* `buffer` {Buffer|TypedArray|DataView} A `Buffer`, or `TypedArray`, or
* `buffer` {string|Buffer|TypedArray|DataView} A `Buffer`, or `TypedArray`, or
Copy link
Contributor

Choose a reason for hiding this comment

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

The parameter description that follows also needs updating.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mscdex Thank you for your comment. I updated it.

@@ -86,7 +86,7 @@ changes:
character instead of one for each individual byte.
-->

* `buffer` {Buffer|TypedArray|DataView} A `Buffer`, or `TypedArray`, or
* `buffer` {string|Buffer|TypedArray|DataView} A `Buffer`, or `TypedArray`, or
Copy link
Contributor

Choose a reason for hiding this comment

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

Ditto

@pluris pluris force-pushed the fix/argument_string_decoder branch from 13c02ac to 9ab677c Compare August 22, 2023 16:12
@VoltrexKeyva
Copy link
Member

Typo in commit message, decription to description.

@pluris pluris changed the title doc: modify param decription for end(),write() in StringDecoder doc: modify param description for end(),write() in StringDecoder Aug 23, 2023
@pluris
Copy link
Contributor Author

pluris commented Aug 23, 2023

@VoltrexKeyva Hi, Thank you. I fixed it.

@@ -63,8 +63,8 @@ Creates a new `StringDecoder` instance.
added: v0.9.3
-->

* `buffer` {Buffer|TypedArray|DataView} A `Buffer`, or `TypedArray`, or
`DataView` containing the bytes to decode.
* `buffer` {string|Buffer|TypedArray|DataView} A `string`, or `Buffer`, or
Copy link
Contributor

@mscdex mscdex Aug 23, 2023

Choose a reason for hiding this comment

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

Perhaps we can just shorten these descriptions down to simply:

The bytes to decode.

as duplicating the types is unnecessary

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a great comment! I also wanted to briefly explain the types.

@deokjinkim
Copy link
Contributor

@VoltrexKeyva Hi, Thank you. I fixed it.

@pluris First commit(not PR)'s typo(decription -> description) is not fixed yet. Could you fix typo after squashing 3 commits to 1?

@pluris pluris force-pushed the fix/argument_string_decoder branch from ab493a8 to 0eca1b7 Compare August 24, 2023 13:42
@pluris
Copy link
Contributor Author

pluris commented Aug 24, 2023

@deokjinkim Hi. I guess I misunderstood the comment. I'll edit the message as I change the commits to 1. 😓

@deokjinkim deokjinkim added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue Add this label to land a pull request using GitHub Actions. labels Aug 24, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 24, 2023
@nodejs-github-bot nodejs-github-bot merged commit a494ef6 into nodejs:main Aug 24, 2023
20 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in a494ef6

@pluris pluris deleted the fix/argument_string_decoder branch August 30, 2023 16:12
UlisesGascon pushed a commit that referenced this pull request Sep 10, 2023
PR-URL: #49285
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
@UlisesGascon UlisesGascon mentioned this pull request Sep 10, 2023
alexfernandez pushed a commit to alexfernandez/node that referenced this pull request Nov 1, 2023
PR-URL: nodejs#49285
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
targos pushed a commit that referenced this pull request Nov 27, 2023
PR-URL: #49285
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
sercher added a commit to sercher/graaljs that referenced this pull request Apr 25, 2024
PR-URL: nodejs/node#49285
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
sercher added a commit to sercher/graaljs that referenced this pull request Apr 25, 2024
PR-URL: nodejs/node#49285
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. doc Issues and PRs related to the documentations. string_decoder Issues and PRs related to the string_decoder subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants