Error using zod based type in defineProps<>()
When exporting type using z.infer<> of zod schema I have an error in defineProps<>() place.
Pre-transform error: [@vue/compiler-sfc] Unresolvable type reference or unsupported built-in utility type
PS: when using type without schema it works
Code:
3 Replies
Hi, i have a working example for you. 🙂
GitHub
mtg-guessing-game-nuxt/utils/zCard.ts at main · devmetal/mtg-guessi...
Contribute to devmetal/mtg-guessing-game-nuxt development by creating an account on GitHub.
I'm not the biggest nuxt dev just now, i'm still learning this stuff. (coming from nextjs) but i'm also like to use zod. And for me its working fine.