fix: type currrentUser type and list is not same

This commit is contained in:
2025-03-23 21:43:02 +08:00
parent fdf6d3ac0a
commit e0bf83f062
2 changed files with 35 additions and 2 deletions

View File

@@ -16,9 +16,18 @@ export interface Cache {
*/
init?: () => Promise<any>;
}
type User = {
avatar?: string;
description?: string;
id?: string;
needChangePassword?: boolean;
orgs?: string[];
type?: string;
username?: string;
};
export type CacheLoginUser = {
user?: any;
user?: User;
id?: string;
accessToken?: string;
refreshToken?: string;
@@ -42,7 +51,7 @@ export type CacheStore<T = Cache> = {
/**
* 获取当前用户
*/
getCurrentUser(): Promise<CacheLoginUser>;
getCurrentUser(): Promise<User>;
/**
* 获取当前用户列表
*/