UNPKG

@explita/daily-toolset-components

Version:

A lightweight and versatile collection of TypeScript utility functions and form components, inspired by ShadCN UI, designed for seamless everyday development. Enhance your Node.js, React, and Next.js projects with a well-structured suite of helpers for st

15 lines (14 loc) 627 B
import { DefaultSchema, UseFormHook } from "../form.hook.type"; import { z, ZodTypeAny } from "zod"; type CommonProps<S> = { errors?: Record<Partial<keyof S>, string | undefined>; }; export declare function useFormContext<Schema extends ZodTypeAny>(props?: { schema: Schema; defaultValues?: Partial<z.infer<Schema>>; } & CommonProps<z.infer<Schema>>): UseFormHook<z.infer<Schema>>; export declare function useFormContext<DefaultValues extends DefaultSchema = DefaultSchema>(props?: { defaultValues?: DefaultValues; schema?: undefined; } & CommonProps<DefaultValues>): UseFormHook<DefaultValues>; export {};