Skip to content

functionTypeGuard<TFunction>

Builds a guard accepting any function, narrowed to the signature TFunction. Only that the value is a function is checked: a signature cannot be checked at runtime, so the guard trusts it.

Import:

import { functionTypeGuard } from '@mnaoumov/typescript-lib/type-guards';

Signature:

function functionTypeGuard(): TypeGuard<TFunction>

Returns: TypeGuard<TFunction> — The guard.