You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
341 B
TypeScript
17 lines
341 B
TypeScript
/**
|
|
* Mock 路由类型定义
|
|
* 替代 vite-plugin-mock 的 MockMethod 类型
|
|
*/
|
|
export interface MockRequest {
|
|
query: Record<string, string>
|
|
body: any
|
|
url: string
|
|
method: string
|
|
}
|
|
|
|
export interface MockMethod {
|
|
url: string
|
|
method?: 'get' | 'post' | 'put' | 'delete' | 'patch'
|
|
response?: ((req: MockRequest) => any) | any
|
|
}
|