-
-
Notifications
You must be signed in to change notification settings - Fork 33.6k
Closed
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.timersIssues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout.Issues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout.
Description
What is the problem this feature will solve?
Following example:
import fs from 'node:fs';
import fsPromises from 'node:fs/promises';
import timers from 'node:timers';
import timersPromises from 'node:timers/promises';
console.log( !!fs.promises );
console.log( !!fsPromises );
console.log( !!timers.promises );
console.log( !!timersPromises );returns:
true
true
false
true
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
meyfa
Metadata
Metadata
Assignees
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.timersIssues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout.Issues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout.