You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On certain scenarios, like for instance when adding support for Streams API (more specifically to ReadableStreamReaderGenericInitialize), a mechanism to mark a Promise as handled is required, as per spec's requirements:
(from the link above)
...
// 2. Set reader.[[closedPromise]] to a promise rejected with stream.[[storedError]].
// 3. Set reader.[[closedPromise]].[[PromiseIsHandled]] to true.
That method I guess would not only set Promise.handled to true, but also do any other operation related with the handling of the Promise.
On certain scenarios, like for instance when adding support for Streams API (more specifically to
ReadableStreamReaderGenericInitialize
), a mechanism to mark a Promise as handled is required, as per spec's requirements:(from the link above)
That method I guess would not only set
Promise.handled
totrue
, but also do any other operation related with the handling of the Promise.In Deno, for instance, there's a
setPromiseIsHandledToTrue
function, used specifically for that.Alternatively, would be nice to have a more generic set of handlers for Promises management, which would also be handful for this specific use case.
Thanks!
The text was updated successfully, but these errors were encountered: