Function mapArrNotNull

  • Map an array and filter out any undefined values

    Type Parameters

    • TVal
    • TOut

    Parameters

    • arr: readonly TVal[]
    • map: ((val: TVal, index: number) => undefined | null | TOut)
        • (val, index): undefined | null | TOut
        • Parameters

          • val: TVal
          • index: number

          Returns undefined | null | TOut

    Returns NonNullable<TOut>[]