rxjs

  • Version 7.4.0
  • Published
  • 4.45 MB
  • 1 dependency
  • Apache-2.0 license

Install

npm i rxjs
yarn add rxjs
pnpm add rxjs

Overview

Reactive Extensions for modern JavaScript

Index

Variables

Functions

Classes

Interfaces

Enums

Type Aliases

Variables

variable animationFrame

const animationFrame: AnimationFrameScheduler;

variable animationFrameScheduler

const animationFrameScheduler: AnimationFrameScheduler;
  • Animation Frame Scheduler

    Perform task when window.requestAnimationFrame would fire

    When animationFrame scheduler is used with delay, it will fall back to asyncScheduler scheduler behaviour.

    Without delay, animationFrame scheduler can be used to create smooth browser animations. It makes sure scheduled task will happen just before next browser content repaint, thus performing animations as efficiently as possible.

    ## Example Schedule div height animation

    // html: <div style="background: #0ff;"></div>
    import { animationFrameScheduler } from 'rxjs';
    const div = document.querySelector('div');
    animationFrameScheduler.schedule(function(height) {
    div.style.height = height + "px";
    this.schedule(height + 1); // `this` references currently executing Action,
    // which we reschedule with new state
    }, 0, 0);
    // You will see a div element growing in height

variable ArgumentOutOfRangeError

const ArgumentOutOfRangeError: ArgumentOutOfRangeErrorCtor;
  • An error thrown when an element was queried at a certain index of an Observable, but no such index or position exists in that sequence.

    See Also

variable asap

const asap: AsapScheduler;

variable asapScheduler

const asapScheduler: AsapScheduler;
  • Asap Scheduler

    Perform task as fast as it can be performed asynchronously

    asap scheduler behaves the same as asyncScheduler scheduler when you use it to delay task in time. If however you set delay to 0, asap will wait for current synchronously executing code to end and then it will try to execute given task as fast as possible.

    asap scheduler will do its best to minimize time between end of currently executing code and start of scheduled task. This makes it best candidate for performing so called "deferring". Traditionally this was achieved by calling setTimeout(deferredTask, 0), but that technique involves some (although minimal) unwanted delay.

    Note that using asap scheduler does not necessarily mean that your task will be first to process after currently executing code. In particular, if some task was also scheduled with asap before, that task will execute first. That being said, if you need to schedule task asynchronously, but as soon as possible, asap scheduler is your best bet.

    ## Example Compare async and asap scheduler<

    import { asapScheduler, asyncScheduler } from 'rxjs';
    asyncScheduler.schedule(() => console.log('async')); // scheduling 'async' first...
    asapScheduler.schedule(() => console.log('asap'));
    // Logs:
    // "asap"
    // "async"
    // ... but 'asap' goes first!

variable async

const async: AsyncScheduler;

variable asyncScheduler

const asyncScheduler: AsyncScheduler;
  • Async Scheduler

    Schedule task as if you used setTimeout(task, duration)

    async scheduler schedules tasks asynchronously, by putting them on the JavaScript event loop queue. It is best used to delay tasks in time or to schedule tasks repeating in intervals.

    If you just want to "defer" task, that is to perform it right after currently executing synchronous code ends (commonly achieved by setTimeout(deferredTask, 0)), better choice will be the asapScheduler scheduler.

    ## Examples Use async scheduler to delay task

    import { asyncScheduler } from 'rxjs';
    const task = () => console.log('it works!');
    asyncScheduler.schedule(task, 2000);
    // After 2 seconds logs:
    // "it works!"

    Use async scheduler to repeat task in intervals

    import { asyncScheduler } from 'rxjs';
    function task(state) {
    console.log(state);
    this.schedule(state + 1, 1000); // `this` references currently executing Action,
    // which we reschedule with new state and delay
    }
    asyncScheduler.schedule(task, 3000, 0);
    // Logs:
    // 0 after 3s
    // 1 after 4s
    // 2 after 5s
    // 3 after 6s

variable combineAll

const combineAll: {
<T>(): OperatorFunction<ObservableInput<T>, T[]>;
<T>(): OperatorFunction<any, T[]>;
<T, R>(project: (...values: T[]) => R): OperatorFunction<ObservableInput<T>, R>;
<R>(project: (...values: any[]) => R): OperatorFunction<any, R>;
};

variable config

const config: GlobalConfig;
  • The GlobalConfig object for RxJS. It is used to configure things like how to react on unhandled errors.

variable EMPTY

const EMPTY: Observable<never>;
  • The same Observable instance returned by any call to empty without a scheduler. It is preferable to use this over empty().

    Just emits 'complete', and nothing else.

    ![](empty.png)

    ## Examples

    ### Log complete notification

    import { EMPTY } from 'rxjs';
    EMPTY.subscribe({
    next: () => console.log('Next'),
    complete: () => console.log('Complete!')
    });
    // Outputs
    // Complete!

variable EmptyError

const EmptyError: EmptyErrorCtor;

variable exhaust

const exhaust: <O extends ObservableInput<any>>() => OperatorFunction<
O,
ObservedValueOf<O>
>;
  • Deprecated

    Renamed to exhaustAll. Will be removed in v8.

variable flatMap

const flatMap: {
<T, O extends ObservableInput<any>>(
project: (value: T, index: number) => O,
concurrent?: number
): OperatorFunction<T, ObservedValueOf<O>>;
<T, O extends ObservableInput<any>>(
project: (value: T, index: number) => O,
resultSelector: undefined,
concurrent?: number
): OperatorFunction<T, ObservedValueOf<O>>;
<T, R, O extends ObservableInput<any>>(
project: (value: T, index: number) => O,
resultSelector: (
outerValue: T,
innerValue: ObservedValueOf<O>,
outerIndex: number,
innerIndex: number
) => R,
concurrent?: number
): OperatorFunction<T, R>;
};
  • Deprecated

    Renamed to mergeMap. Will be removed in v8.

variable NEVER

const NEVER: Observable<never>;
  • An Observable that emits no items to the Observer and never completes.

    ![](never.png)

    A simple Observable that emits neither values nor errors nor the completion notification. It can be used for testing purposes or for composing with other Observables. Please note that by never emitting a complete notification, this Observable keeps the subscription from being disposed automatically. Subscriptions need to be manually disposed.

    ## Example ### Emit the number 7, then never emit anything else (not even complete)

    import { NEVER } from 'rxjs';
    import { startWith } from 'rxjs/operators';
    function info() {
    console.log('Will not be called');
    }
    const result = NEVER.pipe(startWith(7));
    result.subscribe(x => console.log(x), info, info);

    See Also

variable NotFoundError

const NotFoundError: NotFoundErrorCtor;
  • An error thrown when a value or values are missing from an observable sequence.

    See Also

    • NotFoundError

variable ObjectUnsubscribedError

const ObjectUnsubscribedError: ObjectUnsubscribedErrorCtor;
  • An error thrown when an action is invalid because the object has been unsubscribed.

    See Also

variable observable

const observable: string | symbol;
  • Symbol.observable or a string "@@observable". Used for interop

variable queue

const queue: QueueScheduler;

variable queueScheduler

const queueScheduler: QueueScheduler;
  • Queue Scheduler

    Put every next task on a queue, instead of executing it immediately

    queue scheduler, when used with delay, behaves the same as asyncScheduler scheduler.

    When used without delay, it schedules given task synchronously - executes it right when it is scheduled. However when called recursively, that is when inside the scheduled task, another task is scheduled with queue scheduler, instead of executing immediately as well, that task will be put on a queue and wait for current one to finish.

    This means that when you execute task with queue scheduler, you are sure it will end before any other task scheduled with that scheduler will start.

    ## Examples Schedule recursively first, then do something

    import { queueScheduler } from 'rxjs';
    queueScheduler.schedule(() => {
    queueScheduler.schedule(() => console.log('second')); // will not happen now, but will be put on a queue
    console.log('first');
    });
    // Logs:
    // "first"
    // "second"

    Reschedule itself recursively

    import { queueScheduler } from 'rxjs';
    queueScheduler.schedule(function(state) {
    if (state !== 0) {
    console.log('before', state);
    this.schedule(state - 1); // `this` references currently executing Action,
    // which we reschedule with new state
    console.log('after', state);
    }
    }, 0, 3);
    // In scheduler that runs recursively, you would expect:
    // "before", 3
    // "before", 2
    // "before", 1
    // "after", 1
    // "after", 2
    // "after", 3
    // But with queue it logs:
    // "before", 3
    // "after", 3
    // "before", 2
    // "after", 2
    // "before", 1
    // "after", 1

variable SequenceError

const SequenceError: SequenceErrorCtor;
  • An error thrown when something is wrong with the sequence of values arriving on the observable.

    See Also

    • SequenceError

variable TimeoutError

const TimeoutError: TimeoutErrorCtor;
  • An error thrown by the operator.

    Provided so users can use as a type and do quality comparisons. We recommend you do not subclass this or create instances of this class directly. If you have need of a error representing a timeout, you should create your own error class and use that.

    See Also

    • TimeoutError

variable UnsubscriptionError

const UnsubscriptionError: UnsubscriptionErrorCtor;
  • An error thrown when one or more errors have occurred during the unsubscribe of a Subscription.

Functions

function animationFrames

animationFrames: (
timestampProvider?: TimestampProvider
) => Observable<{ timestamp: number; elapsed: number }>;
  • An observable of animation frames

    Emits the the amount of time elapsed since subscription and the timestamp on each animation frame. Defaults to milliseconds provided to the requestAnimationFrame's callback. Does not end on its own.

    Every subscription will start a separate animation loop. Since animation frames are always scheduled by the browser to occur directly before a repaint, scheduling more than one animation frame synchronously should not be much different or have more overhead than looping over an array of events during a single animation frame. However, if for some reason the developer would like to ensure the execution of animation-related handlers are all executed during the same task by the engine, the share operator can be used.

    This is useful for setting up animations with RxJS.

    ### Example

    Tweening a div to move it on the screen

    import { animationFrames } from 'rxjs';
    import { map, takeWhile, endWith } from 'rxjs/operators';
    function tween(start: number, end: number, duration: number) {
    const diff = end - start;
    return animationFrames().pipe(
    // Figure out what percentage of time has passed
    map(({elapsed}) => elapsed / duration),
    // Take the vector while less than 100%
    takeWhile(v => v < 1),
    // Finish with 100%
    endWith(1),
    // Calculate the distance traveled between start and end
    map(v => v * diff + start)
    );
    }
    // Setup a div for us to move around
    const div = document.createElement('div');
    document.body.appendChild(div);
    div.style.position = 'absolute';
    div.style.width = '40px';
    div.style.height = '40px';
    div.style.backgroundColor = 'lime';
    div.style.transform = 'translate3d(10px, 0, 0)';
    tween(10, 200, 4000).subscribe(x => {
    div.style.transform = `translate3d(${x}px, 0, 0)`;
    });

    ### Example

    Providing a custom timestamp provider

    import { animationFrames, TimestampProvider } from 'rxjs';
    // A custom timestamp provider
    let now = 0;
    const customTSProvider: TimestampProvider = {
    now() { return now++; }
    };
    const source$ = animationFrames(customTSProvider);
    // Log increasing numbers 0...1...2... on every animation frame.
    source$.subscribe(({ elapsed }) => console.log(elapsed));

    Parameter timestampProvider

    An object with a now method that provides a numeric timestamp

function audit

audit: <T>(
durationSelector: (value: T) => ObservableInput<any>
) => MonoTypeOperatorFunction<T>;
  • Ignores source values for a duration determined by another Observable, then emits the most recent value from the source Observable, then repeats this process.

    It's like auditTime, but the silencing duration is determined by a second Observable.

    ![](audit.png)

    audit is similar to throttle, but emits the last value from the silenced time window, instead of the first value. audit emits the most recent value from the source Observable on the output Observable as soon as its internal timer becomes disabled, and ignores source values while the timer is enabled. Initially, the timer is disabled. As soon as the first source value arrives, the timer is enabled by calling the durationSelector function with the source value, which returns the "duration" Observable. When the duration Observable emits a value, the timer is disabled, then the most recent source value is emitted on the output Observable, and this process repeats for the next source value.

    ## Example

    Emit clicks at a rate of at most one click per second

    import { fromEvent, interval } from 'rxjs';
    import { audit } from 'rxjs/operators'
    const clicks = fromEvent(document, 'click');
    const result = clicks.pipe(audit(ev => interval(1000)));
    result.subscribe(x => console.log(x));

    Parameter durationSelector

    A function that receives a value from the source Observable, for computing the silencing duration, returned as an Observable or a Promise. A function that returns an Observable that performs rate-limiting of emissions from the source Observable.

    See Also

function auditTime

