Skip to content

Commit

Permalink
Merge pull request #34 from stevent-team/fix/unnecessary-nonnullable
Browse files Browse the repository at this point in the history
Remove unnecessary NonNullable on field chain
  • Loading branch information
GRA0007 committed Aug 4, 2023
2 parents 122a19e + 9c2a91f commit 8ba4854
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/olive-peaches-heal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@stevent-team/react-zoom-form": patch
---

Remove unnecessary NonNullable on field chain
2 changes: 1 addition & 1 deletion lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type recursiveFieldChain<Schema extends z.ZodType, LeafValue> =
: Schema extends (z.ZodDefault<any> | z.ZodOptional<any> | z.ZodNullable<any>) ? FieldChain<Schema['_def']['innerType']>
: LeafValue

export type FieldChain<Schema extends z.ZodType> = Field<Schema> & Required<recursiveFieldChain<NonNullable<Schema>, {
export type FieldChain<Schema extends z.ZodType> = Field<Schema> & Required<recursiveFieldChain<Schema, {
/**
* Provides props to pass to native elements (input, textarea, select)
*
Expand Down

0 comments on commit 8ba4854

Please sign in to comment.