Function isFunction

  • Checks if a given value is of function type.

    Remarks

    This function is only intended to be used with functions that have a known return type. It may not work correctly with functions that return a generic type.

    Example

    isFunction(()=> {})
    // => true

    isFunction({})
    // => false

    isObject(['hello', 'world])
    // => true

    Parameters

    • value: unknown

      The value to be checked.

    Returns value is ((...args) => any)

    Returns true if the value is a function, false otherwise.

Generated using TypeDoc v0.24.7