• Returns the first non-null and non-undefined value from the provided arguments. If all arguments are null or undefined, returns undefined.

    Type Parameters

    • T

      The type of the values.

    Parameters

    • Rest...values: (undefined | null | T)[]

      The values to coalesce.

    Returns T | undefined

    The first non-null and non-undefined value, or undefined if all are null or undefined.