feat(projects): 重构项目的TS类型架构,去除interface文件夹

This commit is contained in:
Soybean
2022-03-12 17:45:37 +08:00
parent 75de2b0604
commit 8191490f39
58 changed files with 400 additions and 461 deletions

23
src/typings/business.d.ts vendored Normal file
View File

@ -0,0 +1,23 @@
/** 用户相关模块 */
declare namespace Auth {
/**
* 用户角色类型
* - super: 超级管理员
* - admin: 管理员
* - test: 测试
* - visitor: 游客
*/
type RoleType = 'super' | 'admin' | 'test' | 'visitor';
/** 用户信息 */
interface UserInfo {
/** 用户id */
userId: string;
/** 用户名 */
userName: string;
/** 用户手机号 */
userPhone: string;
/** 用户角色类型 */
userRole: RoleType;
}
}