abstract ThenableCallback<T, R>(T‑>Dynamic)
package thenshim
from T‑>Promise<R>, T‑>Thenable<R>, T‑>R
import thenshim.Thenable
Available on all platforms
Abstract that accepts callback functions to the then
method.
Valid callbacks are:
T->R
: Function that returns a value of typeR
.T->Thenable<R>
: Function that returns a thenableThenable
with value typeR
.T->Promise<R>
: Function that returns a promisePromise
with value typeR
.
On JS, this unifies to js.lib.Promise.PromiseHandler
.