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
promise(){// sorry for identationreturnnewPromise((resolve,reject)=>{this.done((...args)=>{resolve(...args)});this.error((...args)=>{reject(...args);});this.catch((...args)=>{reject(...args);});});}
About rejection, I'm not sure what it means to reject multiple values, since reject is comparable to throw (and resolve compares to return)
2:
Is it possible that .error and .catch will emit together? potentially reject/resolve the same promise multiple times
Maybe before resolve or reject remove the listeners? or flag for if(!settled){ ... }
The text was updated successfully, but these errors were encountered:
JarvisEmitter.promise
This have 2 issues:
1:
Maybe, same as bluebird, explicit say that promise can resolve more than a single argument:
About rejection, I'm not sure what it means to reject multiple values, since reject is comparable to
throw
(and resolve compares toreturn
)2:
Is it possible that
.error
and.catch
will emit together? potentially reject/resolve the same promise multiple timesMaybe before
resolve
orreject
remove the listeners? or flag forif(!settled){ ... }
The text was updated successfully, but these errors were encountered: