React Hookers - v6.3.0
    Preparing search index...

    Function callOrGet

    • Unwraps a provided value.

      If the value is a function, it is invoked with the provided arguments and its return value is returned. Otherwise, the value itself is returned.

      Type Parameters

      • T

        The unwrapped value type.

      • A extends any[]

        The argument types of the value-provider callback.

      Parameters

      • value: T | ((...args: A) => T)

        A value or a value-provider callback.

      • ...args: A

        Arguments passed to the value-provider callback.

      Returns T

      The unwrapped value.