@flaki Nice :)
Conversation
Notices
-
Aral Balkan (aral@mastodon.ar.al)'s status on Thursday, 27-Jun-2024 18:03:02 JST Aral Balkan -
Flaki (flaki@flaki.social)'s status on Thursday, 27-Jun-2024 18:03:08 JST Flaki 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
-