Promise.withResolvers() - resolve your promises from outside!
26 Jun 2024
Promises are awesome, but it was always a bit annoying how you had to roll your own solution if you wanted to resolve a promise from outside its callback. Meet Promise.withResolvers()
, which solves that problem.