auditTime: <T>(
duration: number,
scheduler?: SchedulerLike
) => MonoTypeOperatorFunction<T>;
  • Ignores source values for duration milliseconds, then emits the most recent value from the source Observable, then repeats this process.

    When it sees a source value, it ignores that plus the next ones for duration milliseconds, and then it emits the most recent value from the source.

    ![](auditTime.png)

    auditTime is similar to throttleTime, but emits the last value from the silenced time window, instead of the first value. auditTime emits the most recent value from the source Observable on the output Observable as soon as its internal timer becomes disabled, and ignores source values while the timer is enabled. Initially, the timer is disabled. As soon as the first source value arrives, the timer is enabled. After duration milliseconds (or the time unit determined internally by the optional scheduler) has passed, the timer is disabled, then the most recent source value is emitted on the output Observable, and this process repeats for the next source value. Optionally takes a SchedulerLike for managing timers.

    ## Example

    Emit clicks at a rate of at most one click per second

    import { fromEvent } from 'rxjs';
    import { auditTime } from 'rxjs/operators';
    const clicks = fromEvent(document, 'click');
    const result = clicks.pipe(auditTime(1000));
    result.subscribe(x => console.log(x));

    Parameter duration

    Time to wait before emitting the most recent source value, measured in milliseconds or the time unit determined internally by the optional scheduler.

    Parameter scheduler

    The SchedulerLike to use for managing the timers that handle the rate-limiting behavior. A function that returns an Observable that performs rate-limiting of emissions from the source Observable.

    See Also

function bindCallback

