UNPKG

@modular-forms/qwik

Version:

The modular and type-safe form library for Qwik

16 lines (15 loc) 656 B
import { type QRL } from '@builder.io/qwik'; import type { ZodType } from 'zod'; import type { FieldValue, MaybeFunction, ValidateField } from '../types'; /** * See {@link zodField$} */ export declare function zodFieldQrl<TFieldValue extends FieldValue>(schema: QRL<MaybeFunction<ZodType<any, any, TFieldValue>>>): QRL<ValidateField<TFieldValue>>; /** * Creates a validation functions that parses the Zod schema of a field. * * @param schema A Zod schema. * * @returns A validation function. */ export declare const zodField$: <TFieldValue extends FieldValue>(qrl: MaybeFunction<ZodType<any, any, TFieldValue>>) => QRL<ValidateField<TFieldValue>>;