I'm new to Typescript and sorry in advance if this is a newbie issue.
I don't know how to fix this TS error:
@Module({ namespaced: true, name: "Admin" })
class Admin extends VuexModule {
public adminUserList: UserList = [];
@MutationAction({ mutate: ["adminUserList"] })
async getAdminUserList(): Promise<Record<string, UserList>> {
const req = (await Utils.async({
data: adminUserList,
})) as Record<string, UserList>;
return {
adminUserList: req.data as UserList,
};
}
}
Ok so I just needed to change the return type of the action.