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/rxjs/observable/ |
Upload File : |
import { Observable, SubscribableOrPromise } from '../Observable'; import { Subscriber } from '../Subscriber'; import { Subscription } from '../Subscription'; /** * We need this JSDoc comment for affecting ESDoc. * @extends {Ignored} * @hide true */ export declare class DeferObservable<T> extends Observable<T> { private observableFactory; /** * Creates an Observable that, on subscribe, calls an Observable factory to * make an Observable for each new Observer. * * <span class="informal">Creates the Observable lazily, that is, only when it * is subscribed. * </span> * * <img src="./img/defer.png" width="100%"> * * `defer` allows you to create the Observable only when the Observer * subscribes, and create a fresh Observable for each Observer. It waits until * an Observer subscribes to it, and then it generates an Observable, * typically with an Observable factory function. It does this afresh for each * subscriber, so although each subscriber may think it is subscribing to the * same Observable, in fact each subscriber gets its own individual * Observable. * * @example <caption>Subscribe to either an Observable of clicks or an Observable of interval, at random</caption> * var clicksOrInterval = Rx.Observable.defer(function () { * if (Math.random() > 0.5) { * return Rx.Observable.fromEvent(document, 'click'); * } else { * return Rx.Observable.interval(1000); * } * }); * clicksOrInterval.subscribe(x => console.log(x)); * * // Results in the following behavior: * // If the result of Math.random() is greater than 0.5 it will listen * // for clicks anywhere on the "document"; when document is clicked it * // will log a MouseEvent object to the console. If the result is less * // than 0.5 it will emit ascending numbers, one every second(1000ms). * * @see {@link create} * * @param {function(): SubscribableOrPromise} observableFactory The Observable * factory function to invoke for each Observer that subscribes to the output * Observable. May also return a Promise, which will be converted on the fly * to an Observable. * @return {Observable} An Observable whose Observers' subscriptions trigger * an invocation of the given Observable factory function. * @static true * @name defer * @owner Observable */ static create<T>(observableFactory: () => SubscribableOrPromise<T> | void): Observable<T>; constructor(observableFactory: () => SubscribableOrPromise<T> | void); /** @deprecated internal use only */ _subscribe(subscriber: Subscriber<T>): Subscription; }