node:timers should also export promises as field like node:fs does #51237
Labels
feature request
Issues that request new features to be added to Node.js.
timers
Issues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout.
What is the problem this feature will solve?
Following example:
returns:
It should return 4x true. Its not a big deal, but a little cumbersome in case some code wants the promised and unpromised version.
What is the feature you are proposing to solve the problem?
also export promises into the field imported by 'node:timers'.
What alternatives have you considered?
The workaround is easy just
import timersPromises from 'node:timers/promises';
but it's inconsistent to node:fs
The text was updated successfully, but these errors were encountered: