nodejs / help

:sparkles: Need help with Node.js? File an Issue here. :rocket:
1.44k stars 276 forks source link

is setTimeout, setInterval, clearInterval like functions supposed to be overridden? #4339

Closed ganeshkbhat closed 3 weeks ago

ganeshkbhat commented 4 months ago

Version

v20.11.xx (any) probably

Platform

Microsoft Windows NT 10.0.22631.0 x64, any browser

Subsystem

No response

What steps will reproduce the bug?

check attached images for steps. I should not be able to redefine setTimeout, setInterval, clearInterval like functions or is it so?

able_to_redefine_setTimeout_unexpected_behaviour able_to_redefine_setTimeout_unexpected_behaviour_2

How often does it reproduce? Is there a required condition?

I should not be able to redefine setTimeout, setInterval, clearInterval like functions or is it so?

What is the expected behavior? Why is that the expected behavior?

I should not be able to redefine setTimeout, setInterval, clearInterval like functions or is it so?

What do you see instead?

I am able to redefine setTimeout, setInterval, clearInterval like functions or is it so?

Additional information

NA

targos commented 4 months ago

I'm not aware of any reason that would prevent this behavior.