mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
timers: named anonymous functions
PR-URL: https://github.com/nodejs/node/pull/20397 Refs: https://github.com/nodejs/node/issues/8913 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
This commit is contained in:
1 parent
b0ed31cf9c
commit
e552158dd2
1 file changed
+3
-3
+3
-3
@@ -453,7 +453,7 @@ function rearm(timer, start = TimerWrap.now()) {
|
||||
}
|
||||
|
||||
|
||||
const clearTimeout = exports.clearTimeout = function(timer) {
|
||||
const clearTimeout = exports.clearTimeout = function clearTimeout(timer) {
|
||||
if (timer && timer._onTimeout) {
|
||||
timer._onTimeout = null;
|
||||
if (timer instanceof Timeout) {
|
||||
@@ -465,7 +465,7 @@ const clearTimeout = exports.clearTimeout = function(timer) {
|
||||
};
|
||||
|
||||
|
||||
exports.setInterval = function(callback, repeat, arg1, arg2, arg3) {
|
||||
exports.setInterval = function setInterval(callback, repeat, arg1, arg2, arg3) {
|
||||
if (typeof callback !== 'function') {
|
||||
throw new ERR_INVALID_CALLBACK();
|
||||
}
|
||||
@@ -774,7 +774,7 @@ setImmediate[internalUtil.promisify.custom] = function(value) {
|
||||
exports.setImmediate = setImmediate;
|
||||
|
||||
|
||||
exports.clearImmediate = function(immediate) {
|
||||
exports.clearImmediate = function clearImmediate(immediate) {
|
||||
if (!immediate || immediate._destroyed)
|
||||
return;
|
||||
|
||||
|
||||
Reference in new issue
Block a user