Server IP : 185.86.78.101 / Your IP : 216.73.216.124 Web Server : Apache System : Linux 675867-vds-valikoshka1996.gmhost.pp.ua 5.4.0-150-generic #167-Ubuntu SMP Mon May 15 17:35:05 UTC 2023 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /www/wwwroot/mifepriston.org/node_modules/rx/ts/core/ |
Upload File : |
/// <reference path="./disposables/disposable.ts" /> /// <reference path="./checkedobserver.ts" /> /// <reference path="./notification.ts" /> module Rx { export interface Observer<T> { /** * Creates a notification callback from an observer. * @returns The action that forwards its input notification to the underlying observer. */ toNotifier(): (notification: Notification<T>) => void; /** * Hides the identity of an observer. * @returns An observer that hides the identity of the specified observer. */ asObserver(): Observer<T>; /** * 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<T>; /** * 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<T>; } export 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<T>(handler: (notification: Notification<T>, thisArg?: any) => void): Observer<T>; } } (function() { var observer: Rx.Observer<boolean>; var n: (notification: Rx.Notification<boolean>) => void = observer.toNotifier(); var o: Rx.Observer<boolean> = observer.asObserver(); var c: Rx.CheckedObserver<boolean> = observer.checked(); o = observer.notifyOn(Rx.Scheduler.immediate); var so : Rx.Observer<number> = Rx.Observer.fromNotifier<number>((n) => { // Handle next calls if (n.kind === 'N') { console.log('Next: ' + n.value); } // Handle error calls if (n.kind === 'E') { console.log('Error: ' + n.exception); } // Handle completed if (n.kind === 'C') { console.log('Completed') } }); });