guardz
Version:
A simple and lightweight TypeScript type guard library for runtime type validation.
11 lines (10 loc) • 489 B
TypeScript
import { ValidationTree } from './validationTypes';
/**
* Create a validation tree node
* @param path - The path of this node in the validation tree
* @param valid - Whether this node is valid
* @param expectedType - Optional expected type for this node
* @param actualValue - Optional actual value for this node
* @returns A ValidationTree node
*/
export declare const createTreeNode: (path: string, valid: boolean, expectedType?: string, actualValue?: unknown) => ValidationTree;