@advidi-network/zod-to-reactive-form
Advanced tools
Comparing version 1.1.0 to 1.2.0
import { z } from 'zod'; | ||
import { ZodControl, ZodFormArray } from '../types'; | ||
import { FieldOptions, ZodControl, ZodFormArray } from '../types'; | ||
import { AbstractControlOptions } from '@angular/forms'; | ||
export type FormArrayOverrides<TSchema> = TSchema extends z.ZodArray<infer TArray> ? Array<ZodControl<TArray>> : never; | ||
export type FormArrayOverrides<TSchema> = TSchema extends z.ZodArray<infer TArray> ? Array<ZodControl<TArray> | FieldOptions<z.infer<TArray>>> : never; | ||
export declare function createFormArray<TSchema extends z.ZodArray<z.ZodTypeAny>>(schema: TSchema, overrides?: FormArrayOverrides<TSchema>, options?: AbstractControlOptions): ZodFormArray<TSchema>; |
import { z } from 'zod'; | ||
import { AbstractControlOptions, FormControl } from '@angular/forms'; | ||
import { GuardUndefined, UnwrapLazyType, ZodControl, ZodFormGroup } from '../types'; | ||
import { FieldOptions, GuardUndefined, UnwrapLazyType, ZodControl, ZodFormGroup } from '../types'; | ||
export type FormGroupOverrides<TSchema> = TSchema extends z.ZodObject<infer TObjectType> ? { | ||
[K in keyof TObjectType]?: ZodControl<UnwrapLazyType<TObjectType[K]>> | FormControl<GuardUndefined<z.infer<TObjectType[K]>>>; | ||
[K in keyof TObjectType]?: FieldOptions<z.infer<TObjectType[K]>> | ZodControl<UnwrapLazyType<TObjectType[K]>> | FormControl<GuardUndefined<z.infer<TObjectType[K]>>>; | ||
} : never; | ||
export declare function createFormGroup<TSchema extends z.SomeZodObject>(schema: TSchema, overrides?: FormGroupOverrides<TSchema>, options?: AbstractControlOptions): ZodFormGroup<TSchema>; |
import { z } from "zod"; | ||
import { FormControl } from "@angular/forms"; | ||
import { GuardUndefined, ZodFormArray, ZodFormGroup } from "../types"; | ||
export declare function createZodControl<T extends z.SomeZodObject>(schema: T): ZodFormGroup<T>; | ||
export declare function createZodControl<T extends z.ZodArray<any>>(schema: T): ZodFormArray<T>; | ||
export declare function createZodControl<T extends z.ZodFirstPartySchemaTypes>(schema: T): FormControl<GuardUndefined<z.infer<T>>>; | ||
import { FieldOptions, GuardUndefined, 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<GuardUndefined<z.infer<T>>>; |
@@ -0,1 +1,2 @@ | ||
export * from './field-options'; | ||
export * from './unwrap-lazy'; | ||
@@ -2,0 +3,0 @@ export * from './zod-control'; |
{ | ||
"name": "@advidi-network/zod-to-reactive-form", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "type": "git", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32799
31
176