feature: add extracgin options from z.array(z.enum([]) and z.enum([])…#113
Open
bartoszgolebiowski wants to merge 1 commit intoiway1:mainfrom
Open
feature: add extracgin options from z.array(z.enum([]) and z.enum([])…#113bartoszgolebiowski wants to merge 1 commit intoiway1:mainfrom
bartoszgolebiowski wants to merge 1 commit intoiway1:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
b9e34ba to
3a9cc2a
Compare
3a9cc2a to
96524de
Compare
….array() via useEnumValues hook
96524de to
9ef5a41
Compare
scamden
approved these changes
Aug 7, 2023
|
|
||
| export function getEnumValues(type: RTFSupportedZodTypes) { | ||
| export function getEnumValues(type: RTFSupportedZodTypes): readonly string[] | undefined { | ||
| if (type._def.typeName === z.ZodFirstPartyTypeKind.ZodArray) return getEnumValues(type._def.type) |
Collaborator
There was a problem hiding this comment.
i think type.element is preferred here
|
why was this not merged? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
….array() via useEnumValues hook