What is Nostr?
Flaki /
npub1eqq…awx7
2024-06-27 08:58:45

Flaki on Nostr: Oh, `Promise.withResolvers()` looks extremely handy! From the spec: > The most common ...

Oh, `Promise.withResolvers()` looks extremely handy!

From the spec:
> The most common way of creating and resolving a Promise is via the Promise constructor. One limitation of creating Promises like that is that the settlement functions resolve and reject are meant to only be used inside the callback. Sometimes we want to use them outside of it, that’s when the [Promise.withResolvers()] static factory method is useful

https://2ality.com/2024/06/ecmascript-2024.html
Author Public Key
npub1eqqzqn9zcdu54a2ppx3kkf8t4kgnc58mw7unkmqafxvsq2d07nysj8awx7