Function skipPathNil

  • Skips values which contains null or undefined for the given property path. Narrows the type of each property in the path from T | null | undefined to T.

    Example:

    const x: Observable<{ a: { b: number | null | undefined} }>;

    const z: Observable<{ a: { b: number } }> = x.pipe(
    skipPathNil('a', 'b')
    );

    value { a: { b: 1 } } will pass through

    value { a: null } will be skipped

    value { a: { b: undefined } } will be skipped

    With a path of just one property it does the same as skipPropertyNil.

    Overloaded with up to 5 properties building the path to check.

    Type Parameters

    • O extends object

    • P1 extends string | number | symbol

    Parameters

    • p1: P1

    Returns ((obs) => Observable<PathNotNil_1<O, P1>>)

      • (obs): Observable<PathNotNil_1<O, P1>>
      • Parameters

        • obs: Observable<O>

        Returns Observable<PathNotNil_1<O, P1>>

  • Type Parameters

    • O extends object

    • P1 extends string | number | symbol

    • P2 extends string | number | symbol

    Parameters

    • p1: P1
    • p2: P2

    Returns ((obs) => Observable<PathNotNil_2<O, P1, P2>>)

      • (obs): Observable<PathNotNil_2<O, P1, P2>>
      • Parameters

        • obs: Observable<O>

        Returns Observable<PathNotNil_2<O, P1, P2>>

  • Type Parameters

    • O extends object

    • P1 extends string | number | symbol

    • P2 extends string | number | symbol

    • P3 extends string | number | symbol

    Parameters

    • p1: P1
    • p2: P2
    • p3: P3

    Returns ((obs) => Observable<PathNotNil_3<O, P1, P2, P3>>)

      • (obs): Observable<PathNotNil_3<O, P1, P2, P3>>
      • Parameters

        • obs: Observable<O>

        Returns Observable<PathNotNil_3<O, P1, P2, P3>>

  • Type Parameters

    • O extends object

    • P1 extends string | number | symbol

    • P2 extends string | number | symbol

    • P3 extends string | number | symbol

    • P4 extends string | number | symbol

    Parameters

    • p1: P1
    • p2: P2
    • p3: P3
    • p4: P4

    Returns ((obs) => Observable<PathNotNil_4<O, P1, P2, P3, P4>>)

      • (obs): Observable<PathNotNil_4<O, P1, P2, P3, P4>>
      • Parameters

        • obs: Observable<O>

        Returns Observable<PathNotNil_4<O, P1, P2, P3, P4>>

  • Type Parameters

    • O extends object

    • P1 extends string | number | symbol

    • P2 extends string | number | symbol

    • P3 extends string | number | symbol

    • P4 extends string | number | symbol

    • P5 extends string | number | symbol

    Parameters

    • p1: P1
    • p2: P2
    • p3: P3
    • p4: P4
    • p5: P5

    Returns ((obs) => Observable<PathNotNil_5<O, P1, P2, P3, P4, P5>>)

      • (obs): Observable<PathNotNil_5<O, P1, P2, P3, P4, P5>>
      • Parameters

        • obs: Observable<O>

        Returns Observable<PathNotNil_5<O, P1, P2, P3, P4, P5>>

Generated using TypeDoc