| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Added appropriate in-document links. Clarified a bit of `setImmediate`, including a quick grammar fix (plural possessive apostrophe).
| To schedule the "immediate" execution of `callback` after I/O events' | ||
| callbacks and before timers set by [`setTimeout`][] and [`setInterval`][] are | ||
| triggered. Returns an `immediateObject` for possible use with | ||
| [`clearImmediate`][]. Optionally you can also pass arguments to the callback. |
There was a problem hiding this comment.
Instead of using you here... perhaps: Additional optional arguments may be passed to the callback. or something similar.
Sorry, something went wrong.
There was a problem hiding this comment.
I'd prefer to eliminate the use of the you pronoun in general (I see it's used several places in this doc)
Sorry, something went wrong.
There was a problem hiding this comment.
Sure! That was in there previously, but now's as good a time as any to fix that.
Sorry, something went wrong.
|
LGTM with a nit |
Sorry, something went wrong.
| ## clearInterval(intervalObject) | ||
|
|
||
| Stops an interval from triggering. | ||
| Stops an `intervalObject`, as created by [`setInterval`][], from triggering. |
There was a problem hiding this comment.
This will also technically clear a regular timeout, I forget if the opposite is true, but the difference is really Immediates vs Timeouts, intervals are just a timeout with an extra property.
Sorry, something went wrong.
There was a problem hiding this comment.
Ok, just confirmed, clearTimeout() does also work on intervals.
Sorry, something went wrong.
There was a problem hiding this comment.
Is that worth documenting? I don't think I want to encourage folks to clear a timeout with clearInterval or vice-versa.
Sorry, something went wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
@bengl I would refer to them by the names above, maybe call interval a "repeating Timeout", or "Interval (Timeout)"?
Sorry, something went wrong.
There was a problem hiding this comment.
Hmmm, turns out Immediates actually have a constructor name and Timeouts do not, call timeouts and intervals whatever you want I guess, Immediate should probably be Immediate, though.
Sorry, something went wrong.
|
@bengl ... LGTM! Thank you for updating that. |
Sorry, something went wrong.
|
LGTM |
Sorry, something went wrong.
Added appropriate in-document links. Clarified a bit of `setImmediate`, including a quick grammar fix (plural possessive apostrophe). PR-URL: #5792 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Refs: nodejs#5792 PR-URL: nodejs#5793 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
|
@bengl is this related to the timer changes recently made by @Fishrock123 ? |
Sorry, something went wrong.
|
@thealphanerd I think so, in that it seems @Fishrock123 was inspired by this PR to give Timeouts a proper constructor name so as to make them more documentable, etc. |
Sorry, something went wrong.
Added appropriate in-document links. Clarified a bit of `setImmediate`, including a quick grammar fix (plural possessive apostrophe). PR-URL: #5792 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
|
@bengl to be clear, these changes are all applicable to lts right? |
Sorry, something went wrong.
Added appropriate in-document links. Clarified a bit of `setImmediate`, including a quick grammar fix (plural possessive apostrophe). PR-URL: #5792 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Added appropriate in-document links. Clarified a bit of `setImmediate`, including a quick grammar fix (plural possessive apostrophe). PR-URL: #5792 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
The timers returned by `setTimeout` and friends are actually instances of `Timeout` and `Immediate`. Documenting them as such, so that the `ref` and `unref` methods can be identified as methods on `Timeout` objects. Sparked by discussion in nodejs#5792
The timers returned by `setTimeout` and friends are actually instances of `Timeout` and `Immediate`. Documenting them as such, so that the `ref` and `unref` methods can be identified as methods on `Timeout` objects. Sparked by discussion in nodejs#5792
Overall improvements to timers.md documentation, Includes squashed commit from @bengl: doc: add timer classes The timers returned by `setTimeout` and friends are actually instances of `Timeout` and `Immediate`. Documenting them as such, so that the `ref` and `unref` methods can be identified as methods on `Timeout` objects. Sparked by discussion in nodejs#5792
Overall improvements to timers.md documentation, Includes squashed commit from @bengl: doc: add timer classes The timers returned by `setTimeout` and friends are actually instances of `Timeout` and `Immediate`. Documenting them as such, so that the `ref` and `unref` methods can be identified as methods on `Timeout` objects. Sparked by discussion in #5792 PR-URL: #6937 Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com> Reviewed-By: Bryan English <bryan@bryanenglish.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Overall improvements to timers.md documentation, Includes squashed commit from @bengl: doc: add timer classes The timers returned by `setTimeout` and friends are actually instances of `Timeout` and `Immediate`. Documenting them as such, so that the `ref` and `unref` methods can be identified as methods on `Timeout` objects. Sparked by discussion in #5792 PR-URL: #6937 Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com> Reviewed-By: Bryan English <bryan@bryanenglish.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
| Back | FazBrowse Home | New Git URL |
Pull Request check-list
this change (including linting)?
test (or a benchmark) included?
existing APIs, or introduces new ones)?
Affected core subsystem(s)
doc
Description of change
In timers.markdown, dded appropriate in-document links. Clarified a bit of setImmediate, including a quick grammar fix (plural possessive apostrophe).