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: promisify of method without last argument #17573

Closed
wants to merge 1 commit into from
Closed

doc: promisify of method without last argument #17573

wants to merge 1 commit into from

Conversation

mithunsasidharan
Copy link
Contributor

@mithunsasidharan mithunsasidharan commented Dec 9, 2017

Updated the documentation for util#promisfy behaviour as fix to #17569

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

doc

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. util Issues and PRs related to the built-in util module. labels Dec 9, 2017
doc/api/util.md Outdated
behavior if it does not.
final argument in all cases unless a non function is passed or the passed
function's `promisify.custom` is a non function in which case it throws.
if the passed function's last argument is not a node style callback - it will
Copy link
Member

Choose a reason for hiding this comment

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

The if should be upper cased.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@BridgeAR : thanks. I've fixed that. Kindly review now!

@@ -552,8 +552,11 @@ If there is an `original[util.promisify.custom]` property present, `promisify`
will return its value, see [Custom promisified functions][].

`promisify()` assumes that `original` is a function taking a callback as its
final argument in all cases, and the returned function will result in undefined
behavior if it does not.
final argument in all cases unless a non function is passed or the passed
Copy link
Member

Choose a reason for hiding this comment

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

a non function -> not a function

final argument in all cases, and the returned function will result in undefined
behavior if it does not.
final argument in all cases unless a non function is passed or the passed
function's `promisify.custom` is a non function in which case it throws.
Copy link
Member

Choose a reason for hiding this comment

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

a non function -> not a function

behavior if it does not.
final argument in all cases unless a non function is passed or the passed
function's `promisify.custom` is a non function in which case it throws.
If the passed function's last argument is not a node style callback - it will
Copy link
Member

Choose a reason for hiding this comment

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

node style -> error-first

Copy link
Member

Choose a reason for hiding this comment

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

- -> , then

final argument in all cases unless a non function is passed or the passed
function's `promisify.custom` is a non function in which case it throws.
If the passed function's last argument is not a node style callback - it will
treat it 'as if' its last argument is a node style callback - and will pass one
Copy link
Member

Choose a reason for hiding this comment

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

'as if' -> as if

Copy link
Member

Choose a reason for hiding this comment

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

node style -> error-first

Copy link
Member

Choose a reason for hiding this comment

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

Delete -

@apapirovski
Copy link
Member

To me this whole new block feels really awkwardly worded. @Trott's suggestions will help but to me the whole sentence structure and flow is just really off. I'll think on how to re-word.

@mithunsasidharan
Copy link
Contributor Author

@apapirovski @Trott : Closing this as I'll have someone else pick this up who would want to work on good first issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. util Issues and PRs related to the built-in util module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants