true
if T
is a Function
, otherwise false
.
A Function
is defined as a function type that accepts arguments of type unknown
and returns a value of type unknown
.
IsFunction<() => void>; // true (matches Function)
IsFunction<(x: number) => string>; // true (matches Function)
IsFunction<string>; // false (string is not a function type)
Type utility that checks if a given type
T
is aFunction
(function type acceptingunknown
arguments and returningunknown
).