@advidi-network/zod-to-reactive-form
Version:
Zod to Reactive Form conversion library
7 lines (6 loc) • 558 B
TypeScript
import { z } from "zod";
import { FormControl } from "@angular/forms";
import { FieldOptions, ZodFormArray, ZodFormGroup } from "../types";
export declare function createZodControl<T extends z.SomeZodObject>(schema: T, options?: FieldOptions<z.infer<T>>): ZodFormGroup<T>;
export declare function createZodControl<T extends z.ZodArray<any>>(schema: T, options?: FieldOptions<z.infer<T>>): ZodFormArray<T>;
export declare function createZodControl<T extends z.ZodFirstPartySchemaTypes>(schema: T, options?: FieldOptions<z.infer<T>>): FormControl<z.infer<T>>;