diff --git a/src/types/api.ts b/src/types/api.ts index 44d9344..905fe3e 100644 --- a/src/types/api.ts +++ b/src/types/api.ts @@ -9,7 +9,7 @@ export type EndpointParameters = z.infer; export type UsageResponse = z.infer; -export type ValidUserParams = { path: unknown; } extends EndpointParameters ? +export type ValidUserParams = EndpointParameters extends { path: unknown; } ? // Combine path and query parameters only if path exists to prevent "never" on intersection Extract, { query: unknown; }>["query"] & Extract, { path: unknown; }>["path"] :