Fix all type errors in design system (#3956)
* 📘 Fix type errors in design system * 🔥 Remove unneeded `?` * 🔧 Add design system to Vetur * 📘 Improve typing of `$el` * ♻️ Address feedback * 📘 Type leftover `MouseEvent` * 📘 Type `event.target` properly
This commit is contained in:
@@ -69,8 +69,8 @@ export default mixins(Locale).extend({
|
||||
},
|
||||
computed: {
|
||||
fitleredUsers(): IUser[] {
|
||||
return this.users
|
||||
.filter((user: IUser) => {
|
||||
return (this.users as IUser[])
|
||||
.filter((user) => {
|
||||
if (user.isPendingUser || !user.email) {
|
||||
return false;
|
||||
}
|
||||
@@ -98,6 +98,10 @@ export default mixins(Locale).extend({
|
||||
return a.firstName > b.firstName? 1 : -1;
|
||||
}
|
||||
|
||||
if (!a.email || !b.email) {
|
||||
throw new Error('Expected all users to have email');
|
||||
}
|
||||
|
||||
return a.email > b.email ? 1 : -1;
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user