src/pages/accessControl/tabs/teams/Register.vue(217,12): error TS2322: Type '(value: User[]) => void' is not assignable to type '(value: User[] | undefined) => any'.
Types of parameters 'value' and 'value' are incompatible.
Type 'User[] | undefined' is not assignable to type 'User[]'.
Type 'undefined' is not assignable to type 'User[]'.
The error you're seeing is a TypeScript type mismatch. The function onUpdateUsers in Register.vue expects a parameter of type User[] (an array of User objects), but it's potentially receiving User[] | undefined.
This makes your function accept either a User[] or undefined. When value is undefined, it sets the emails to an empty array, otherwise it proceeds with mapping the emails as before.
The issue occurs because the defineModel in AccessFields.vue can potentially emit undefined values when updating, but your handler function was only prepared to handle defined User arrays.
Would you like me to explain more about this TypeScript error or the Vue model binding system?