-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
docs: improve promise terminology #37181
Conversation
@aduh95 thanks, (I thought author-ready implies CI started though?) |
For doc-only changes, GH Actions are enough to land. node/doc/guides/collaborator-guide.md Line 217 in 9cf2341
|
Good to know, thanks 🙏 |
Apparently this is also fine to
So 👍 to fast track if you think this is fine to fast-track :] |
nit: |
@RaisinTen I don't mind making a follow up PR auditing the documentation further - I think certain ways we phrase things isn't really super helpful: For example stuff like #### `filehandle.chown(uid, gid)`
<!-- YAML
added: v10.0.0
-->
* `uid` {integer}
* `gid` {integer}
* Returns: {Promise}
Changes the ownership of the file then fulfills the `Promise` with no arguments
upon success.
Probably should be: #### `filehandle.chown(uid, gid)`
<!-- YAML
added: v10.0.0
-->
* `uid` {integer} The file's new owner's user id.
* `gid` {integer} The file's new group's group id.
* Returns: {Promise} Fulfills with `undefined` when the operation has completed.
Changes the ownership of the given file. A wrapper for chown(2). |
If I make such a PR would you be up for reviewing? |
Landed in 271e04f |
PR-URL: #37181 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Zijian Liu <lxxyxzj@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
@benjamingr that looks much better. Sure, I will. :) |
PR-URL: #37181 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Zijian Liu <lxxyxzj@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
PR-URL: #37181 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Zijian Liu <lxxyxzj@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
This is kind of a nit but:
A promise is:
const p = Promise.resolve(timersPromises.setTimeout(1000));
- herep
is a resolved promise. The promise constructor calls its executor argument functionresolve
for this case since it performs resolution and you can pass it a promise and it'll track it.p
for the example above has not fulfilled (immediately).