Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

  • concatBoolean(mergeType?: MergeType): OperatorFunction<boolean[], boolean>
  • Concatenates an array of boolean values into a single boolean value based on the specified merge type.

    example

    // Concatenates an array of boolean values into a single boolean value based on logical AND const input$: Observable<boolean[]> = of([true, false, true]);

    input$.pipe(concatBoolean('and')).subscribe((result: boolean) => { ... })

    Parameters

    • Optional mergeType: MergeType

    Returns OperatorFunction<boolean[], boolean>

    • An operator that concatenates boolean values based on the specified merge type.
  • concatJoin<T>(...sources: Observable<T>[]): Observable<T[]>
  • debounceDistinctLengthFilter(options?: DebounceDistinctLengthFilterOptions): OperatorFunction<string, string>
  • distinctUntilSerializedChanged<T>(): MonoTypeOperatorFunction<T>
  • Filters out consecutive emissions from the source observable that have the same serialized representation.

    example

    // Filters out consecutive emissions from the source observable // that have the same serialized representation of an object with type User const source$: Observable = from([ { id: 1, name: 'test' }, { id: 1, name: 'test' }, { id: 1, name: 'test' } ]);

    source$.pipe(distinctUntilSerializedChanged()).subscribe((output: User) => { ... })

    Type Parameters

    • T

      The type of elements emitted by the source observable.

    Returns MonoTypeOperatorFunction<T>

    • An operator that filters out consecutive equal values based on their serialized representation.
  • filterByInstanceOf<I>(...types: Constructor<I>[]): OperatorFunction<unknown, I>
  • Filters the values emitted by the source observable based on the instance of specified types.

    example

    // Filters the values produced by the source observable based on an instance of the specified SomeClass instance type const input$: Observable = from([1, 'string', { name: 'Some name' }, new SomeClass()]);

    input$ .pipe(filterByInstanceOf(SomeClass))

    Type Parameters

    • I

      The type of instances to filter for in the source observable.

    Parameters

    • Rest ...types: Constructor<I>[]

      The types to filter for instance of in the source observable.

    Returns OperatorFunction<unknown, I>

    • An operator that filters the source observable based on the specified types.
  • filterByLatestFrom<T, P>(observable: Observable<P>, predicate: RxjsFilterPredicate<P>): MonoTypeOperatorFunction<T>
  • filterFalsy<T>(): MonoTypeOperatorFunction<T>
  • Filters out truthy values from the source observable.

    example

    const input$: Observable = from([1, 'string', false, true]);

    input$ .pipe(filterFalsy()) .subscribe((output: unknown) => { ... })

    Type Parameters

    • T

      The type of elements emitted by the source observable.

    Returns MonoTypeOperatorFunction<T>

    • An operator that filters out truthy values from the source observable.
  • filterNotEmpty<T>(): MonoTypeOperatorFunction<T>
  • Filters out values that are considered empty from the source observable.

    example

    const input$: Observable = from([null, undefined, '', 'string', [], {}]);

    input$ .pipe(filterNotEmpty()) .subscribe((output: unknown) => { ... })

    Type Parameters

    • T

      The type of elements emitted by the source observable.

    Returns MonoTypeOperatorFunction<T>

    • An operator that filters out values considered empty from the source observable.
  • filterNotNil<T>(): OperatorFunction<T, NonNullable<T>>
  • Filters out values that are considered null or undefined from the source observable.

    example

    const input$: Observable = from([null, undefined, '', 'string']);

    input$ .pipe(filterNotNil()) .subscribe((output: unknown) => { ... })

    Type Parameters

    • T

      The type of elements emitted by the source observable.

    Returns OperatorFunction<T, NonNullable<T>>

    • An operator that filters out values considered null or undefined from the source observable.
  • filterTruthy<T>(): MonoTypeOperatorFunction<T>
  • Filters out falsy values from the source observable.

    example

    const input$: Observable = from([1, 'string', false, true]);

    input$ .pipe(filterTruthy()) .subscribe((output: unknown) => { ... })

    Type Parameters

    • T

      The type of elements emitted by the source observable.

    Returns MonoTypeOperatorFunction<T>

    • An operator that filters out falsy values from the source observable.
  • filterUuid(): OperatorFunction<string, Uuid>
  • Filters out non-UUID values from the source observable.

    example

    const input$: Observable = from([1, 'string', {}, 'afa05a7a-a6e0-4687-b293-a2dec7c66ee0]);

    input$ .pipe(filterUuid()) .subscribe((output: unknown) => { ... })

    Returns OperatorFunction<string, Uuid>

    • An operator that filters out non-UUID values from the source observable.
  • firstNotNil<T>(): OperatorFunction<T, NonNullable<T>>
  • invertBoolean(): OperatorFunction<boolean, boolean>
  • Inverts boolean values emitted by the source observable.

    example

    const input$: Observable = of(true, true, true);

    input$.pipe(invertBoolean()).subscribe((result: boolean) => { ... })

    Returns OperatorFunction<boolean, boolean>

    • An operator that inverts boolean values emitted by the source observable.
  • mapToAny<T>(): OperatorFunction<T, any>
  • mapToIsEmpty<T>(): OperatorFunction<T, boolean>
  • Maps values emitted by the source observable to a boolean indicating whether the value is considered empty.

    example

    const input$: Observable = from([null, '', 0, undefined, [], new Map(), {}, [1]]

    input$ .pipe(mapToIsEmpty()) .subscribe((output: unknown) => { ... } )

    Type Parameters

    • T

      The type of elements emitted by the source observable.

    Returns OperatorFunction<T, boolean>

    • An operator that maps values to a boolean indicating whether they are considered empty.
  • mapToIsFalsy<T>(): OperatorFunction<T, boolean>
  • Maps values emitted by the source observable to a boolean indicating whether the value is falsy.

    example

    const input$: Observable = from([1, '', 0, 'string']);

    input$ .pipe(mapToIsFalsy()) .subscribe((output: unknown) => { ... })

    Type Parameters

    • T

      The type of elements emitted by the source observable.

    Returns OperatorFunction<T, boolean>

    • An operator that maps values to a boolean indicating whether they are falsy.
  • mapToIsNil<T>(): OperatorFunction<T, boolean>
  • Maps values emitted by the source observable to a boolean indicating whether the value is null or undefined.

    example

    const input$: Observable = from([null, '', 0, undefined]);

    input$ .pipe(mapToIsNil()) .subscribe((output: unknown) => { ... })

    Type Parameters

    • T

      The type of elements emitted by the source observable.

    Returns OperatorFunction<T, boolean>

    • An operator that maps values to a boolean indicating whether they are null or undefined.
  • mapToIsNotNil<T>(): OperatorFunction<T, boolean>
  • mapToIsTruthy<T>(): OperatorFunction<T, boolean>
  • Maps values emitted by the source observable to a boolean indicating whether the value is truthy.

    example

    const input$: Observable = from([1, '', 0, 'string']);

    input$ .pipe(mapToIsTruthy()) .subscribe((output: unknown) => { ... })

    Type Parameters

    • T

      The type of elements emitted by the source observable.

    Returns OperatorFunction<T, boolean>

    • An operator that maps values to a boolean indicating whether they are truthy.
  • mapToPagedArray<T>(perPageCount: number): OperatorFunction<T[], T[][]>
  • mapToSortedByProperty<T>(key: keyof T, sortType?: SortType): MonoTypeOperatorFunction<T[]>
  • mapToUniqueElements<T>(compareBy: keyof T): MonoTypeOperatorFunction<T[]>
  • mapToVoid<T>(): OperatorFunction<T, void>
  • Maps values emitted by the source observable to void.

    example

    const input$: Observable<number[]> = of([1, 2, 3]);

    input$ .pipe(mapToVoid()) .subscribe(() => { ... })

    Type Parameters

    • T

      The type of elements emitted by the source observable.

    Returns OperatorFunction<T, void>

    • An operator that maps values to void.
  • observeOnOptional<T>(scheduler: Nullable<SchedulerLike>, delay?: number): MonoTypeOperatorFunction<T>
  • shareReplayWithRefCount<T>(): MonoTypeOperatorFunction<T>
  • Shares and replays the values emitted by the source observable with reference counting.

    Type Parameters

    • T

      The type of elements emitted by the source observable.

    Returns MonoTypeOperatorFunction<T>

    • An operator that shares and replays values with reference counting.
  • subscribeOnOptional<T>(scheduler: Nullable<SchedulerLike>, delay?: number): MonoTypeOperatorFunction<T>
  • tapLog<T>(...prefixes: unknown[]): MonoTypeOperatorFunction<T>
  • tapOnCondition<T>(condition: boolean | ((value: T) => boolean), callback: ((value: T) => void)): OperatorFunction<T, T>
  • Conditionally applies a callback using the tap operator based on the specified condition.

    example

    // Displays a successful toast of saved settings if the value is greater than 10. source$.pipe(..., tapOnCondition(value => value > 10, () => this.showSuccessToast()), ...)

    Type Parameters

    • T

      The type of the elements emitted by the source observable.

    Parameters

    • condition: boolean | ((value: T) => boolean)

      A function that determines the condition based on the emitted values.

    • callback: ((value: T) => void)

      The callback function to be invoked when the condition is true.

        • (value: T): void
        • Parameters

          • value: T

          Returns void

    Returns OperatorFunction<T, T>

    • An operator that performs a side effect for each emission on the source observable.
  • tapOnInstanceOf<T>(typeOrTypes: Constructor<T> | Constructor<T>[], callback: ((value: T) => void)): OperatorFunction<unknown, unknown>
  • Conditionally applies a callback using the tap operator based on the instance of specified types.

    example

    // Based on the values produced by the source observable, // performs a side-effect only on an instance of the specified SomeClass type const input$: Observable = from([1, 'string', { name: 'Some name' }, new SomeClass()]);

    input$ .pipe(tapOnInstanceOf(SomeClass, () => this.showAlert()))

    Type Parameters

    • T

    Parameters

    • typeOrTypes: Constructor<T> | Constructor<T>[]

      The type or types to check for instance of in the source observable.

    • callback: ((value: T) => void)

      The callback function to be invoked when an instance of the specified type is found.

        • (value: T): void
        • Parameters

          • value: T

          Returns void

    Returns OperatorFunction<unknown, unknown>

    • An operator that performs a side effect for each emission on the source observable.

Generated using TypeDoc