Unverified Commit ca46c3b5 authored by Denys Otrishko's avatar Denys Otrishko Committed by James M Snell
Browse files

timers: allow timers to be used as primitives



This allows timers to be matched to numeric Ids and therefore used
as keys of an Object, passed and stored without storing the Timer instance.

clearTimeout/clearInterval is modified to support numeric/string Ids.

Co-authored-by: default avatarBradley Farias <bradley.meck@gmail.com>
Co-authored-by: default avatarAnatoli Papirovski <apapirovski@mac.com>

Refs: https://github.com/nodejs/node/pull/21152

PR-URL: https://github.com/nodejs/node/pull/34017


Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarBradley Farias <bradley.meck@gmail.com>
Reviewed-By: default avatarJeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarTrivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: default avatarYongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: default avatarBenjamin Gruenbaum <benjamingr@gmail.com>
parent 2ccf15b2
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment