Skip to content

Commit

Permalink
fix(params): inference was broken for booleans
Browse files Browse the repository at this point in the history
  • Loading branch information
ecyrbe committed Aug 11, 2023
1 parent f19f7fe commit 5ad1127
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/zodios.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,10 +371,11 @@ export type ZodiosPathParamsByPath<
{ type: "Path" }
>,
Frontend
>
>,
$PathParamNames extends string = PathParamNames<Path>
> = NeverIfEmpty<
{
[K in PathParamNames<Path>]: string | number;
[K in $PathParamNames]: string | number | boolean;
} & PathParameters
>;

Expand All @@ -393,10 +394,11 @@ export type ZodiosPathParamByAlias<
PathParameters = MapSchemaParameters<
FilterArrayByValue<EndpointDefinition["parameters"], { type: "Path" }>,
Frontend
>
>,
$PathParamNames extends string = PathParamNames<Path>
> = NeverIfEmpty<
{
[K in PathParamNames<Path>]: string | number;
[K in $PathParamNames]: string | number | boolean;
} & PathParameters
>;

Expand Down

0 comments on commit 5ad1127

Please sign in to comment.