Skip to content

isFunction

isFunction<T>(f): f is T

Checks if f is classified as Function.

Example

isFunction(() => true))
// => true
isFunction("foobar")
// => false

Alternatives

Type Parameters

T extends Function

Parameters

f

unknown

Returns

f is T

true if x is a Function, false otherwise.