Function skipSomePropertyNull

  • Skips / filters values which contains null for any property. Narrows the type of all properties within the object type from T | null to just T.

    marble

    Example:

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

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

    value { a: 1, b: 'foo' } will pass through

    value { a: 1, b: null } will be skipped

    value { a: null, b: 'foo' } will be skipped

    Type Parameters

    • T extends object

    Returns ((source) => Observable<{
        [P in string | number | symbol]: NonNull<T[P]>
    }>)

      • (source): Observable<{
            [P in string | number | symbol]: NonNull<T[P]>
        }>
      • Parameters

        • source: Observable<T>

        Returns Observable<{
            [P in string | number | symbol]: NonNull<T[P]>
        }>

Generated using TypeDoc