Rx.Notification.prototype.accept([observer] | [onNext], [onError], [onCompleted])
Invokes the delegate corresponding to the notification or the observer's method corresponding to the notification and returns the produced result.
Arguments
[observer]
(Observer): Observer to invoke the notification on.[onNext]
(Function): Function to invoke for an OnNext notification.[onError]
(Function): Function to invoke for an OnError notification.[onError]
(Function): Function to invoke for an OnCompleted notification.
Returns
(Any): Result produced by the observation.
Example
Using an observer
Using a function
Location
- rx.js