types: 封装通用请求类型,减少重复类型定义

This commit is contained in:
皓月归尘
2024-03-26 17:52:47 +08:00
parent bc1da0b759
commit 09c5f959e2
8 changed files with 61 additions and 79 deletions

6
types/global.d.ts vendored
View File

@@ -205,4 +205,10 @@ declare global {
touched?: boolean;
};
}
/**通用请求响应类型 */
interface ResponseResult<T> {
success: boolean;
data?: T;
}
}