Skip to content
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

z.infer should be z.input #13

Closed
scamden opened this issue Jun 14, 2024 · 4 comments
Closed

z.infer should be z.input #13

scamden opened this issue Jun 14, 2024 · 4 comments

Comments

@scamden
Copy link

scamden commented Jun 14, 2024

data: z.infer<Schema>,

if i pass

z
.number()
.int()
.min(1)
.default(DEFAULT_CONCURRENCY)

to useTypedParsers right now the resulting .parse won't accept undefined but I believe it should!

using z.input<Schema> solves this for me, just thought I'd open this as a possible improvement. Thanks for this really helpful library!

@JacobWeisenburger
Copy link
Owner

good catch. I'll get that fixed asap

@JacobWeisenburger
Copy link
Owner

Should be fixed in https://github.com/JacobWeisenburger/zod_utilz/releases/tag/0.8.3. Let me know if it works for you?

@scamden
Copy link
Author

scamden commented Jun 14, 2024

looks great! thanks for the quick turnaround!

@JacobWeisenburger
Copy link
Owner

Thanks for clearly describing your issue. lol. It is crazy how many people struggle with making a simple explanation. :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants