• Help cleaning up a list with undefined values

    Type Parameters

    • INPUT_ELEMENT_TYPE extends unknown

    • OUTPUT_ELEMENT_TYPE extends unknown

    Parameters

    • argumentsList: readonly (undefined | INPUT_ELEMENT_TYPE)[]

      Arguments that are possibly undefined

    • functionIfNotEmpty: ((a) => OUTPUT_ELEMENT_TYPE)

      Function that is executed if list contains any not undefined elements

        • (a): OUTPUT_ELEMENT_TYPE
        • Parameters

          • a: readonly INPUT_ELEMENT_TYPE[]

          Returns OUTPUT_ELEMENT_TYPE

    Returns undefined | OUTPUT_ELEMENT_TYPE

    Either undefined if list is empty or the result of the function

Generated using TypeDoc