bindCallback: {
(
callbackFunc: (...args: any[]) => void,
resultSelector: (...args: any[]) => any,
scheduler?: SchedulerLike
): (...args: any[]) => Observable<any>;
<A extends readonly unknown[], R extends readonly unknown[]>(
callbackFunc: (...args: [...A, (...res: R) => void]) => void,
schedulerLike?: SchedulerLike
): (...arg: A) => Observable<R extends [] ? void : R extends [any] ? R[0] : R>;
};

    function bindNodeCallback

    bindNodeCallback: {
    (
    callbackFunc: (...args: any[]) => void,
    resultSelector: (...args: any[]) => any,
    scheduler?: SchedulerLike
    ): (...args: any[]) => Observable<any>;
    <A extends readonly unknown[], R extends readonly unknown[]>(
    callbackFunc: (...args: [...A, (err: any, ...res: R) => void]) => void,
    schedulerLike?: SchedulerLike
    ): (...arg: A) => Observable<R extends [] ? void : R extends [any] ? R[0] : R>;
    };

      function buffer

      buffer: <T>(closingNotifier: Observable<any>) => OperatorFunction<T, T[]>;
      • Buffers the source Observable values until closingNotifier emits.

        Collects values from the past as an array, and emits that array only when another Observable emits.

        ![](buffer.png)

        Buffers the incoming Observable values until the given closingNotifier Observable emits a value, at which point it emits the buffer on the output Observable and starts a new buffer internally, awaiting the next time closingNotifier emits.

        ## Example

        On every click, emit array of most recent interval events

        import { fromEvent, interval } from 'rxjs';
        import { buffer } from 'rxjs/operators';
        const clicks = fromEvent(document, 'click');
        const intervalEvents = interval(1000);
        const buffered = intervalEvents.pipe(buffer(clicks));
        buffered.subscribe(x => console.log(x));

        Parameter closingNotifier

        An Observable that signals the buffer to be emitted on the output Observable. A function that returns an Observable of buffers, which are arrays of values.

        See Also

      function bufferCount

      bufferCount: <T>(
      bufferSize: number,
      startBufferEvery?: number | null
      ) => OperatorFunction<T, T[]>;
      • Buffers the source Observable values until the size hits the maximum bufferSize given.

        Collects values from the past as an array, and emits that array only when its size reaches bufferSize.

        ![](bufferCount.png)

        Buffers a number of values from the source Observable by bufferSize then emits the buffer and clears it, and starts a new buffer each startBufferEvery values. If startBufferEvery is not provided or is null, then new buffers are started immediately at the start of the source and when each buffer closes and is emitted.

        ## Examples

        Emit the last two click events as an array

        import { fromEvent } from 'rxjs';
        import { bufferCount } from 'rxjs/operators';
        const clicks = fromEvent(document, 'click');
        const buffered = clicks.pipe(bufferCount(2));
        buffered.subscribe(x => console.log(x));

        On every click, emit the last two click events as an array

        import { fromEvent } from 'rxjs';
        import { bufferCount } from 'rxjs/operators';
        const clicks = fromEvent(document, 'click');
        const buffered = clicks.pipe(bufferCount(2, 1));
        buffered.subscribe(x => console.log(x));

        Parameter bufferSize

        The maximum size of the buffer emitted.

        Parameter startBufferEvery

        Interval at which to start a new buffer. For example if startBufferEvery is 2, then a new buffer will be started on every other value from the source. A new buffer is started at the beginning of the source by default. A function that returns an Observable of arrays of buffered values.

        See Also

      function bufferTime

      bufferTime: {
      <T>(bufferTimeSpan: number, scheduler?: SchedulerLike): OperatorFunction<T, T[]>;
      <T>(
      bufferTimeSpan: number,
      bufferCreationInterval: number,
      scheduler?: SchedulerLike
      ): OperatorFunction<T, T[]>;
      <T>(
      bufferTimeSpan: number,
      bufferCreationInterval: number,
      maxBufferSize: number,
      scheduler?: SchedulerLike
      ): OperatorFunction<T, T[]>;
      };

        function bufferToggle

        bufferToggle: <T, O>(
        openings: ObservableInput<O>,
        closingSelector: (value: O) => ObservableInput<any>
        ) => OperatorFunction<T, T[]>;
        • Buffers the source Observable values starting from an emission from openings and ending when the output of closingSelector emits.

          Collects values from the past as an array. Starts collecting only when opening emits, and calls the closingSelector function to get an Observable that tells when to close the buffer.

          ![](bufferToggle.png)

          Buffers values from the source by opening the buffer via signals from an Observable provided to openings, and closing and sending the buffers when a Subscribable or Promise returned by the closingSelector function emits.

          ## Example

          Every other second, emit the click events from the next 500ms

          import { fromEvent, interval, EMPTY } from 'rxjs';
          import { bufferToggle } from 'rxjs/operators';
          const clicks = fromEvent(document, 'click');
          const openings = interval(1000);
          const buffered = clicks.pipe(bufferToggle(openings, i =>
          i % 2 ? interval(500) : EMPTY
          ));
          buffered.subscribe(x => console.log(x));

          Parameter openings

          A Subscribable or Promise of notifications to start new buffers.

          Parameter closingSelector

          A function that takes the value emitted by the openings observable and returns a Subscribable or Promise, which, when it emits, signals that the associated buffer should be emitted and cleared. A function that returns an Observable of arrays of buffered values.

          See Also

        function bufferWhen

        bufferWhen: <T>(
        closingSelector: () => ObservableInput<any>
        ) => OperatorFunction<T, T[]>;
        • Buffers the source Observable values, using a factory function of closing Observables to determine when to close, emit, and reset the buffer.

          Collects values from the past as an array. When it starts collecting values, it calls a function that returns an Observable that tells when to close the buffer and restart collecting.

          ![](bufferWhen.png)

          Opens a buffer immediately, then closes the buffer when the observable returned by calling closingSelector function emits a value. When it closes the buffer, it immediately opens a new buffer and repeats the process.

          ## Example

          Emit an array of the last clicks every [1-5] random seconds

          import { fromEvent, interval } from 'rxjs';
          import { bufferWhen } from 'rxjs/operators';
          const clicks = fromEvent(document, 'click');
          const buffered = clicks.pipe(bufferWhen(() =>
          interval(1000 + Math.random() * 4000)
          ));
          buffered.subscribe(x => console.log(x));

          Parameter closingSelector

          A function that takes no arguments and returns an Observable that signals buffer closure. A function that returns an Observable of arrays of buffered values.

          See Also

        function catchError

        catchError: <T, O extends ObservableInput<any>>(
        selector: (err: any, caught: Observable<T>) => O
        ) => OperatorFunction<T, T | ObservedValueOf<O>>;

          function combineLatest

          combineLatest: {
          <T extends unique symbol>(arg: T): Observable<unknown>;
          (sources: []): Observable<never>;
          <A extends readonly unknown[]>(
          sources: readonly [...ObservableInputTuple<A>]
          ): Observable<A>;
          <A extends readonly unknown[], R>(
          sources: readonly [...ObservableInputTuple<A>],
          resultSelector: (...values: A) => R,
          scheduler: SchedulerLike
          ): Observable<R>;
          <A extends readonly unknown[], R>(
          sources: readonly [...ObservableInputTuple<A>],
          resultSelector: (...values: A) => R
          ): Observable<R>;
          <A extends readonly unknown[]>(
          sources: readonly [...ObservableInputTuple<A>],
          scheduler: SchedulerLike
          ): Observable<A>;
          <A extends readonly unknown[]>(
          ...sources_0: ObservableInputTuple<A>
          ): Observable<A>;
          <A extends readonly unknown[], R>(
          ...sourcesAndResultSelectorAndScheduler: [
          ...ObservableInputTuple<A>,
          (...values: A) => R,
          SchedulerLike
          ]
          ): Observable<R>;
          <A extends readonly unknown[], R>(
          ...sourcesAndResultSelector: [
          ...ObservableInputTuple<A>,
          (...values: A) => R
          ]
          ): Observable<R>;
          <A extends readonly unknown[]>(
          ...sourcesAndScheduler: [...ObservableInputTuple<A>, SchedulerLike]
          ): Observable<A>;
          (sourcesObject: { [x: string]: never; [x: number]: never }): Observable<never>;
          <T extends Record<string, ObservableInput<any>>>(sourcesObject: T): Observable<
          { [K in keyof T]: ObservedValueOf<T[K]> }
          >;
          };
          • You have passed any here, we can't figure out if it is an array or an object, so you're getting unknown. Use better types.

            Parameter arg

            Something typed as any

          • Deprecated

            The scheduler parameter will be removed in v8. Use scheduled and combineLatestAll. Details: https://rxjs.dev/deprecations/scheduler-argument

          • Deprecated

            Pass an array of sources instead. The rest-parameters signature will be removed in v8. Details: https://rxjs.dev/deprecations/array-argument

          function combineLatestAll

          combineLatestAll: {
          <T>(): OperatorFunction<ObservableInput<T>, T[]>;
          <T>(): OperatorFunction<any, T[]>;
          <T, R>(project: (...values: T[]) => R): OperatorFunction<ObservableInput<T>, R>;
          <R>(project: (...values: any[]) => R): OperatorFunction<any, R>;
          };

            function combineLatestWith

            combineLatestWith: <T, A extends readonly unknown[]>(
            ...otherSources_0: ObservableInputTuple<A>
            ) => OperatorFunction<T, Cons<T, A>>;
            • Create an observable that combines the latest values from all passed observables and the source into arrays and emits them.

              Returns an observable, that when subscribed to, will subscribe to the source observable and all sources provided as arguments. Once all sources emit at least one value, all of the latest values will be emitted as an array. After that, every time any source emits a value, all of the latest values will be emitted as an array.

              This is a useful operator for eagerly calculating values based off of changed inputs.

              ### Example

              Simple calculation from two inputs.

              import { fromEvent } from 'rxjs';
              import { map, combineLatestWith } from 'rxjs/operators';
              // Setup: Add two inputs to the page
              const input1 = document.createElement('input');
              document.body.appendChild(input1);
              const input2 = document.createElement('input');
              document.body.appendChild(input2);
              // Get streams of changes
              const input1Changes$ = fromEvent(input1, 'change');
              const input2Changes$ = fromEvent(input2, 'change');
              // Combine the changes by adding them together
              input1Changes$.pipe(
              combineLatestWith(input2Changes$),
              map(([e1, e2]) => Number(e1.target.value) + Number(e2.target.value)),
              )
              .subscribe(x => console.log(x));

              Parameter otherSources

              the other sources to subscribe to. A function that returns an Observable that emits the latest emissions from both source and provided Observables.

            function concat

            concat: {
            <T extends readonly unknown[]>(...inputs_0: ObservableInputTuple<T>): Observable<
            T[number]
            >;
            <T extends readonly unknown[]>(
            ...inputsAndScheduler: [...ObservableInputTuple<T>, SchedulerLike]
            ): Observable<T[number]>;
            };

              function concatAll

              concatAll: <O extends ObservableInput<any>>() => OperatorFunction<
              O,
              ObservedValueOf<O>
              >;
              • Converts a higher-order Observable into a first-order Observable by concatenating the inner Observables in order.

                Flattens an Observable-of-Observables by putting one inner Observable after the other.

                ![](concatAll.svg)

                Joins every Observable emitted by the source (a higher-order Observable), in a serial fashion. It subscribes to each inner Observable only after the previous inner Observable has completed, and merges all of their values into the returned observable.

                __Warning:__ If the source Observable emits Observables quickly and endlessly, and the inner Observables it emits generally complete slower than the source emits, you can run into memory issues as the incoming Observables collect in an unbounded buffer.

                Note: concatAll is equivalent to mergeAll with concurrency parameter set to 1.

                ## Example

                For each click event, tick every second from 0 to 3, with no concurrency

                import { fromEvent, interval } from 'rxjs';
                import { map, take, concatAll } from 'rxjs/operators';
                const clicks = fromEvent(document, 'click');
                const higherOrder = clicks.pipe(
                map(ev => interval(1000).pipe(take(4))),
                );
                const firstOrder = higherOrder.pipe(concatAll());
                firstOrder.subscribe(x => console.log(x));
                // Results in the following:
                // (results are not concurrent)
                // For every click on the "document" it will emit values 0 to 3 spaced
                // on a 1000ms interval
                // one click = 1000ms-> 0 -1000ms-> 1 -1000ms-> 2 -1000ms-> 3

                See Also

              function concatMap

              concatMap: {
              <T, O extends ObservableInput<any>>(
              project: (value: T, index: number) => O
              ): OperatorFunction<T, ObservedValueOf<O>>;
              <T, O extends ObservableInput<any>>(
              project: (value: T, index: number) => O,
              resultSelector: undefined
              ): OperatorFunction<T, ObservedValueOf<O>>;
              <T, R, O extends ObservableInput<any>>(
              project: (value: T, index: number) => O,
              resultSelector: (
              outerValue: T,
              innerValue: ObservedValueOf<O>,
              outerIndex: number,
              innerIndex: number
              ) => R
              ): OperatorFunction<T, R>;
              };
              • Deprecated

                The resultSelector parameter will be removed in v8. Use an inner map instead. Details: https://rxjs.dev/deprecations/resultSelector

              function concatMapTo

              concatMapTo: {
              <O extends ObservableInput<unknown>>(observable: O): OperatorFunction<
              any,
              ObservedValueOf<O>
              >;
              <O extends ObservableInput<unknown>>(
              observable: O,
              resultSelector: undefined
              ): OperatorFunction<any, ObservedValueOf<O>>;
              <T, R, O extends ObservableInput<unknown>>(
              observable: O,
              resultSelector: (
              outerValue: T,
              innerValue: ObservedValueOf<O>,
              outerIndex: number,
              innerIndex: number
              ) => R
              ): OperatorFunction<T, R>;
              };
              • Deprecated

                The resultSelector parameter will be removed in v8. Use an inner map instead. Details: https://rxjs.dev/deprecations/resultSelector

              function concatWith

              concatWith: <T, A extends readonly unknown[]>(
              ...otherSources_0: ObservableInputTuple<A>
              ) => OperatorFunction<T, T | A[number]>;
              • Emits all of the values from the source observable, then, once it completes, subscribes to each observable source provided, one at a time, emitting all of their values, and not subscribing to the next one until it completes.

                concat(a$, b$, c$) is the same as a$.pipe(concatWith(b$, c$)).

                ## Example

                Listen for one mouse click, then listen for all mouse moves.

                import { fromEvent } from 'rxjs';
                import { concatWith, map, take } from 'rxjs/operators';
                const clicks$ = fromEvent(document, 'click');
                const moves$ = fromEvent(document, 'mousemove');
                clicks$.pipe(
                map(() => 'click'),
                take(1),
                concatWith(
                moves$.pipe(
                map(() => 'move')
                )
                )
                )
                .subscribe(x => console.log(x));
                // 'click'
                // 'move'
                // 'move'
                // 'move'
                // ...

                Parameter otherSources

                Other observable sources to subscribe to, in sequence, after the original source is complete. A function that returns an Observable that concatenates subscriptions to the source and provided Observables subscribing to the next only once the current subscription completes.

              function connect

              connect: <T, O extends ObservableInput<unknown>>(
              selector: (shared: Observable<T>) => O,
              config?: ConnectConfig<T>
              ) => OperatorFunction<T, ObservedValueOf<O>>;
              • Creates an observable by multicasting the source within a function that allows the developer to define the usage of the multicast prior to connection.

                This is particularly useful if the observable source you wish to multicast could be synchronous or asynchronous. This sets it apart from share, which, in the case of totally synchronous sources will fail to share a single subscription with multiple consumers, as by the time the subscription to the result of share has returned, if the source is synchronous its internal reference count will jump from 0 to 1 back to 0 and reset.

                To use connect, you provide a selector function that will give you a multicast observable that is not yet connected. You then use that multicast observable to create a resulting observable that, when subscribed, will set up your multicast. This is generally, but not always, accomplished with merge.

                Note that using a takeUntil inside of connect's selector _might_ mean you were looking to use the takeWhile operator instead.

                When you subscribe to the result of connect, the selector function will be called. After the selector function returns, the observable it returns will be subscribed to, _then_ the multicast will be connected to the source.

                ### Example

                Sharing a totally synchronous observable

                import { defer, merge, of } from 'rxjs';
                import { tap, connect, filter, map } from 'rxjs/operators';
                const source$ = defer(() => {
                console.log('subscription started');
                return of(1, 2, 3, 4, 5).pipe(
                tap(n => console.log(`source emitted ${n}`))
                );
                });
                source$.pipe(
                // Notice in here we're merging 3 subscriptions to `shared$`.
                connect((shared$) => merge(
                shared$.pipe(map(n => `all ${n}`)),
                shared$.pipe(filter(n => n % 2 === 0), map(n => `even ${n}`)),
                shared$.pipe(filter(n => n % 2 === 1), map(n => `odd ${n}`)),
                ))
                )
                .subscribe(console.log);
                // Expected output: (notice only one subscription)
                "subscription started"
                "source emitted 1"
                "all 1"
                "odd 1"
                "source emitted 2"
                "all 2"
                "even 2"
                "source emitted 3"
                "all 3"
                "odd 3"
                "source emitted 4"
                "all 4"
                "even 4"
                "source emitted 5"
                "all 5"
                "odd 5"

                Parameter selector

                A function used to set up the multicast. Gives you a multicast observable that is not yet connected. With that, you're expected to create and return and Observable, that when subscribed to, will utilize the multicast observable. After this function is executed -- and its return value subscribed to -- the the operator will subscribe to the source, and the connection will be made.

                Parameter config

                The configuration object for connect.

              function connectable

              connectable: <T>(
              source: ObservableInput<T>,
              config?: ConnectableConfig<T>
              ) => Connectable<T>;
              • Creates an observable that multicasts once connect() is called on it.

                Parameter source

                The observable source to make connectable.

                Parameter config

                The configuration object for connectable.

                Returns

                A "connectable" observable, that has a connect() method, that you must call to connect the source to all consumers through the subject provided as the connector.

              function count

              count: <T>(
              predicate?: (value: T, index: number) => boolean
              ) => OperatorFunction<T, number>;
              • Counts the number of emissions on the source and emits that number when the source completes.

                Tells how many values were emitted, when the source completes.

                ![](count.png)

                count transforms an Observable that emits values into an Observable that emits a single value that represents the number of values emitted by the source Observable. If the source Observable terminates with an error, count will pass this error notification along without emitting a value first. If the source Observable does not terminate at all, count will neither emit a value nor terminate. This operator takes an optional predicate function as argument, in which case the output emission will represent the number of source values that matched true with the predicate.

                ## Examples

                Counts how many seconds have passed before the first click happened

                import { fromEvent, interval } from 'rxjs';
                import { count, takeUntil } from 'rxjs/operators';
                const seconds = interval(1000);
                const clicks = fromEvent(document, 'click');
                const secondsBeforeClick = seconds.pipe(takeUntil(clicks));
                const result = secondsBeforeClick.pipe(count());
                result.subscribe(x => console.log(x));

                Counts how many odd numbers are there between 1 and 7

                import { range } from 'rxjs';
                import { count } from 'rxjs/operators';
                const numbers = range(1, 7);
                const result = numbers.pipe(count(i => i % 2 === 1));
                result.subscribe(x => console.log(x));
                // Results in:
                // 4

                Parameter predicate

                A function that is used to analyze the value and the index and determine whether or not to increment the count. Return true to increment the count, and return false to keep the count the same. If the predicate is not provided, every value will be counted. A function that returns an Observable that emits one number that represents the count of emissions.

                See Also

              function debounce

              debounce: <T>(
              durationSelector: (value: T) => ObservableInput<any>
              ) => MonoTypeOperatorFunction<T>;
              • Emits a notification from the source Observable only after a particular time span determined by another Observable has passed without another source emission.

                It's like debounceTime, but the time span of emission silence is determined by a second Observable.

                ![](debounce.png)

                debounce delays notifications emitted by the source Observable, but drops previous pending delayed emissions if a new notification arrives on the source Observable. This operator keeps track of the most recent notification from the source Observable, and spawns a duration Observable by calling the durationSelector function. The notification is emitted only when the duration Observable emits a next notification, and if no other notification was emitted on the source Observable since the duration Observable was spawned. If a new notification appears before the duration Observable emits, the previous notification will not be emitted and a new duration is scheduled from durationSelector is scheduled. If the completing event happens during the scheduled duration the last cached notification is emitted before the completion event is forwarded to the output observable. If the error event happens during the scheduled duration or after it only the error event is forwarded to the output observable. The cache notification is not emitted in this case.

                Like debounceTime, this is a rate-limiting operator, and also a delay-like operator since output emissions do not necessarily occur at the same time as they did on the source Observable.

                ## Example Emit the most recent click after a burst of clicks

                import { fromEvent, interval } from 'rxjs';
                import { scan, debounce } from 'rxjs/operators';
                const clicks = fromEvent(document, 'click');
                const result = clicks.pipe(
                scan((i) => ++i, 1),
                debounce((i) => interval(200 * i))
                );
                result.subscribe(x => console.log(x));

                Parameter durationSelector

                A function that receives a value from the source Observable, for computing the timeout duration for each source value, returned as an Observable or a Promise. A function that returns an Observable that delays the emissions of the source Observable by the specified duration Observable returned by durationSelector, and may drop some values if they occur too frequently.

                See Also

              function debounceTime

              debounceTime: <T>(
              dueTime: number,
              scheduler?: SchedulerLike
              ) => MonoTypeOperatorFunction<T>;
              • Emits a notification from the source Observable only after a particular time span has passed without another source emission.

                It's like delay, but passes only the most recent notification from each burst of emissions.

                ![](debounceTime.png)

                debounceTime delays notifications emitted by the source Observable, but drops previous pending delayed emissions if a new notification arrives on the source Observable. This operator keeps track of the most recent notification from the source Observable, and emits that only when dueTime has passed without any other notification appearing on the source Observable. If a new value appears before dueTime silence occurs, the previous notification will be dropped and will not be emitted and a new dueTime is scheduled. If the completing event happens during dueTime the last cached notification is emitted before the completion event is forwarded to the output observable. If the error event happens during dueTime or after it only the error event is forwarded to the output observable. The cache notification is not emitted in this case.

                This is a rate-limiting operator, because it is impossible for more than one notification to be emitted in any time window of duration dueTime, but it is also a delay-like operator since output emissions do not occur at the same time as they did on the source Observable. Optionally takes a SchedulerLike for managing timers.

                ## Example Emit the most recent click after a burst of clicks

                import { fromEvent } from 'rxjs';
                import { debounceTime } from 'rxjs/operators';
                const clicks = fromEvent(document, 'click');
                const result = clicks.pipe(debounceTime(1000));
                result.subscribe(x => console.log(x));

                Parameter dueTime

                The timeout duration in milliseconds (or the time unit determined internally by the optional scheduler) for the window of time required to wait for emission silence before emitting the most recent source value.

                Parameter scheduler

                The SchedulerLike to use for managing the timers that handle the timeout for each value. A function that returns an Observable that delays the emissions of the source Observable by the specified dueTime, and may drop some values if they occur too frequently.

                See Also

              function defaultIfEmpty

              defaultIfEmpty: <T, R>(defaultValue: R) => OperatorFunction<T, T | R>;
              • Emits a given value if the source Observable completes without emitting any next value, otherwise mirrors the source Observable.

                If the source Observable turns out to be empty, then this operator will emit a default value.

                ![](defaultIfEmpty.png)

                defaultIfEmpty emits the values emitted by the source Observable or a specified default value if the source Observable is empty (completes without having emitted any next value).

                ## Example If no clicks happen in 5 seconds, then emit "no clicks"

                import { fromEvent, interval } from 'rxjs';
                import { defaultIfEmpty, takeUntil } from 'rxjs/operators';
                const clicks = fromEvent(document, 'click');
                const clicksBeforeFive = clicks.pipe(takeUntil(interval(5000)));
                const result = clicksBeforeFive.pipe(defaultIfEmpty('no clicks'));
                result.subscribe(x => console.log(x));

                Parameter defaultValue

                The default value used if the source Observable is empty. A function that returns an Observable that emits either the specified defaultValue if the source Observable emits no items, or the values emitted by the source Observable.

                See Also

              function defer

              defer: <R extends ObservableInput<any>>(
              observableFactory: () => R
              ) => Observable<ObservedValueOf<R>>;
              • Creates an Observable that, on subscribe, calls an Observable factory to make an Observable for each new Observer.

                Creates the Observable lazily, that is, only when it is subscribed.

                ![](defer.png)

                defer allows you to create an Observable only when the Observer subscribes. It waits until an Observer subscribes to it, calls the given factory function to get an Observable -- where a factory function typically generates a new Observable -- and subscribes the Observer to this Observable. In case the factory function returns a falsy value, then EMPTY is used as Observable instead. Last but not least, an exception during the factory function call is transferred to the Observer by calling error.

                ## Example ### Subscribe to either an Observable of clicks or an Observable of interval, at random

                import { defer, fromEvent, interval } from 'rxjs';
                const clicksOrInterval = defer(function () {
                return Math.random() > 0.5
                ? fromEvent(document, 'click')
                : 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).

                Parameter 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. {Observable} An Observable whose Observers' subscriptions trigger an invocation of the given Observable factory function.

                See Also

              function delay

              delay: <T>(
              due: number | Date,
              scheduler?: SchedulerLike
              ) => MonoTypeOperatorFunction<T>;
              • Delays the emission of items from the source Observable by a given timeout or until a given Date.

                Time shifts each item by some specified amount of milliseconds.

                ![](delay.png)

                If the delay argument is a Number, this operator time shifts the source Observable by that amount of time expressed in milliseconds. The relative time intervals between the values are preserved.

                If the delay argument is a Date, this operator time shifts the start of the Observable execution until the given date occurs.

                ## Examples Delay each click by one second

                import { fromEvent } from 'rxjs';
                import { delay } from 'rxjs/operators';
                const clicks = fromEvent(document, 'click');
                const delayedClicks = clicks.pipe(delay(1000)); // each click emitted after 1 second
                delayedClicks.subscribe(x => console.log(x));

                Delay all clicks until a future date happens

                import { fromEvent } from 'rxjs';
                import { delay } from 'rxjs/operators';
                const clicks = fromEvent(document, 'click');
                const date = new Date('March 15, 2050 12:00:00'); // in the future
                const delayedClicks = clicks.pipe(delay(date)); // click emitted only after that date
                delayedClicks.subscribe(x => console.log(x));

                Parameter due

                The delay duration in milliseconds (a number) or a Date until which the emission of the source items is delayed.

                Parameter scheduler

                The SchedulerLike to use for managing the timers that handle the time-shift for each item. A function that returns an Observable that delays the emissions of the source Observable by the specified timeout or Date.

                See Also

              function delayWhen

              delayWhen: {
              <T>(
              delayDurationSelector: (value: T, index: number) => Observable<any>,
              subscriptionDelay: Observable<any>
              ): MonoTypeOperatorFunction<T>;
              <T>(
              delayDurationSelector: (value: T, index: number) => Observable<any>
              ): MonoTypeOperatorFunction<T>;
              };
              • Deprecated

                The subscriptionDelay parameter will be removed in v8.

              function dematerialize

              dematerialize: <N extends ObservableNotification<any>>() => OperatorFunction<
              N,
              ValueFromNotification<N>
              >;
              • Converts an Observable of ObservableNotification objects into the emissions that they represent.

                Unwraps ObservableNotification objects as actual next, error and complete emissions. The opposite of materialize.

                ![](dematerialize.png)

                dematerialize is assumed to operate an Observable that only emits ObservableNotification objects as next emissions, and does not emit any error. Such Observable is the output of a materialize operation. Those notifications are then unwrapped using the metadata they contain, and emitted as next, error, and complete on the output Observable.

                Use this operator in conjunction with materialize.

                ## Example

                Convert an Observable of Notifications to an actual Observable

                import { of } from 'rxjs';
                import { dematerialize } from 'rxjs/operators';
                const notifA = { kind: 'N', value: 'A' };
                const notifB = { kind: 'N', value: 'B' };
                const notifE = { kind: 'E', error: new TypeError('x.toUpperCase is not a function') }
                const materialized = of(notifA, notifB, notifE);
                const upperCase = materialized.pipe(dematerialize());
                upperCase.subscribe({
                next: x => console.log(x),
                error: e => console.error(e)
                });
                // Results in:
                // A
                // B
                // TypeError: x.toUpperCase is not a function

                See Also

                • materialize

                  A function that returns an Observable that emits items and notifications embedded in Notification objects emitted by the source Observable.

              function distinct

              distinct: <T, K>(
              keySelector?: (value: T) => K,
              flushes?: Observable<any>
              ) => MonoTypeOperatorFunction<T>;
              • Returns an Observable that emits all items emitted by the source Observable that are distinct by comparison from previous items.

                If a keySelector function is provided, then it will project each value from the source observable into a new value that it will check for equality with previously projected values. If a keySelector function is not provided, it will use each value from the source observable directly with an equality check against previous values.

                In JavaScript runtimes that support Set, this operator will use a Set to improve performance of the distinct value checking.

                In other runtimes, this operator will use a minimal implementation of Set that relies on an Array and indexOf under the hood, so performance will degrade as more values are checked for distinction. Even in newer browsers, a long-running distinct use might result in memory leaks. To help alleviate this in some scenarios, an optional flushes parameter is also provided so that the internal Set can be "flushed", basically clearing it of values.

                ## Examples

                A simple example with numbers

                import { of } from 'rxjs';
                import { distinct } from 'rxjs/operators';
                of(1, 1, 2, 2, 2, 1, 2, 3, 4, 3, 2, 1)
                .pipe(
                distinct()
                )
                .subscribe(x => console.log(x));
                // Outputs
                // 1
                // 2
                // 3
                // 4

                An example using a keySelector function

                import { of } from 'rxjs';
                import { distinct } from 'rxjs/operators';
                interface Person {
                age: number,
                name: string
                }
                of(
                { age: 4, name: 'Foo'},
                { age: 7, name: 'Bar'},
                { age: 5, name: 'Foo'}
                ).pipe(
                distinct((p: Person) => p.name)
                )
                .subscribe(x => console.log(x));
                // Outputs
                // { age: 4, name: 'Foo' }
                // { age: 7, name: 'Bar' }

                Parameter keySelector

                Optional function to select which value you want to check as distinct.

                Parameter flushes

                Optional Observable for flushing the internal HashSet of the operator. A function that returns an Observable that emits items from the source Observable with distinct values.

                See Also

              function distinctUntilChanged

              distinctUntilChanged: {
              <T>(
              comparator?: (previous: T, current: T) => boolean
              ): MonoTypeOperatorFunction<T>;
              <T, K>(
              comparator: (previous: K, current: K) => boolean,
              keySelector: (value: T) => K
              ): MonoTypeOperatorFunction<T>;
              };
              • Returns a result Observable that emits all values pushed by the source observable if they are distinct in comparison to the last value the result observable emitted.

                1. It will always emit the first value from the source. 2. For all subsequent values pushed by the source, they will be compared to the previously emitted values using the provided comparator or an === equality check. 3. If the value pushed by the source is determined to be unequal by this check, that value is emitted and becomes the new "previously emitted value" internally.

                ## Example

                A very basic example with no comparator. Note that 1 is emitted more than once, because it's distinct in comparison to the _previously emitted_ value, not in comparison to _all other emitted values_.

                import { of } from 'rxjs';
                import { distinctUntilChanged } from 'rxjs/operators';
                of(1, 1, 1, 2, 2, 2, 1, 1, 3, 3).pipe(
                distinctUntilChanged()
                )
                .subscribe(console.log);
                // Logs: 1, 2, 1, 3

                ## Example

                With a comparator, you can do custom comparisons. Let's say you only want to emit a value when all of its components have changed:

                import { of } from 'rxjs';
                import { distinctUntilChanged } from 'rxjs/operators';
                const totallyDifferentBuilds$ = of(
                { engineVersion: '1.1.0', transmissionVersion: '1.2.0' },
                { engineVersion: '1.1.0', transmissionVersion: '1.4.0' },
                { engineVersion: '1.3.0', transmissionVersion: '1.4.0' },
                { engineVersion: '1.3.0', transmissionVersion: '1.5.0' },
                { engineVersion: '2.0.0', transmissionVersion: '1.5.0' }
                ).pipe(
                distinctUntilChanged((prev, curr) => {
                return (
                prev.engineVersion === curr.engineVersion ||
                prev.transmissionVersion === curr.transmissionVersion
                );
                })
                );
                totallyDifferentBuilds$.subscribe(console.log);
                // Logs:
                // {engineVersion: "1.1.0", transmissionVersion: "1.2.0"}
                // {engineVersion: "1.3.0", transmissionVersion: "1.4.0"}
                // {engineVersion: "2.0.0", transmissionVersion: "1.5.0"}

                ## Example

                You can also provide a custom comparator to check that emitted changes are only in one direction. Let's say you only want to get the next record temperature:

                import { of } from "rxjs";
                import { distinctUntilChanged } from "rxjs/operators";
                const temps$ = of(30, 31, 20, 34, 33, 29, 35, 20);
                const recordHighs$ = temps$.pipe(
                distinctUntilChanged((prevHigh, temp) => {
                // If the current temp is less than
                // or the same as the previous record,
                // the record hasn't changed.
                return temp <= prevHigh;
                })
                );
                recordHighs$.subscribe(console.log);
                // Logs: 30, 31, 34, 35

                Parameter comparator

                A function used to compare the previous and current values for equality. Defaults to a === check. A function that returns an Observable that emits items from the source Observable with distinct values.

              • Returns a result Observable that emits all values pushed by the source observable if they are distinct in comparison to the last value the result observable emitted.

                1. It will always emit the first value from the source. 2. The keySelector will be run against all values, including the first value. 3. For all values after the first, the selected key will be compared against the key selected from the previously emitted value using the comparator. 4. If the keys are determined to be unequal by this check, the value (not the key), is emitted and the selected key from that value is saved for future comparisons against other keys.

                ## Example

                Selecting update events only when the updatedBy field shows the account changed hands...

                // A stream of updates to a given account
                const accountUpdates$ = of(
                { updatedBy: "blesh", data: [] },
                { updatedBy: "blesh", data: [] },
                { updatedBy: "ncjamieson", data: [] },
                { updatedBy: "ncjamieson", data: [] },
                { updatedBy: "blesh", data: [] }
                );
                // We only want the events where it changed hands
                const changedHands$ = accountUpdates$.pipe(
                distinctUntilChanged(undefined, update => update.updatedBy)
                );
                changedHands$.subscribe(console.log);
                // Logs:
                // {updatedBy: "blesh", data: Array[0]}
                // {updatedBy: "ncjamieson", data: Array[0]}
                // {updatedBy: "blesh", data: Array[0]}

                Parameter comparator

                A function used to compare the previous and current keys for equality. Defaults to a === check.

                Parameter keySelector

                Used to select a key value to be passed to the comparator. A function that returns an Observable that emits items from the source Observable with distinct values.

              function distinctUntilKeyChanged

              distinctUntilKeyChanged: {
              <T>(key: keyof T): MonoTypeOperatorFunction<T>;
              <T, K extends keyof T>(
              key: K,
              compare: (x: T[K], y: T[K]) => boolean
              ): MonoTypeOperatorFunction<T>;
              };

                function elementAt

                elementAt: <T, D = T>(
                index: number,
                defaultValue?: D
                ) => OperatorFunction<T, T | D>;
                • Emits the single value at the specified index in a sequence of emissions from the source Observable.

                  Emits only the i-th value, then completes.

                  ![](elementAt.png)

                  elementAt returns an Observable that emits the item at the specified index in the source Observable, or a default value if that index is out of range and the default argument is provided. If the default argument is not given and the index is out of range, the output Observable will emit an ArgumentOutOfRangeError error.

                  ## Example Emit only the third click event

                  import { fromEvent } from 'rxjs';
                  import { elementAt } from 'rxjs/operators';
                  const clicks = fromEvent(document, 'click');
                  const result = clicks.pipe(elementAt(2));
                  result.subscribe(x => console.log(x));
                  // Results in:
                  // click 1 = nothing
                  // click 2 = nothing
                  // click 3 = MouseEvent object logged to console

                  Parameter index

                  Is the number i for the i-th source emission that has happened since the subscription, starting from the number 0.

                  Parameter defaultValue

                  The default value returned for missing indices. A function that returns an Observable that emits a single item, if it is found. Otherwise, it will emit the default value if given. If not, it emits an error.

                  Throws

                  {ArgumentOutOfRangeError} When using elementAt(i), it delivers an ArgumentOutOfRangeError to the Observer's error callback if i < 0 or the Observable has completed before emitting the i-th next notification.

                  See Also

                function empty

                empty: (scheduler?: SchedulerLike) => Observable<never>;
                • Creates an Observable that emits no items to the Observer and immediately emits a complete notification.

                  Just emits 'complete', and nothing else.

                  ![](empty.png)

                  This static operator is useful for creating a simple Observable that only emits the complete notification. It can be used for composing with other Observables, such as in a mergeMap.

                  ## Examples

                  ### Emit the number 7, then complete

                  import { empty } from 'rxjs';
                  import { startWith } from 'rxjs/operators';
                  const result = empty().pipe(startWith(7));
                  result.subscribe(x => console.log(x));
                  // Outputs
                  // 7

                  ### Map and flatten only odd numbers to the sequence 'a', 'b', 'c'

                  import { empty, interval, of } from 'rxjs';
                  import { mergeMap } from 'rxjs/operators';
                  const interval$ = interval(1000);
                  const result = interval$.pipe(
                  mergeMap(x => x % 2 === 1 ? of('a', 'b', 'c') : empty()),
                  );
                  result.subscribe(x => console.log(x));
                  // Results in the following to the console:
                  // x is equal to the count on the interval, e.g. (0, 1, 2, 3, ...)
                  // x will occur every 1000ms
                  // if x % 2 is equal to 1, print a, b, c (each on its own)
                  // if x % 2 is not equal to 1, nothing will be output

                  Parameter scheduler

                  A SchedulerLike to use for scheduling the emission of the complete notification. An "empty" Observable: emits only the complete notification.

                  See Also

                  Deprecated

                  Replaced with the EMPTY constant or scheduled (e.g. scheduled([], scheduler)). Will be removed in v8.

                function endWith

                endWith: {
                <T>(scheduler: SchedulerLike): MonoTypeOperatorFunction<T>;
                <T, A extends unknown[] = T[]>(
                ...valuesAndScheduler: [...A, SchedulerLike]
                ): OperatorFunction<T, T | ValueFromArray<A>>;
                <T, A extends unknown[] = T[]>(...values: A): OperatorFunction<
                T,
                T | ValueFromArray<A>
                >;
                };
                • Deprecated

                  The scheduler parameter will be removed in v8. Use scheduled and concatAll. Details: https://rxjs.dev/deprecations/scheduler-argument

                function every

                every: {
                <T>(predicate: BooleanConstructor): OperatorFunction<
                T,
                Exclude<T, Falsy> extends never ? false : boolean
                >;
                <T>(predicate: BooleanConstructor, thisArg: any): OperatorFunction<
                T,
                Exclude<T, Falsy> extends never ? false : boolean
                >;
                <T, A>(
                predicate: (
                this: A,
                value: T,
                index: number,
                source: Observable<T>
                ) => boolean,
                thisArg: A
                ): OperatorFunction<T, boolean>;
                <T>(
                predicate: (value: T, index: number, source: Observable<T>) => boolean
                ): OperatorFunction<T, boolean>;
                };
                • Deprecated

                  Use a closure instead of a thisArg. Signatures accepting a thisArg will be removed in v8.

                function exhaustAll

                exhaustAll: <O extends ObservableInput<any>>() => OperatorFunction<
                O,
                ObservedValueOf<O>
                >;
                • Converts a higher-order Observable into a first-order Observable by dropping inner Observables while the previous inner Observable has not yet completed.

                  Flattens an Observable-of-Observables by dropping the next inner Observables while the current inner is still executing.

                  ![](exhaust.png)

                  exhaust subscribes to an Observable that emits Observables, also known as a higher-order Observable. Each time it observes one of these emitted inner Observables, the output Observable begins emitting the items emitted by that inner Observable. So far, it behaves like mergeAll. However, exhaust ignores every new inner Observable if the previous Observable has not yet completed. Once that one completes, it will accept and flatten the next inner Observable and repeat this process.

                  ## Example Run a finite timer for each click, only if there is no currently active timer

                  import { fromEvent, interval } from 'rxjs';
                  import { exhaustAll, map, take } from 'rxjs/operators';
                  const clicks = fromEvent(document, 'click');
                  const higherOrder = clicks.pipe(
                  map((ev) => interval(1000).pipe(take(5))),
                  );
                  const result = higherOrder.pipe(exhaustAll());
                  result.subscribe(x => console.log(x));

                  See Also

                function exhaustMap

                exhaustMap: {
                <T, O extends ObservableInput<any>>(
                project: (value: T, index: number) => O
                ): OperatorFunction<T, ObservedValueOf<O>>;
                <T, O extends ObservableInput<any>>(
                project: (value: T, index: number) => O,
                resultSelector: undefined
                ): OperatorFunction<T, ObservedValueOf<O>>;
                <T, I, R>(
                project: (value: T, index: number) => ObservableInput<I>,
                resultSelector: (
                outerValue: T,
                innerValue: I,
                outerIndex: number,
                innerIndex: number
                ) => R
                ): OperatorFunction<T, R>;
                };
                • Deprecated

                  The resultSelector parameter will be removed in v8. Use an inner map instead. Details: https://rxjs.dev/deprecations/resultSelector

                function expand

                expand: {
                <T, O extends ObservableInput<unknown>>(
                project: (value: T, index: number) => O,
                concurrent?: number,
                scheduler?: SchedulerLike
                ): OperatorFunction<T, ObservedValueOf<O>>;
                <T, O extends ObservableInput<unknown>>(
                project: (value: T, index: number) => O,
                concurrent: number,
                scheduler: SchedulerLike
                ): OperatorFunction<T, ObservedValueOf<O>>;
                };
                • Deprecated

                  The scheduler parameter will be removed in v8. If you need to schedule the inner subscription, use subscribeOn within the projection function: expand((value) => fn(value).pipe(subscribeOn(scheduler))). Details: Details: https://rxjs.dev/deprecations/scheduler-argument

                function filter

                filter: {
                <T, S extends T, A>(
                predicate: (this: A, value: T, index: number) => value is S,
                thisArg: A
                ): OperatorFunction<T, S>;
                <T, S extends T>(
                predicate: (value: T, index: number) => value is S
                ): OperatorFunction<T, S>;
                <T>(predicate: BooleanConstructor): OperatorFunction<T, TruthyTypesOf<T>>;
                <T, A>(
                predicate: (this: A, value: T, index: number) => boolean,
                thisArg: A
                ): MonoTypeOperatorFunction<T>;
                <T>(
                predicate: (value: T, index: number) => boolean
                ): MonoTypeOperatorFunction<T>;
                };
                • Deprecated

                  Use a closure instead of a thisArg. Signatures accepting a thisArg will be removed in v8.

                function finalize

                finalize: <T>(callback: () => void) => MonoTypeOperatorFunction<T>;
                • Returns an Observable that mirrors the source Observable, but will call a specified function when the source terminates on complete or error. The specified function will also be called when the subscriber explicitly unsubscribes.

                  ## Examples Execute callback function when the observable completes

                  import { interval } from 'rxjs';
                  import { take, finalize } from 'rxjs/operators';
                  // emit value in sequence every 1 second
                  const source = interval(1000);
                  const example = source.pipe(
                  take(5), //take only the first 5 values
                  finalize(() => console.log('Sequence complete')) // Execute when the observable completes
                  )
                  const subscribe = example.subscribe(val => console.log(val));
                  // results:
                  // 0
                  // 1
                  // 2
                  // 3
                  // 4
                  // 'Sequence complete'

                  Execute callback function when the subscriber explicitly unsubscribes

                  import { interval, timer, noop } from 'rxjs';
                  import { finalize, tap } from 'rxjs/operators';
                  const source = interval(100).pipe(
                  finalize(() => console.log('[finalize] Called')),
                  tap({
                  next: () => console.log('[next] Called'),
                  error: () => console.log('[error] Not called'),
                  complete: () => console.log('[tap complete] Not called')
                  })
                  );
                  const sub = source.subscribe({
                  next: x => console.log(x),
                  error: noop,
                  complete: () => console.log('[complete] Not called')
                  });
                  timer(150).subscribe(() => sub.unsubscribe());
                  // results:
                  // '[next] Called'
                  // 0
                  // '[finalize] Called'

                  Parameter callback

                  Function to be called when source terminates. A function that returns an Observable that mirrors the source, but will call the specified function on termination.

                function find

                find: {
                <T>(predicate: BooleanConstructor): OperatorFunction<T, TruthyTypesOf<T>>;
                <T, S extends T, A>(
                predicate: (
                this: A,
                value: T,
                index: number,
                source: Observable<T>
                ) => value is S,
                thisArg: A
                ): OperatorFunction<T, S>;
                <T, S extends T>(
                predicate: (value: T, index: number, source: Observable<T>) => value is S
                ): OperatorFunction<T, S>;
                <T, A>(
                predicate: (
                this: A,
                value: T,
                index: number,
                source: Observable<T>
                ) => boolean,
                thisArg: A
                ): OperatorFunction<T, T>;
                <T>(
                predicate: (value: T, index: number, source: Observable<T>) => boolean
                ): OperatorFunction<T, T>;
                };
                • Deprecated

                  Use a closure instead of a thisArg. Signatures accepting a thisArg will be removed in v8.

                function findIndex

                findIndex: {
                <T>(predicate: BooleanConstructor): OperatorFunction<
                T,
                T extends Falsy ? -1 : number
                >;
                <T>(predicate: BooleanConstructor, thisArg: any): OperatorFunction<
                T,
                T extends Falsy ? -1 : number
                >;
                <T, A>(
                predicate: (
                this: A,
                value: T,
                index: number,
                source: Observable<T>
                ) => boolean,
                thisArg: A
                ): OperatorFunction<T, number>;
                <T>(
                predicate: (value: T, index: number, source: Observable<T>) => boolean
                ): OperatorFunction<T, number>;
                };
                • Deprecated

                  Use a closure instead of a thisArg. Signatures accepting a thisArg will be removed in v8.

                function first

                first: {
                <T, D = T>(predicate?: null, defaultValue?: D): OperatorFunction<T, T | D>;
                <T>(predicate: BooleanConstructor): OperatorFunction<T, TruthyTypesOf<T>>;
                <T, D>(predicate: BooleanConstructor, defaultValue: D): OperatorFunction<
                T,
                D | TruthyTypesOf<T>
                >;
                <T, S extends T>(
                predicate: (value: T, index: number, source: Observable<T>) => value is S,
                defaultValue?: S
                ): OperatorFunction<T, S>;
                <T, S extends T, D>(
                predicate: (value: T, index: number, source: Observable<T>) => value is S,
                defaultValue: D
                ): OperatorFunction<T, S | D>;
                <T, D = T>(
                predicate: (value: T, index: number, source: Observable<T>) => boolean,
                defaultValue?: D
                ): OperatorFunction<T, T | D>;
                };

                  function firstValueFrom

                  firstValueFrom: {
                  <T, D>(source: Observable<T>, config: FirstValueFromConfig<D>): Promise<T | D>;
                  <T>(source: Observable<T>): Promise<T>;
                  };

                    function forkJoin

                    forkJoin: {
                    <T extends unique symbol>(arg: T): Observable<unknown>;
                    (scheduler: null): Observable<never>;
                    (sources: readonly []): Observable<never>;
                    <A extends readonly unknown[]>(
                    sources: readonly [...ObservableInputTuple<A>]
                    ): Observable<A>;
                    <A extends readonly unknown[], R>(
                    sources: readonly [...ObservableInputTuple<A>],
                    resultSelector: (...values: A) => R
                    ): Observable<R>;
                    <A extends readonly unknown[]>(
                    ...sources_0: ObservableInputTuple<A>
                    ): Observable<A>;
                    <A extends readonly unknown[], R>(
                    ...sourcesAndResultSelector: [
                    ...ObservableInputTuple<A>,
                    (...values: A) => R
                    ]
                    ): Observable<R>;
                    (sourcesObject: { [x: string]: never; [x: number]: never }): Observable<never>;
                    <T extends Record<string, ObservableInput<any>>>(sourcesObject: T): Observable<
                    { [K in keyof T]: ObservedValueOf<T[K]> }
                    >;
                    };
                    • You have passed any here, we can't figure out if it is an array or an object, so you're getting unknown. Use better types.

                      Parameter arg

                      Something typed as any

                    • Deprecated

                      Pass an array of sources instead. The rest-parameters signature will be removed in v8. Details: https://rxjs.dev/deprecations/array-argument

                    function from

                    from: {
                    <O extends ObservableInput<any>>(input: O): Observable<ObservedValueOf<O>>;
                    <O extends ObservableInput<any>>(input: O, scheduler: SchedulerLike): Observable<
                    ObservedValueOf<O>
                    >;
                    };
                    • Deprecated

                      The scheduler parameter will be removed in v8. Use scheduled. Details: https://rxjs.dev/deprecations/scheduler-argument

                    function fromEvent

                    fromEvent: {
                    <T>(
                    target: HasEventTargetAddRemove<T> | ArrayLike<HasEventTargetAddRemove<T>>,
                    eventName: string
                    ): Observable<T>;
                    <T, R>(
                    target: HasEventTargetAddRemove<T> | ArrayLike<HasEventTargetAddRemove<T>>,
                    eventName: string,
                    resultSelector: (event: T) => R
                    ): Observable<R>;
                    <T>(
                    target: HasEventTargetAddRemove<T> | ArrayLike<HasEventTargetAddRemove<T>>,
                    eventName: string,
                    options: EventListenerOptions
                    ): Observable<T>;
                    <T, R>(
                    target: HasEventTargetAddRemove<T> | ArrayLike<HasEventTargetAddRemove<T>>,
                    eventName: string,
                    options: EventListenerOptions,
                    resultSelector: (event: T) => R
                    ): Observable<R>;
                    (
                    target: NodeStyleEventEmitter | ArrayLike<NodeStyleEventEmitter>,
                    eventName: string
                    ): Observable<unknown>;
                    <T>(
                    target: NodeStyleEventEmitter | ArrayLike<NodeStyleEventEmitter>,
                    eventName: string
                    ): Observable<T>;
                    <R>(
                    target: NodeStyleEventEmitter | ArrayLike<NodeStyleEventEmitter>,
                    eventName: string,
                    resultSelector: (...args: any[]) => R
                    ): Observable<R>;
                    (
                    target: NodeCompatibleEventEmitter | ArrayLike<NodeCompatibleEventEmitter>,
                    eventName: string
                    ): Observable<unknown>;
                    <T>(
                    target: NodeCompatibleEventEmitter | ArrayLike<NodeCompatibleEventEmitter>,
                    eventName: string
                    ): Observable<T>;
                    <R>(
                    target: NodeCompatibleEventEmitter | ArrayLike<NodeCompatibleEventEmitter>,
                    eventName: string,
                    resultSelector: (...args: any[]) => R
                    ): Observable<R>;
                    <T>(
                    target:
                    | JQueryStyleEventEmitter<any, T>
                    | ArrayLike<JQueryStyleEventEmitter<any, T>>,
                    eventName: string
                    ): Observable<T>;
                    <T, R>(
                    target:
                    | JQueryStyleEventEmitter<any, T>
                    | ArrayLike<JQueryStyleEventEmitter<any, T>>,
                    eventName: string,
                    resultSelector: (value: T, ...args: any[]) => R
                    ): Observable<R>;
                    };
                    • Deprecated

                      Do not specify explicit type parameters. Signatures with type parameters that cannot be inferred will be removed in v8.

                    function fromEventPattern

                    fromEventPattern: {
                    <T>(
                    addHandler: (handler: NodeEventHandler) => any,
                    removeHandler?: (handler: NodeEventHandler, signal?: any) => void
                    ): Observable<T>;
                    <T>(
                    addHandler: (handler: NodeEventHandler) => any,
                    removeHandler?: (handler: NodeEventHandler, signal?: any) => void,
                    resultSelector?: (...args: any[]) => T
                    ): Observable<T>;
                    };

                      function generate

                      generate: {
                      <T, S>(
                      initialState: S,
                      condition: ConditionFunc<S>,
                      iterate: IterateFunc<S>,
                      resultSelector: ResultFunc<S, T>,
                      scheduler?: SchedulerLike
                      ): Observable<T>;
                      <S>(
                      initialState: S,
                      condition: ConditionFunc<S>,
                      iterate: IterateFunc<S>,
                      scheduler?: SchedulerLike
                      ): Observable<S>;
                      <S>(options: GenerateBaseOptions<S>): Observable<S>;
                      <T, S>(options: GenerateOptions<T, S>): Observable<T>;
                      };
                      • Generates an observable sequence by running a state-driven loop producing the sequence's elements, using the specified scheduler to send out observer messages.

                        ![](generate.png)

                        ## Examples

                        ### Produces sequences of number

                        import { generate } from 'rxjs';
                        const result = generate(0, x => x < 3, x => x + 1, x => x);
                        result.subscribe(x => console.log(x));
                        // Logs:
                        // 0
                        // 1
                        // 2

                        ### Use asap scheduler

                        import { generate } from 'rxjs';
                        const result = generate(1, x => x < 5, x => x * 2, x => x + 1, asap);
                        result.subscribe(x => console.log(x));
                        // Logs:
                        // 2
                        // 3
                        // 5

                        Parameter initialState

                        Initial state.

                        Parameter condition

                        Condition to terminate generation (upon returning false).

                        Parameter iterate

                        Iteration step function.

                        Parameter resultSelector

                        Selector function for results produced in the sequence. (deprecated)

                        Parameter scheduler

                        A SchedulerLike on which to run the generator loop. If not provided, defaults to emit immediately.

                        Returns

                        {Observable} The generated sequence.

                        See Also

                        Deprecated

                        Instead of passing separate arguments, use the options argument. Signatures taking separate arguments will be removed in v8.

                      • Generates an Observable by running a state-driven loop that emits an element on each iteration.

                        Use it instead of nexting values in a for loop.

                        ![](generate.png)

                        generate allows you to create a stream of values generated with a loop very similar to a traditional for loop. The first argument of generate is a beginning value. The second argument is a function that accepts this value and tests if some condition still holds. If it does, then the loop continues, if not, it stops. The third value is a function which takes the previously defined value and modifies it in some way on each iteration. Note how these three parameters are direct equivalents of three expressions in a traditional for loop: the first expression initializes some state (for example, a numeric index), the second tests if the loop can perform the next iteration (for example, if the index is lower than 10) and the third states how the defined value will be modified on every step (for example, the index will be incremented by one).

                        Return value of a generate operator is an Observable that on each loop iteration emits a value. First of all, the condition function is ran. If it returns true, then the Observable emits the currently stored value (initial value at the first iteration) and finally updates that value with iterate function. If at some point the condition returns false, then the Observable completes at that moment.

                        Optionally you can pass a fourth parameter to generate - a result selector function which allows you to immediately map the value that would normally be emitted by an Observable.

                        If you find three anonymous functions in generate call hard to read, you can provide a single object to the operator instead where the object has the properties: initialState, condition, iterate and resultSelector, which should have respective values that you would normally pass to generate. resultSelector is still optional, but that form of calling generate allows you to omit condition as well. If you omit it, that means condition always holds, or in other words the resulting Observable will never complete.

                        Both forms of generate can optionally accept a scheduler. In case of a multi-parameter call, scheduler simply comes as a last argument (no matter if there is a resultSelector function or not). In case of a single-parameter call, you can provide it as a scheduler property on the object passed to the operator. In both cases, a scheduler decides when the next iteration of the loop will happen and therefore when the next value will be emitted by the Observable. For example, to ensure that each value is pushed to the Observer on a separate task in the event loop, you could use the async scheduler. Note that by default (when no scheduler is passed) values are simply emitted synchronously.

                        ## Examples

                        ### Use with condition and iterate functions

                        import { generate } from 'rxjs';
                        const result = generate(0, x => x < 3, x => x + 1);
                        result.subscribe({
                        next: value => console.log(value),
                        complete: () => console.log('Complete!')
                        });
                        // Logs:
                        // 0
                        // 1
                        // 2
                        // "Complete!"

                        ### Use with condition, iterate and resultSelector functions

                        import { generate } from 'rxjs';
                        const result = generate(0, x => x < 3, x => x + 1, x => x * 1000);
                        result.subscribe({
                        next: value => console.log(value),
                        complete: () => console.log('complete!')
                        });
                        // Logs:
                        // 0
                        // 1000
                        // 2000
                        // "complete!"

                        ### Use with options object

                        import { generate } from 'rxjs';
                        const result = generate({
                        initialState: 0,
                        condition(value) { return value < 3; },
                        iterate(value) { return value + 1; },
                        resultSelector(value) { return value * 1000; }
                        });
                        result.subscribe({
                        next: value => console.log(value),
                        complete: () => console.log('complete!')
                        });
                        // Logs:
                        // 0
                        // 1000
                        // 2000
                        // "Complete!"

                        ### Use options object without condition function

                        import { generate } from 'rxjs';
                        const result = generate({
                        initialState: 0,
                        iterate(value) { return value + 1; },
                        resultSelector(value) { return value * 1000; }
                        });
                        result.subscribe({
                        next: value => console.log(value),
                        complete: () => console.log('complete!') // This will never run
                        });
                        // Logs:
                        // 0
                        // 1000
                        // 2000
                        // 3000
                        // ...and never stops.

                        Parameter initialState

                        Initial state.

                        Parameter condition

                        Condition to terminate generation (upon returning false).

                        Parameter iterate

                        Iteration step function.

                        Parameter resultSelector

                        Selector function for results produced in the sequence.

                        Parameter scheduler

                        A Scheduler on which to run the generator loop. If not provided, defaults to emitting immediately. {Observable} The generated sequence.

                        See Also

                        Deprecated

                        Instead of passing separate arguments, use the options argument. Signatures taking separate arguments will be removed in v8.

                      • Generates an observable sequence by running a state-driven loop producing the sequence's elements, using the specified scheduler to send out observer messages. The overload accepts options object that might contain initial state, iterate, condition and scheduler.

                        ![](generate.png)

                        ## Examples

                        ### Use options object with condition function

                        import { generate } from 'rxjs';
                        const result = generate({
                        initialState: 0,
                        condition: x => x < 3,
                        iterate: x => x + 1,
                        });
                        result.subscribe({
                        next: value => console.log(value),
                        complete: () => console.log('complete!')
                        });
                        // Logs:
                        // 0
                        // 1
                        // 2
                        // "Complete!".

                        Parameter options

                        Object that must contain initialState, iterate and might contain condition and scheduler.

                        Returns

                        {Observable} The generated sequence.

                        See Also

                      • Generates an observable sequence by running a state-driven loop producing the sequence's elements, using the specified scheduler to send out observer messages. The overload accepts options object that might contain initial state, iterate, condition, result selector and scheduler.

                        ![](generate.png)

                        ## Examples

                        ### Use options object with condition and iterate function

                        import { generate } from 'rxjs';
                        const result = generate({
                        initialState: 0,
                        condition: x => x < 3,
                        iterate: x => x + 1,
                        resultSelector: x => x,
                        });
                        result.subscribe({
                        next: value => console.log(value),
                        complete: () => console.log('complete!')
                        });
                        // Logs:
                        // 0
                        // 1
                        // 2
                        // "Complete!".

                        Parameter options

                        Object that must contain initialState, iterate, resultSelector and might contain condition and scheduler.

                        Returns

                        {Observable} The generated sequence.

                        See Also

                      function groupBy

                      groupBy: {
                      <T, K>(
                      key: (value: T) => K,
                      options: BasicGroupByOptions<K, T>
                      ): OperatorFunction<T, GroupedObservable<K, T>>;
                      <T, K, E>(
                      key: (value: T) => K,
                      options: GroupByOptionsWithElement<K, E, T>
                      ): OperatorFunction<T, GroupedObservable<K, E>>;
                      <T, K extends T>(key: (value: T) => value is K): OperatorFunction<
                      T,
                      GroupedObservable<true, K> | GroupedObservable<false, Exclude<T, K>>
                      >;
                      <T, K>(key: (value: T) => K): OperatorFunction<T, GroupedObservable<K, T>>;
                      <T, K>(
                      key: (value: T) => K,
                      element: void,
                      duration: (grouped: GroupedObservable<K, T>) => Observable<any>
                      ): OperatorFunction<T, GroupedObservable<K, T>>;
                      <T, K, R>(
                      key: (value: T) => K,
                      element?: (value: T) => R,
                      duration?: (grouped: GroupedObservable<K, R>) => Observable<any>
                      ): OperatorFunction<T, GroupedObservable<K, R>>;
                      <T, K, R>(
                      key: (value: T) => K,
                      element?: (value: T) => R,
                      duration?: (grouped: GroupedObservable<K, R>) => Observable<any>,
                      connector?: () => Subject<R>
                      ): OperatorFunction<T, GroupedObservable<K, R>>;
                      };
                      • Deprecated

                        use the options parameter instead.

                      • Groups the items emitted by an Observable according to a specified criterion, and emits these grouped items as GroupedObservables, one GroupedObservable per group.

                        ![](groupBy.png)

                        When the Observable emits an item, a key is computed for this item with the key function.

                        If a GroupedObservable for this key exists, this GroupedObservable emits. Otherwise, a new GroupedObservable for this key is created and emits.

                        A GroupedObservable represents values belonging to the same group represented by a common key. The common key is available as the key field of a GroupedObservable instance.

                        The elements emitted by GroupedObservables are by default the items emitted by the Observable, or elements returned by the element function.

                        ## Examples

                        ### Group objects by id and return as array

                        import { of } from 'rxjs';
                        import { mergeMap, groupBy, reduce } from 'rxjs/operators';
                        of(
                        {id: 1, name: 'JavaScript'},
                        {id: 2, name: 'Parcel'},
                        {id: 2, name: 'webpack'},
                        {id: 1, name: 'TypeScript'},
                        {id: 3, name: 'TSLint'}
                        ).pipe(
                        groupBy(p => p.id),
                        mergeMap((group$) => group$.pipe(reduce((acc, cur) => [...acc, cur], [])))
                        )
                        .subscribe(p => console.log(p));
                        // displays:
                        // [ { id: 1, name: 'JavaScript'},
                        // { id: 1, name: 'TypeScript'} ]
                        //
                        // [ { id: 2, name: 'Parcel'},
                        // { id: 2, name: 'webpack'} ]
                        //
                        // [ { id: 3, name: 'TSLint'} ]

                        ### Pivot data on the id field

                        import { of } from 'rxjs';
                        import { groupBy, map, mergeMap, reduce } from 'rxjs/operators';
                        of(
                        { id: 1, name: 'JavaScript' },
                        { id: 2, name: 'Parcel' },
                        { id: 2, name: 'webpack' },
                        { id: 1, name: 'TypeScript' },
                        { id: 3, name: 'TSLint' }
                        )
                        .pipe(
                        groupBy(p => p.id, { element: p => p.name }),
                        mergeMap(group$ =>
                        group$.pipe(reduce((acc, cur) => [...acc, cur], [`${group$.key}`]))
                        ),
                        map(arr => ({ id: parseInt(arr[0], 10), values: arr.slice(1) }))
                        )
                        .subscribe(p => console.log(p));
                        // displays:
                        // { id: 1, values: [ 'JavaScript', 'TypeScript' ] }
                        // { id: 2, values: [ 'Parcel', 'webpack' ] }
                        // { id: 3, values: [ 'TSLint' ] }

                        Parameter key

                        A function that extracts the key for each item.

                        Parameter element

                        A function that extracts the return element for each item.

                        Parameter duration

                        A function that returns an Observable to determine how long each group should exist.

                        Parameter connector

                        Factory function to create an intermediate Subject through which grouped elements are emitted. A function that returns an Observable that emits GroupedObservables, each of which corresponds to a unique key value and each of which emits those items from the source Observable that share that key value.

                        Deprecated

                        Use the options parameter instead.

                      function identity

                      identity: <T>(x: T) => T;

                        function ignoreElements

                        ignoreElements: () => OperatorFunction<any, never>;
                        • Ignores all items emitted by the source Observable and only passes calls of complete or error.

                          ![](ignoreElements.png)

                          The _IgnoreElements_ operator suppresses all of the items emitted by the source Observable, but allows its termination notification (either error or complete) to pass through unchanged.

                          If you do not care about the items being emitted by an Observable, but you do want to be notified when it completes or when it terminates with an error, you can apply the ignoreElements operator to the Observable, which will ensure that it will never call its observers’ next handlers.

                          ## Examples

                          import { of } from 'rxjs';
                          import { ignoreElements } from 'rxjs/operators';
                          of('you', 'talking', 'to', 'me').pipe(
                          ignoreElements(),
                          )
                          .subscribe({
                          next: word => console.log(word),
                          error: err => console.log('error:', err),
                          complete: () => console.log('the end'),
                          });
                          // result:
                          // 'the end'

                          A function that returns an empty Observable that only calls complete or error, based on which one is called by the source Observable.

                        function iif

                        iif: <T, F>(
                        condition: () => boolean,
                        trueResult: ObservableInput<T>,
                        falseResult: ObservableInput<F>
                        ) => Observable<T | F>;
                        • Checks a boolean at subscription time, and chooses between one of two observable sources

                          iif excepts a function that returns a boolean (the condition function), and two sources, the trueResult and the falseResult, and returns an Observable.

                          At the moment of subscription, the condition function is called. If the result is true, the subscription will be to the source passed as the trueResult, otherwise, the subscription will be to the source passed as the falseResult.

                          If you need to check more than two options to choose between more than one observable, have a look at the defer creation method.

                          ## Examples

                          ### Change at runtime which Observable will be subscribed

                          import { iif, of } from 'rxjs';
                          let subscribeToFirst;
                          const firstOrSecond = iif(
                          () => subscribeToFirst,
                          of('first'),
                          of('second'),
                          );
                          subscribeToFirst = true;
                          firstOrSecond.subscribe(value => console.log(value));
                          // Logs:
                          // "first"
                          subscribeToFirst = false;
                          firstOrSecond.subscribe(value => console.log(value));
                          // Logs:
                          // "second"

                          ### Control an access to an Observable

                          let accessGranted;
                          const observableIfYouHaveAccess = iif(
                          () => accessGranted,
                          of('It seems you have an access...'), // Note that only one Observable is passed to the operator.
                          );
                          accessGranted = true;
                          observableIfYouHaveAccess.subscribe(
                          value => console.log(value),
                          err => {},
                          () => console.log('The end'),
                          );
                          // Logs:
                          // "It seems you have an access..."
                          // "The end"
                          accessGranted = false;
                          observableIfYouHaveAccess.subscribe(
                          value => console.log(value),
                          err => {},
                          () => console.log('The end'),
                          );
                          // Logs:
                          // "The end"

                          Parameter condition

                          Condition which Observable should be chosen.

                          Parameter trueResult

                          An Observable that will be subscribed if condition is true.

                          Parameter falseResult

                          An Observable that will be subscribed if condition is false. An observable that proxies to trueResult or falseResult, depending on the result of the condition function.

                          See Also

                        function interval

                        interval: (period?: number, scheduler?: SchedulerLike) => Observable<number>;
                        • Creates an Observable that emits sequential numbers every specified interval of time, on a specified SchedulerLike.

                          Emits incremental numbers periodically in time.

                          ![](interval.png)

                          interval returns an Observable that emits an infinite sequence of ascending integers, with a constant interval of time of your choosing between those emissions. The first emission is not sent immediately, but only after the first period has passed. By default, this operator uses the async SchedulerLike to provide a notion of time, but you may pass any SchedulerLike to it.

                          ## Example Emits ascending numbers, one every second (1000ms) up to the number 3

                          import { interval } from 'rxjs';
                          import { take } from 'rxjs/operators';
                          const numbers = interval(1000);
                          const takeFourNumbers = numbers.pipe(take(4));
                          takeFourNumbers.subscribe(x => console.log('Next: ', x));
                          // Logs:
                          // Next: 0
                          // Next: 1
                          // Next: 2
                          // Next: 3

                          Parameter period

                          The interval size in milliseconds (by default) or the time unit determined by the scheduler's clock.

                          Parameter scheduler

                          The SchedulerLike to use for scheduling the emission of values, and providing a notion of "time". {Observable} An Observable that emits a sequential number each time interval.

                          See Also

                        function isEmpty

                        isEmpty: <T>() => OperatorFunction<T, boolean>;
                        • Emits false if the input Observable emits any values, or emits true if the input Observable completes without emitting any values.

                          Tells whether any values are emitted by an Observable.

                          ![](isEmpty.png)

                          isEmpty transforms an Observable that emits values into an Observable that emits a single boolean value representing whether or not any values were emitted by the source Observable. As soon as the source Observable emits a value, isEmpty will emit a false and complete. If the source Observable completes having not emitted anything, isEmpty will emit a true and complete.

                          A similar effect could be achieved with count, but isEmpty can emit a false value sooner.

                          ## Examples

                          Emit false for a non-empty Observable.

                          import { Subject } from 'rxjs';
                          import { isEmpty } from 'rxjs/operators';
                          const source = new Subject<string>();
                          const result = source.pipe(isEmpty());
                          source.subscribe(x => console.log(x));
                          result.subscribe(x => console.log(x));
                          source.next('a');
                          source.next('b');
                          source.next('c');
                          source.complete();
                          // Outputs
                          // a
                          // false
                          // b
                          // c

                          Emit true for an empty Observable.

                          import { EMPTY } from 'rxjs';
                          import { isEmpty } from 'rxjs/operators';
                          const result = EMPTY.pipe(isEmpty());
                          result.subscribe(x => console.log(x));
                          // Outputs
                          // true

                          See Also

                          • count

                          • A function that returns an Observable that emits boolean value indicating whether the source Observable was empty or not.

                        function isObservable

                        isObservable: (obj: any) => obj is Observable<unknown>;
                        • Tests to see if the object is an RxJS Observable

                          Parameter obj

                          the object to test

                        function last

                        last: {
                        <T>(predicate: BooleanConstructor): OperatorFunction<T, TruthyTypesOf<T>>;
                        <T, D>(predicate: BooleanConstructor, defaultValue: D): OperatorFunction<
                        T,
                        D | TruthyTypesOf<T>
                        >;
                        <T, D = T>(predicate?: null, defaultValue?: D): OperatorFunction<T, T | D>;
                        <T, S extends T>(
                        predicate: (value: T, index: number, source: Observable<T>) => value is S,
                        defaultValue?: S
                        ): OperatorFunction<T, S>;
                        <T, D = T>(
                        predicate: (value: T, index: number, source: Observable<T>) => boolean,
                        defaultValue?: D
                        ): OperatorFunction<T, T | D>;
                        };

                          function lastValueFrom

                          lastValueFrom: {
                          <T, D>(source: Observable<T>, config: LastValueFromConfig<D>): Promise<T | D>;
                          <T>(source: Observable<T>): Promise<T>;
                          };

                            function map

                            map: {
                            <T, R>(project: (value: T, index: number) => R): OperatorFunction<T, R>;
                            <T, R, A>(
                            project: (this: A, value: T, index: number) => R,
                            thisArg: A
                            ): OperatorFunction<T, R>;
                            };
                            • Deprecated

                              Use a closure instead of a thisArg. Signatures accepting a thisArg will be removed in v8.

                            function mapTo

                            mapTo: {
                            <R>(value: R): OperatorFunction<any, R>;
                            <T, R>(value: R): OperatorFunction<T, R>;
                            };
                            • Deprecated

                              Do not specify explicit type parameters. Signatures with type parameters that cannot be inferred will be removed in v8.

                            function materialize

                            materialize: <T>() => OperatorFunction<
                            T,
                            Notification<T> & ObservableNotification<T>
                            >;
                            • Represents all of the notifications from the source Observable as next emissions marked with their original types within Notification objects.

                              Wraps next, error and complete emissions in Notification objects, emitted as next on the output Observable.

                              ![](materialize.png)

                              materialize returns an Observable that emits a next notification for each next, error, or complete emission of the source Observable. When the source Observable emits complete, the output Observable will emit next as a Notification of type "complete", and then it will emit complete as well. When the source Observable emits error, the output will emit next as a Notification of type "error", and then complete.

                              This operator is useful for producing metadata of the source Observable, to be consumed as next emissions. Use it in conjunction with dematerialize.

                              ## Example

                              Convert a faulty Observable to an Observable of Notifications

                              import { of } from 'rxjs';
                              import { materialize, map } from 'rxjs/operators';
                              const letters = of('a', 'b', 13, 'd');
                              const upperCase = letters.pipe(map(x => x.toUpperCase()));
                              const materialized = upperCase.pipe(materialize());
                              materialized.subscribe(x => console.log(x));
                              // Results in the following:
                              // - Notification {kind: "N", value: "A", error: undefined, hasValue: true}
                              // - Notification {kind: "N", value: "B", error: undefined, hasValue: true}
                              // - Notification {kind: "E", value: undefined, error: TypeError:
                              // x.toUpperCase is not a function at MapSubscriber.letters.map.x
                              // [as project] (http://1…, hasValue: false}

                              See Also

                            function max

                            max: <T>(comparer?: (x: T, y: T) => number) => MonoTypeOperatorFunction<T>;
                            • The Max operator operates on an Observable that emits numbers (or items that can be compared with a provided function), and when source Observable completes it emits a single item: the item with the largest value.

                              ![](max.png)

                              ## Examples Get the maximal value of a series of numbers

                              import { of } from 'rxjs';
                              import { max } from 'rxjs/operators';
                              of(5, 4, 7, 2, 8).pipe(
                              max(),
                              )
                              .subscribe(x => console.log(x)); // -> 8

                              Use a comparer function to get the maximal item

                              import { of } from 'rxjs';
                              import { max } from 'rxjs/operators';
                              interface Person {
                              age: number,
                              name: string
                              }
                              of(
                              {age: 7, name: 'Foo'},
                              {age: 5, name: 'Bar'},
                              {age: 9, name: 'Beer'},
                              ).pipe(
                              max<Person>((a: Person, b: Person) => a.age < b.age ? -1 : 1),
                              )
                              .subscribe((x: Person) => console.log(x.name)); // -> 'Beer'

                              Parameter comparer

                              Optional comparer function that it will use instead of its default to compare the value of two items. A function that returns an Observable that emits item with the largest value.

                              See Also

                            function merge

                            merge: {
                            <A extends readonly unknown[]>(
                            ...sources_0: ObservableInputTuple<A>
                            ): Observable<A[number]>;
                            <A extends readonly unknown[]>(
                            ...sourcesAndConcurrency: [...ObservableInputTuple<A>, number?]
                            ): Observable<A[number]>;
                            <A extends readonly unknown[]>(
                            ...sourcesAndScheduler: [...ObservableInputTuple<A>, SchedulerLike?]
                            ): Observable<A[number]>;
                            <A extends readonly unknown[]>(
                            ...sourcesAndConcurrencyAndScheduler: [
                            ...ObservableInputTuple<A>,
                            number?,
                            SchedulerLike?
                            ]
                            ): Observable<A[number]>;
                            };
                            • Deprecated

                              The scheduler parameter will be removed in v8. Use scheduled and mergeAll. Details: https://rxjs.dev/deprecations/scheduler-argument

                            function mergeAll

                            mergeAll: <O extends ObservableInput<any>>(
                            concurrent?: number
                            ) => OperatorFunction<O, ObservedValueOf<O>>;
                            • Converts a higher-order Observable into a first-order Observable which concurrently delivers all values that are emitted on the inner Observables.

                              Flattens an Observable-of-Observables.

                              ![](mergeAll.png)

                              mergeAll subscribes to an Observable that emits Observables, also known as a higher-order Observable. Each time it observes one of these emitted inner Observables, it subscribes to that and delivers all the values from the inner Observable on the output Observable. The output Observable only completes once all inner Observables have completed. Any error delivered by a inner Observable will be immediately emitted on the output Observable.

                              ## Examples Spawn a new interval Observable for each click event, and blend their outputs as one Observable

                              import { fromEvent, interval } from 'rxjs';
                              import { map, mergeAll } from 'rxjs/operators';
                              const clicks = fromEvent(document, 'click');
                              const higherOrder = clicks.pipe(map((ev) => interval(1000)));
                              const firstOrder = higherOrder.pipe(mergeAll());
                              firstOrder.subscribe(x => console.log(x));

                              Count from 0 to 9 every second for each click, but only allow 2 concurrent timers

                              import { fromEvent, interval } from 'rxjs';
                              import { take, map, mergeAll } from 'rxjs/operators';
                              const clicks = fromEvent(document, 'click');
                              const higherOrder = clicks.pipe(
                              map((ev) => interval(1000).pipe(take(10))),
                              );
                              const firstOrder = higherOrder.pipe(mergeAll(2));
                              firstOrder.subscribe(x => console.log(x));

                              Parameter concurrent

                              Maximum number of inner Observables being subscribed to concurrently. A function that returns an Observable that emits values coming from all the inner Observables emitted by the source Observable.

                              See Also

                            function mergeMap

                            mergeMap: {
                            <T, O extends ObservableInput<any>>(
                            project: (value: T, index: number) => O,
                            concurrent?: number
                            ): OperatorFunction<T, ObservedValueOf<O>>;
                            <T, O extends ObservableInput<any>>(
                            project: (value: T, index: number) => O,
                            resultSelector: undefined,
                            concurrent?: number
                            ): OperatorFunction<T, ObservedValueOf<O>>;
                            <T, R, O extends ObservableInput<any>>(
                            project: (value: T, index: number) => O,
                            resultSelector: (
                            outerValue: T,
                            innerValue: ObservedValueOf<O>,
                            outerIndex: number,
                            innerIndex: number
                            ) => R,
                            concurrent?: number
                            ): OperatorFunction<T, R>;
                            };
                            • Deprecated

                              The resultSelector parameter will be removed in v8. Use an inner map instead. Details: https://rxjs.dev/deprecations/resultSelector

                            function mergeMapTo

                            mergeMapTo: {
                            <O extends ObservableInput<unknown>>(
                            innerObservable: O,
                            concurrent?: number
                            ): OperatorFunction<any, ObservedValueOf<O>>;
                            <T, R, O extends ObservableInput<unknown>>(
                            innerObservable: O,
                            resultSelector: (
                            outerValue: T,
                            innerValue: ObservedValueOf<O>,
                            outerIndex: number,
                            innerIndex: number
                            ) => R,
                            concurrent?: number
                            ): OperatorFunction<T, R>;
                            };
                            • Deprecated

                              The resultSelector parameter will be removed in v8. Use an inner map instead. Details: https://rxjs.dev/deprecations/resultSelector

                            function mergeScan

                            mergeScan: <T, R>(
                            accumulator: (acc: R, value: T, index: number) => ObservableInput<R>,
                            seed: R,
                            concurrent?: number
                            ) => OperatorFunction<T, R>;
                            • Applies an accumulator function over the source Observable where the accumulator function itself returns an Observable, then each intermediate Observable returned is merged into the output Observable.

                              It's like scan, but the Observables returned by the accumulator are merged into the outer Observable.

                              The first parameter of the mergeScan is an accumulator function which is being called every time the source Observable emits a value. mergeScan will subscribe to the value returned by the accumulator function and will emit values to the subscriber emitted by inner Observable.

                              The accumulator function is being called with three parameters passed to it: acc, value and index. The acc parameter is used as the state parameter whose value is initially set to the seed parameter (the second parameter passed to the mergeScan operator).

                              mergeScan internally keeps the value of the acc parameter: as long as the source Observable emits without inner Observable emitting, the acc will be set to seed. The next time the inner Observable emits a value, mergeScan will internally remember it and it will be passed to the accumulator function as acc parameter the next time source emits.

                              The value parameter of the accumulator function is the value emitted by the source Observable, while the index is a number which represent the order of the current emission by the source Observable. It starts with 0.

                              The last parameter to the mergeScan is the concurrent value which defaults to Infinity. It represent the maximum number of inner Observable subscriptions at a time.

                              ## Example Count the number of click events

                              import { fromEvent, of } from 'rxjs';
                              import { mapTo, mergeScan } from 'rxjs/operators';
                              const click$ = fromEvent(document, 'click');
                              const one$ = click$.pipe(mapTo(1));
                              const seed = 0;
                              const count$ = one$.pipe(
                              mergeScan((acc, one) => of(acc + one), seed),
                              );
                              count$.subscribe(x => console.log(x));
                              // Results:
                              // 1
                              // 2
                              // 3
                              // 4
                              // ...and so on for each click

                              Parameter accumulator

                              The accumulator function called on each source value.

                              Parameter seed

                              The initial accumulation value.

                              Parameter concurrent

                              Maximum number of input Observables being subscribed to concurrently. A function that returns an Observable of the accumulated values.

                              See Also

                            function mergeWith

                            mergeWith: <T, A extends readonly unknown[]>(
                            ...otherSources_0: ObservableInputTuple<A>
                            ) => OperatorFunction<T, T | A[number]>;
                            • Merge the values from all observables to an single observable result.

                              Creates an observable, that when subscribed to, subscribes to the source observable, and all other sources provided as arguments. All values from every source are emitted from the resulting subscription.

                              When all sources complete, the resulting observable will complete.

                              When any one source errors, the resulting observable will error.

                              ### Example

                              Joining all outputs from multiple user input event streams:

                              import { fromEvent } from 'rxjs';
                              import { map, mergeWith } from 'rxjs/operators';
                              const clicks$ = fromEvent(document, 'click').pipe(map(() => 'click'));
                              const mousemoves$ = fromEvent(document, 'mousemove').pipe(map(() => 'mousemove'));
                              const dblclicks$ = fromEvent(document, 'dblclick').pipe(map(() => 'dblclick'));
                              mousemoves$.pipe(
                              mergeWith(clicks$, dblclicks$),
                              )
                              .subscribe(x => console.log(x));
                              // result (assuming user interactions)
                              // "mousemove"
                              // "mousemove"
                              // "mousemove"
                              // "click"
                              // "click"
                              // "dblclick"

                              Parameter otherSources

                              the sources to combine the current source with. A function that returns an Observable that merges the values from all given Observables.

                            function min

                            min: <T>(comparer?: (x: T, y: T) => number) => MonoTypeOperatorFunction<T>;
                            • The Min operator operates on an Observable that emits numbers (or items that can be compared with a provided function), and when source Observable completes it emits a single item: the item with the smallest value.

                              ![](min.png)

                              ## Examples Get the minimal value of a series of numbers

                              import { of } from 'rxjs';
                              import { min } from 'rxjs/operators';
                              of(5, 4, 7, 2, 8).pipe(
                              min(),
                              )
                              .subscribe(x => console.log(x)); // -> 2

                              Use a comparer function to get the minimal item

                              import { of } from 'rxjs';
                              import { min } from 'rxjs/operators';
                              interface Person {
                              age: number,
                              name: string
                              }
                              of(
                              {age: 7, name: 'Foo'},
                              {age: 5, name: 'Bar'},
                              {age: 9, name: 'Beer'},
                              ).pipe(
                              min<Person>( (a: Person, b: Person) => a.age < b.age ? -1 : 1),
                              )
                              .subscribe((x: Person) => console.log(x.name)); // -> 'Bar'

                              Parameter comparer

                              Optional comparer function that it will use instead of its default to compare the value of two items. A function that returns an Observable that emits item with the smallest value.

                              See Also

                            function multicast

                            multicast: {
                            <T>(subject: Subject<T>): UnaryFunction<Observable<T>, ConnectableObservable<T>>;
                            <T, O extends ObservableInput<any>>(
                            subject: Subject<T>,
                            selector: (shared: Observable<T>) => O
                            ): OperatorFunction<T, ObservedValueOf<O>>;
                            <T>(subjectFactory: () => Subject<T>): UnaryFunction<
                            Observable<T>,
                            ConnectableObservable<T>
                            >;
                            <T, O extends ObservableInput<any>>(
                            subjectFactory: () => Subject<T>,
                            selector: (shared: Observable<T>) => O
                            ): OperatorFunction<T, ObservedValueOf<O>>;
                            };
                            • An operator that creates a ConnectableObservable, that when connected, with the connect method, will use the provided subject to multicast the values from the source to all consumers.

                              Parameter subject

                              The subject to multicast through. A function that returns a ConnectableObservable

                              Deprecated

                              Will be removed in v8. To create a connectable observable, use connectable. If you're using refCount after multicast, use the share operator instead. multicast(subject), refCount() is equivalent to share({ connector: () => subject, resetOnError: false, resetOnComplete: false, resetOnRefCountZero: false }). Details: https://rxjs.dev/deprecations/multicasting

                            • Because this is deprecated in favor of the connect operator, and was otherwise poorly documented, rather than duplicate the effort of documenting the same behavior, please see documentation for the connect operator.

                              Parameter subject

                              The subject used to multicast.

                              Parameter selector

                              A setup function to setup the multicast A function that returns an observable that mirrors the observable returned by the selector.

                              Deprecated

                              Will be removed in v8. Use the connect operator instead. multicast(subject, selector) is equivalent to connect(selector, { connector: () => subject }). Details: https://rxjs.dev/deprecations/multicasting

                            • An operator that creates a ConnectableObservable, that when connected, with the connect method, will use the provided subject to multicast the values from the source to all consumers.

                              Parameter subjectFactory

                              A factory that will be called to create the subject. Passing a function here will cause the underlying subject to be "reset" on error, completion, or refCounted unsubscription of the source. A function that returns a ConnectableObservable

                              Deprecated

                              Will be removed in v8. To create a connectable observable, use connectable. If you're using refCount after multicast, use the share operator instead. multicast(() => new BehaviorSubject('test')), refCount() is equivalent to share({ connector: () => new BehaviorSubject('test') }). Details: https://rxjs.dev/deprecations/multicasting

                            • Because this is deprecated in favor of the connect operator, and was otherwise poorly documented, rather than duplicate the effort of documenting the same behavior, please see documentation for the connect operator.

                              Parameter subjectFactory

                              A factory that creates the subject used to multicast.

                              Parameter selector

                              A function to setup the multicast and select the output. A function that returns an observable that mirrors the observable returned by the selector.

                              Deprecated

                              Will be removed in v8. Use the connect operator instead. multicast(subjectFactory, selector) is equivalent to connect(selector, { connector: subjectFactory }). Details: https://rxjs.dev/deprecations/multicasting

                            function never

                            never: () => Observable<never>;
                            • Deprecated

                              Replaced with the NEVER constant. Will be removed in v8.

                            function noop

                            noop: () => void;

                              function observeOn

                              observeOn: <T>(
                              scheduler: SchedulerLike,
                              delay?: number
                              ) => MonoTypeOperatorFunction<T>;
                              • Re-emits all notifications from source Observable with specified scheduler.

                                Ensure a specific scheduler is used, from outside of an Observable.

                                observeOn is an operator that accepts a scheduler as a first parameter, which will be used to reschedule notifications emitted by the source Observable. It might be useful, if you do not have control over internal scheduler of a given Observable, but want to control when its values are emitted nevertheless.

                                Returned Observable emits the same notifications (nexted values, complete and error events) as the source Observable, but rescheduled with provided scheduler. Note that this doesn't mean that source Observables internal scheduler will be replaced in any way. Original scheduler still will be used, but when the source Observable emits notification, it will be immediately scheduled again - this time with scheduler passed to observeOn. An anti-pattern would be calling observeOn on Observable that emits lots of values synchronously, to split that emissions into asynchronous chunks. For this to happen, scheduler would have to be passed into the source Observable directly (usually into the operator that creates it). observeOn simply delays notifications a little bit more, to ensure that they are emitted at expected moments.

                                As a matter of fact, observeOn accepts second parameter, which specifies in milliseconds with what delay notifications will be emitted. The main difference between delay operator and observeOn is that observeOn will delay all notifications - including error notifications - while delay will pass through error from source Observable immediately when it is emitted. In general it is highly recommended to use delay operator for any kind of delaying of values in the stream, while using observeOn to specify which scheduler should be used for notification emissions in general.

                                ## Example

                                Ensure values in subscribe are called just before browser repaint.

                                import { interval, animationFrameScheduler } from 'rxjs';
                                import { observeOn } from 'rxjs/operators';
                                const someDiv = document.createElement('div');
                                someDiv.style.cssText = 'width: 200px;background: #09c';
                                document.body.appendChild(someDiv);
                                const intervals = interval(10); // Intervals are scheduled
                                // with async scheduler by default...
                                intervals.pipe(
                                observeOn(animationFrameScheduler), // ...but we will observe on animationFrame
                                ) // scheduler to ensure smooth animation.
                                .subscribe(val => {
                                someDiv.style.height = val + 'px';
                                });

                                Parameter scheduler

                                Scheduler that will be used to reschedule notifications from source Observable.

                                Parameter delay

                                Number of milliseconds that states with what delay every notification should be rescheduled. A function that returns an Observable that emits the same notifications as the source Observable, but with provided scheduler.

                                See Also

                              function of

                              of: {
                              (value: null): Observable<null>;
                              (value: undefined): Observable<undefined>;
                              (scheduler: SchedulerLike): Observable<never>;
                              <A extends readonly unknown[]>(
                              ...valuesAndScheduler: [...A, SchedulerLike]
                              ): Observable<ValueFromArray<A>>;
                              (): Observable<never>;
                              <T>(): Observable<T>;
                              <T>(value: T): Observable<T>;
                              <A extends readonly unknown[]>(...values: A): Observable<ValueFromArray<A>>;
                              };
                              • Deprecated

                                The scheduler parameter will be removed in v8. Use scheduled. Details: https://rxjs.dev/deprecations/scheduler-argument

                              • Deprecated

                                Do not specify explicit type parameters. Signatures with type parameters that cannot be inferred will be removed in v8.

                              function onErrorResumeNext

                              onErrorResumeNext: {
                              <A extends readonly unknown[]>(
                              sources: [...ObservableInputTuple<A>]