UNPKG

guardz

Version:

A simple and lightweight TypeScript type guard library for runtime type validation.

11 lines (10 loc) 516 B
import type { TypeGuardFnConfig } from '../typeguards/isType'; /** * Reports a type guard error if configuration is provided. * This utility function centralizes error reporting logic to avoid code duplication. * * @param config - Optional configuration for error handling * @param value - The value that failed validation * @param expectedType - The expected type name */ export declare function reportTypeGuardError(config: TypeGuardFnConfig | null | undefined, value: unknown, expectedType: string): void;