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:
types.ts....const CustomerSchema = z.object({ firstName: z.string() }) // dummy schemaexport type Customer = z.infer<typeof CustomerSchema>....<script setup lang="ts">import type { Customer } from '/types'const props = defineProps<Customer>()...
types.ts....const CustomerSchema = z.object({ firstName: z.string() }) // dummy schemaexport type Customer = z.infer<typeof CustomerSchema>....<script setup lang="ts">import type { Customer } from '/types'const props = defineProps<Customer>()...
Recent Announcements
Continue the conversation
Join the Discord to ask follow-up questions and connect with the community