Skip to content

Commit f15c661

Browse files
authored
fix: types (#105)
1 parent c1e35e4 commit f15c661

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

packages/vite-plugin-mock/src/types.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@ export declare interface MockMethod {
2424
method?: MethodType
2525
timeout?: number
2626
statusCode?: number
27-
response?: (
28-
this: RespThisType,
29-
opt: { url: Recordable; body: Recordable; query: Recordable; headers: Recordable },
30-
) => any
27+
response?:
28+
| ((
29+
this: RespThisType,
30+
opt: { url: Recordable; body: Recordable; query: Recordable; headers: Recordable },
31+
) => any)
32+
| any
3133
rawResponse?: (this: RespThisType, req: IncomingMessage, res: ServerResponse) => void
3234
}
3335

0 commit comments

Comments
 (0)