diff options
author | Jeremiah Senkpiel <fishrock123@rocketmail.com> | 2019-03-18 15:56:49 -0700 |
---|---|---|
committer | Jeremiah Senkpiel <fishrock123@rocketmail.com> | 2019-03-22 19:47:32 -0700 |
commit | 7c80f18c4136af3d819539d466d94e920587bcf4 (patch) | |
tree | 0a2c7f79c16164d998d3885156864ac1742a7bc7 /lib/timers.js | |
parent | afce91219359654b44df29e6ec1b730e2a73a919 (diff) | |
download | android-node-v8-7c80f18c4136af3d819539d466d94e920587bcf4.tar.gz android-node-v8-7c80f18c4136af3d819539d466d94e920587bcf4.tar.bz2 android-node-v8-7c80f18c4136af3d819539d466d94e920587bcf4.zip |
timers: deprecate active() and _unrefActive()
Another nail in the coffin here, farewell ye ol C-style apis.
These apis caused numerous other issues that required far too many
safeguards. This gets us one step closer to not having to worry about
those issues anymore.
Refs: https://github.com/nodejs/node/pull/18066
Refs: https://github.com/nodejs/node/pull/20298
PR-URL: https://github.com/nodejs/node/pull/26760
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Diffstat (limited to 'lib/timers.js')
-rw-r--r-- | lib/timers.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/timers.js b/lib/timers.js index 1ed88f2823..dff7eb4994 100644 --- a/lib/timers.js +++ b/lib/timers.js @@ -304,14 +304,21 @@ function clearImmediate(immediate) { } module.exports = { - _unrefActive: unrefActive, - active, setTimeout, clearTimeout, setImmediate, clearImmediate, setInterval, clearInterval, + _unrefActive: deprecate( + unrefActive, + 'timers._unrefActive() is deprecated.' + + ' Please use timeout.refresh() instead.', + 'DEP0127'), + active: deprecate( + active, + 'timers.active() is deprecated. Please use timeout.refresh() instead.', + 'DEP0126'), unenroll: deprecate( unenroll, 'timers.unenroll() is deprecated. Please use clearTimeout instead.', |