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
For testing purposes, I often wait for a single event using socket.once(...) like in the code below. This code adds a lot of overhead and does not infer the type of the Promise somehow.
It seems to work, but I find the implementation ugly.
Does anyone have a better implementation?
What is the general opinion of a move promise based implementation?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
For testing purposes, I often wait for a single event using socket.once(...) like in the code below. This code adds a lot of overhead and does not infer the type of the Promise somehow.
Instead I would like an interface like this:
I implemented it this way:
It seems to work, but I find the implementation ugly.
Does anyone have a better implementation?
What is the general opinion of a move promise based implementation?
Similar to #4144
Beta Was this translation helpful? Give feedback.
All reactions