Optional
valueProvider: T | Observable<T> | ((v?) => T)Optional
observer: Partial<TapObserver<T>>An await
-able Observable of the object, thunk return value, or Observable's notification(s).
delayArg
Either a number of milliseconds, a Promise, setTimeout
, or requestAnimationFrame
valueProvider
Can be a value, a function returning a value, or an Observable.
observer
A TapObserver
that can handle subscription or value events.
https://www.youtube.com/watch?v=Bvsb9Qy1V9g for how after
can be thought of as a 2-dimensional value, a
composable vector in the 2-D space of time and values.
after(0, value) # sync value
after(N, value) # delayed value
after(N, ()=>value)) # delayed call
after(N, Observable)) # delayed Obs.
after(Promise, ()=>value)) # chained Promise
after(N, value, {next}) # with Observer
after(setTimeout, v) # setTimeout(0)
after(rAF, v) # ani. frame
after
is a more readable version ofsetTimeout
, implemented as anawait
-able Observable.after
is lazy, and cancelable like an Observable, andthen
-able andawait
-able like a Promise.after
is single-valued if a primitive or thunk is its 2nd argument, multivalued if an Observable. For a delay of 0, the value is given synchronously when.subscribe()
is called.