-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: add extracgin options from z.array(z.enum([]) and z.enum([])… #113
base: main
Are you sure you want to change the base?
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this lgtm! one nit mentioned
@@ -16,7 +16,8 @@ export function parseDescription(description?: string) { | |||
}; | |||
} | |||
|
|||
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think type.element
is preferred here
why was this not merged? |
….array() via useEnumValues hook