-
-
Notifications
You must be signed in to change notification settings - Fork 37.3k
Support return value on EventEmitter.once #25817
Copy link
Copy link
Closed
Labels
eventsIssues and PRs related to EventEmitter and the events module.Issues and PRs related to EventEmitter and the events module.feature requestIssues requesting new Node.js features.Issues requesting new Node.js features.
Description
Activity
Metadata
Metadata
Assignees
Labels
eventsIssues and PRs related to EventEmitter and the events module.Issues and PRs related to EventEmitter and the events module.feature requestIssues requesting new Node.js features.Issues requesting new Node.js features.
Is your feature request related to a problem? Please describe.
I'm trying to code a Promise method which will be called after
onceandonhave been called.and It will resolve the params that are returned from
onceandonfunctions.I use it on server, the project code like this
but
oncejust returns anullbecause it only just be called and return nothing.node/lib/events.js
Lines 281 to 287 in 5e1d446
Describe the solution you'd like
All in all, I think it should do the same behavior whatever
onoronce