Skip to content

Commit

Permalink
feat: allow paramas to have optional schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Bekacru committed Jul 26, 2024
1 parent 18aca9b commit fb145e3
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions packages/better-fetch/src/create-fetch/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,15 @@ export type FetchSchema = {
input?: ZodSchema;
output?: ZodSchema;
query?: ZodSchema;
params?: z.ZodObject<{
[key: string]: ZodSchema;
}>;
params?:
| z.ZodObject<{
[key: string]: ZodSchema;
}>
| z.ZodOptional<
z.ZodObject<{
[key: string]: ZodSchema;
}>
>;
method?: Methods;
};

Expand Down

0 comments on commit fb145e3

Please sign in to comment.