Rx.Observable.toAsync(func, [scheduler], [context])
Converts the function into an asynchronous function. Each invocation of the resulting asynchronous function causes an invocation of the original synchronous function on the specified scheduler.
Arguments
func
(Function
): Function to convert to an asynchronous function.[scheduler=Rx.Scheduler.timeout]
(Scheduler
): Scheduler to run the function on. If not specified, defaults to Scheduler.timeout.[context]
(Any
): The context for the func parameter to be executed. If not specified, defaults to undefined.
Returns
(Function
): Asynchronous function.