Apologies if this is a duplicate: I'm new to mailing lists and got a little
bit muddled.
## legacy use case
I am maintaining an existing API that includes asynchronous functions (mix
of callbacks and Promises) and synchronous functions. After some
asynchronous initialisation, the internal state
Why not just use a subclass of Promise? I don't see why that has to be
part of the base class.
```
class ObservablePromise extends Promise {}
ObservablePromise.prototype.isSettled = function() { return
!!this.isSettled; };
ObservablePromise.prototype.then = function(res, rej) {
return
I will repeat to you what I said on Specifiction:
To get a standard API for this, you'll need to convince the JavaScript
standard committee, as well as the browser vendors, that your use case is
widespread and important enough to be worth the standardization and
implementation burden, and
## legacy use case
I am maintaining an existing API that includes asynchronous functions (mix
of callbacks and Promises) and synchronous functions. After some
asynchronous initialisation, the internal state settles and it is perfectly
safe to use the synchronous functions as expected.
So, I'd
4 matches
Mail list logo