Closed adam-rocska closed 1 year ago
Note, that this is a feature request I'm also more than happy to add if a core maintainer gives me the green light for a PR.
Hi @adam-rocska, you can also write
CancellablePromise.resolve([v * 2])
which should have nearly the same behavior as pseudoCancellable(Promise.resolve([v * 2]))
. Does that address your concern?
Sure, it should do the trick. This is just a convenience idea ¯_(ツ)_/¯
If it doesn't fit the lib', I'm cool with it.
Yeah, I'm hesitant to introduce new APIs when it can already be accomplished with an existing function. You can always define your own function if this is a common pattern in your codebase 😃
Feature Value
At the time of writing the aforementioned function's contract is distributed as follows:
For the world's most simplistic use cases (like writing tests) yields the following simplest usage:
It would be nice to extend the API by providing an overload which supports the following usage: