• Evaluates the given value with optional arguments and returns the result.

    Type Parameters

    • T

      The type of the value to be evaluated.

    • A

      The type of the optional arguments to be passed to the value if it is a function.

    Parameters

    • value_: T | ((...a) => T)

      The value to be evaluated. It can be a function or a value.

    • Rest ...arguments_: A[]

      Optional arguments to be passed to the value if it is a function.

    Returns T

    The result of evaluating the value.

    Example

    value('foo') // 'foo'
    value(() => 'foo') // 'foo'

Generated using TypeDoc