UNPKG

guardz

Version:

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

11 lines (10 loc) 469 B
import { ValidationError } from './validationTypes'; /** * Create a validation error object * @param path - The path where the error occurred * @param expectedType - The expected type * @param actualValue - The actual value that caused the error * @param message - The error message * @returns A ValidationError object */ export declare const createValidationError: (path: string, expectedType: string, actualValue: unknown, message: string) => ValidationError;