/// /// /// declare module Rx { interface Observer { /** * Creates a notification callback from an observer. * @returns The action that forwards its input notification to the underlying observer. */ toNotifier(): (notification: Notification) => void; /** * Hides the identity of an observer. * @returns An observer that hides the identity of the specified observer. */ asObserver(): Observer; /** * Checks access to the observer for grammar violations. This includes checking for multiple OnError or OnCompleted calls, as well as reentrancy in any of the observer methods. * If a violation is detected, an Error is thrown from the offending observer method call. * @returns An observer that checks callbacks invocations against the observer grammar and, if the checks pass, forwards those to the specified observer. */ checked(): CheckedObserver; /** * Schedules the invocation of observer methods on the given scheduler. * @param {Scheduler} scheduler Scheduler to schedule observer messages on. * @returns {Observer} Observer whose messages are scheduled on the given scheduler. */ notifyOn(scheduler: IScheduler): Observer; } interface ObserverStatic { /** * Creates an observer from a notification callback. * * @static * @memberOf Observer * @param {Function} handler Action that handles a notification. * @returns The observer object that invokes the specified handler using a notification corresponding to each message it receives. */ fromNotifier(handler: (notification: Notification, thisArg?: any) => void): Observer; } }