GuardsisFunctionisFunction CallableisFunction<T>(f: unknown): f is TChecks if f is classified as Function. ExampleisFunction(() => true))// => trueisFunction("foobar")// => false Alternatives[Lodash - isFunction]https://lodash.com/docs/#isError)Type parametersT: FunctionParametersf: unknownReturns f is Ttrue if x is a Function, false otherwise.
Checks if
f
is classified as Function.Example
Alternatives