We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Version zod: ^3.22.4 When I try to use z.infer<typeof SomeSchema> I don't have a infer in z
^3.22.4
z.infer<typeof SomeSchema>
infer
z
All code:
import z from "zod"; export const ProductsSchema = z.object({ title: z.string().max(255), description: z.string().max(255), price: z.number(), }); export const ProductsSchemaType = z.infer<typeof ProductsSchema>;
And have this error when trying to use infer: Property 'infer' does not exist on type 'typeof import("/project/node_modules/zod/index")'.
Property 'infer' does not exist on type 'typeof import("/project/node_modules/zod/index")'.
The text was updated successfully, but these errors were encountered:
issue was using const instead of type.
const
type
Expected: type CampaignForm = z.infer<typeof CampaignSchema>;
type CampaignForm = z.infer<typeof CampaignSchema>;
Actual: const CampaignForm = z.infer<typeof CampaignSchema>;
const CampaignForm = z.infer<typeof CampaignSchema>;
The error is misleading.
Sorry, something went wrong.
No branches or pull requests
Version zod:
^3.22.4
When I try to use
z.infer<typeof SomeSchema>
I don't have ainfer
inz
All code:
And have this error when trying to use infer:
Property 'infer' does not exist on type 'typeof import("/project/node_modules/zod/index")'.
z
as if he doesn't exist at allThe text was updated successfully, but these errors were encountered: