plus-ui/src/utils/api-types.ts

12 lines
348 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* 与 `src/utils/request` 拦截器一致resolve 的是若依风格 JSON `{ code, msg, data }`。
* axios 1.13 + TS6 下避免从 `axios` 拉已移除的 AxiosPromise。
*/
export interface RuoYiAjaxResult<T = unknown> {
code?: number;
msg?: string;
data?: T;
}
export type AxiosPromise<T = unknown> = Promise<RuoYiAjaxResult<T>>;