Bakhtina Sofya b84cb877be 1st comm | há 2 meses atrás | |
---|---|---|
.. | ||
LICENSE | há 2 meses atrás | |
README.md | há 2 meses atrás | |
index.d.ts | há 2 meses atrás | |
index.js | há 2 meses atrás | |
index.js.map | há 2 meses atrás | |
index.ts | há 2 meses atrás | |
package.json | há 2 meses atrás |
This is a tiny promise wrapper which gives you promises which have explicit promise.resolve()
/ promise.reject()
methods.
Eg:
const resolvable = require('resolvable')
const myPromise = resolvable()
;(async () => {
doThingA()
await myPromise
doThingB()
})()
setTimeout(() => myPromise.resolve(), 1000)