isNotFunction()
isNotFunction()
const isNotFunction = <Type, Payload extends object = object>(
value: Type,
callback: ResultCallback<Type, Payload> = resultCallback,
payload?: Payload
): value is Never<Function, Type> =>
callback(
typeOf(value) !== 'function' &&
typeof value !== 'function' &&
value instanceof Function === false,
value,
payload
);
Generic type variables
Type
Payloadextendsobject=object
Parameters
value: Type
callback: ResultCallback<Type, Payload>
payload?: Payload
Return type
value is Never<Function, Type>
Returns
Example usage
Last updated