@postpostscript I guess you are using this inside your private vals but the good news is that you don't need to roll your own implementation! It became a standard thing: Promise.withResolvers().
Checkout out an example: https://www.val.town/v/vladimyr/promiseWithResolvers_example
@vladimyr ahh I was sure I saw something like this somewhere, thanks!
Honestly, I'm amazed how quickly it went through all TC39 proposal stages. The whole thing started last February: https://github.com/tc39/proposal-promise-with-resolvers/commit/c89fa6b 😮
@postpostscript I guess you are using this inside your private vals but the good news is that you don't need to roll your own implementation! It became a standard thing: Promise.withResolvers().
Checkout out an example: https://www.val.town/v/vladimyr/promiseWithResolvers_example
@vladimyr ahh I was sure I saw something like this somewhere, thanks!
Honestly, I'm amazed how quickly it went through all TC39 proposal stages. The whole thing started last February: https://github.com/tc39/proposal-promise-with-resolvers/commit/c89fa6b 😮