You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Objects returned by setTimeout and setInterval support being converted to a raw number, for better compatibility with the web I guess, but setImmediate doesn't support the same, which seems an ugly luck a symmetry.
Basically this is a thing for timeouts:
constid=+setTimeout(()=>{});clearTimeout(id);
It is a thing for intervals:
constid=+setInterval(()=>{});clearInterval(id);
But it's not a thing for "immediates" (?):
constid=+setImmediate(()=>{});clearImmediate(id);
What is the feature you are proposing to solve the problem?
Presumably there should be a counter dedicated to immediate callbacks?
What alternatives have you considered?
Implementing this in userland I guess?
The text was updated successfully, but these errors were encountered:
@aduh95 my use case is providing setImmediate/clearImmediate functions that work in the browser too, with the same interface, and I don't think I should be returning a "NodeJS.Immediate" object thing in a browser environment. It's easy enough to make up a number in userland though, so the main point about this issue is actually about the ugliness required to do that, imo.
What is the problem this feature will solve?
Objects returned by
setTimeout
andsetInterval
support being converted to a raw number, for better compatibility with the web I guess, butsetImmediate
doesn't support the same, which seems an ugly luck a symmetry.Basically this is a thing for timeouts:
It is a thing for intervals:
But it's not a thing for "immediates" (?):
What is the feature you are proposing to solve the problem?
Presumably there should be a counter dedicated to immediate callbacks?
What alternatives have you considered?
Implementing this in userland I guess?
The text was updated successfully, but these errors were encountered: