import { NodeT, NodeTypes } from './helpers'; import { AliasMap } from './aliases'; /** * A function, when called a value and it validates the value * @returns `null` if the value is valid or `string` of an error message * if the value is not valid */ export type ValidateFn = (value: T) => string | null; export declare const runValidation: (validateFn: ValidateFn, value: any) => void; export declare const chain: (...validateFns: ValidateFn[]) => ValidateFn; export declare const OR: { (...fns: [ValidateFn, ValidateFn]): ValidateFn; (...fns: [ValidateFn, ValidateFn, ValidateFn]): ValidateFn; (...fns: [ValidateFn, ValidateFn, ValidateFn, ValidateFn]): ValidateFn; }; export declare const meaningfulType: (value: any) => "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" | "null" | "array"; type ValueTypeMap = { string: string; number: number; bigint: bigint; boolean: boolean; null: null; }; type ValueType = keyof ValueTypeMap; export declare const value: (...types: T) => ValidateFn; export declare const isReserved: (name: string) => boolean; export declare const validIdentifier: (jsx: boolean) => ValidateFn; export declare const nonNull: ValidateFn; export declare const node: (...types: T) => ValidateFn>; export declare const nodeAlias: (alias: T) => ValidateFn; export declare const any: ValidateFn; export declare const arrayOf: (validateFn: ValidateFn) => ValidateFn; export declare const oneOf: (items: T) => ValidateFn; export declare const nullable: (validateFn: ValidateFn) => ValidateFn; export {};