enhancement: update autoform emit submit event type(#716)

If compiler options are only added to just tsconfig.json, module resolution fails for `@/lib/utils` during build.

<!---☝️ PR title should follow conventional commits (https://conventionalcommits.org) -->

<!-- Please ensure there is an open issue and mention its number as #123 -->

<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply. -->

- [ ] 📖 Documentation (updates to the documentation, readme or JSdoc annotations)
- [ ] 🐞 Bug fix (a non-breaking change that fixes an issue)
- [x] 👌 Enhancement (improving an existing functionality like performance)
- [ ]  New feature (a non-breaking change that adds functionality)
- [ ] 🧹 Chore (updates to the build process or auxiliary tools and libraries)
- [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

The change is mean to allow event type to support `values: z.infer<typeof schema>`, not only `values: Record<string, any>`

Resolves #716

<!-- Add screenshots to help explain the change. -->

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->

- [x] I have linked an issue or discussion.
- [ ] I have updated the documentation accordingly.
This commit is contained in:
Sinh 2024-08-17 05:29:43 +00:00 committed by sinh117801
parent 12657dab5c
commit 85763e1b51
2 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ const props = defineProps<{
}>()
const emits = defineEmits<{
submit: [event: GenericObject]
submit: [event: z.infer<T>]
}>()
const { dependencies } = toRefs(props)

View File

@ -17,7 +17,7 @@ const props = defineProps<{
}>()
const emits = defineEmits<{
submit: [event: GenericObject]
submit: [event: z.infer<T>]
}>()
const { dependencies } = toRefs(props)