Vue allows the types of event parameters to be specified using defineEmits in <script setup>, but we don't use <script setup>. However, there's also a way to do this in the options API.
For example, we would change:
emits: [ 'update:modelValue' ]
to
emits: { 'update:modelValue': ( modelValue: string | number ) => true }
However, we would have to disable the eslint rule that disallows unused function parameters, at least for events where we don't want to do any validation. (The function is supposed to return true if the event parameters are valid, false if not.)
We would also have to update useModelWrapper to use these event types, so that TypeScript verifies that the type accepted by the update:modelValue event matches the type of the modelValue prop.