doAfter<TIn, TOut>(f: ((v: TIn) => TOut | Promise<TOut>)): ((x: TIn | Promise<TIn>) => TOut | Promise<TOut>)
doAfter() will create another function that expects a singoe argument which could either be
a simple value or a promise, and doAfter will make sure that the given function is executed
synchronously if it's a simple value, or asynchronously after the promise resolves.
Like thenable, but trying to avoid the creation of all the intermediate objects.
With our pipe function, it should be easy to use.
doAfter() will create another function that expects a singoe argument which could either be a simple value or a promise, and doAfter will make sure that the given function is executed synchronously if it's a simple value, or asynchronously after the promise resolves.
Like thenable, but trying to avoid the creation of all the intermediate objects. With our pipe function, it should be easy to use.
Example