rhodonite
    Preparing search index...

    Function ifUndefinedThenWithReturn

    • Executes a callback if the value is undefined and returns the result

      Type Parameters

      • T

        The type of the value

      Parameters

      • callback: () => T

        The callback function to execute that returns a value

      • Optionalvalue: T

        The value to check (optional)

      Returns T

      The result of the callback if value is undefined, otherwise the original value