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
I have implemented my draft. It's very simple and should also work for progress. You can find the lib here yaku, and test it yourself. Here's the example:
letPromise=require('yaku')// The `this` is the instance of the newly created promise.letp=newPromise((resolve,reject)=>{lettmr=setTimeout(resolve,3000)letthis.abort=()=>{clearTimeout(tmr)reject(newError('abort promise'))}})p.abort()
It's simple and flexible.
The text was updated successfully, but these errors were encountered:
ysmood
changed the title
Use the constructor to construct cancellation
Use the constructor to construct cancellate
Jul 27, 2015
ysmood
changed the title
Use the constructor to construct cancellate
Use the constructor to construct cancellation
Jul 27, 2015
I have implemented my draft. It's very simple and should also work for progress. You can find the lib here yaku, and test it yourself. Here's the example:
It's simple and flexible.
The text was updated successfully, but these errors were encountered: