typding.d.ts 626 B

12345678910111213141516171819202122
  1. /** API请求类型定义 */
  2. // 格式: MenuRoleList:MenuRoleItem[] 所有参数需带上 可选符-?
  3. // UpdateParams(add/update/delete): MenuRoleParams: { id?: string, ....}
  4. // 新增:剔除id Omit<MenuRoleParams, 'id' | ...> 删除: {id: string}
  5. declare namespace API {
  6. /** @description Basic Params */
  7. type PageParams = {
  8. current?: number
  9. pageSize?: number
  10. }
  11. /** @description Request泛型-基础请求 */
  12. type BasicFetchResult<T extends any> = {
  13. data: T
  14. }
  15. /** @description Request泛型-列表请求 */
  16. type BasicFetchListResult<T extends any> = {
  17. list: T[]
  18. total: number
  19. }
  20. }