diff --git a/packages/vite-plugin-mock/src/types.ts b/packages/vite-plugin-mock/src/types.ts index d55e3bf..105142d 100644 --- a/packages/vite-plugin-mock/src/types.ts +++ b/packages/vite-plugin-mock/src/types.ts @@ -24,10 +24,12 @@ export declare interface MockMethod { method?: MethodType timeout?: number statusCode?: number - response?: ( - this: RespThisType, - opt: { url: Recordable; body: Recordable; query: Recordable; headers: Recordable }, - ) => any + response?: + | (( + this: RespThisType, + opt: { url: Recordable; body: Recordable; query: Recordable; headers: Recordable }, + ) => any) + | any rawResponse?: (this: RespThisType, req: IncomingMessage, res: ServerResponse) => void }