Function ifUndefinedThen

Executes a callback if the value is undefined

  • Type Parameters

    • T

      The type of the value

    Parameters

    • callback: (() => void)

      The callback function to execute

        • (): void
        • Returns void

    • Optionalvalue: T

      The value to check (optional)

    Returns value is T

    False if the value is undefined and callback was executed, true otherwise