Commit 94659ee
committed
fix(helpers): handle any type in RequiredKeysOf
When RequiredKeysOfHelper<T> evaluates to 'any' (e.g., when T is 'any'),
RequiredKeysOf should return 'never' to indicate no required keys.
This fixes the issue where using createClient<any>() with placeholder
OpenAPI types would incorrectly require the second parameter in API calls
like client.GET('/path').
The fix adds an additional conditional check:
RequiredKeysOfHelper<T> extends any ? never
This ensures that when paths type is 'any' (common when using placeholder
types or fallback schemas), the second parameter becomes optional, allowing
builds to succeed without type errors.1 parent 12f9c29 commit 94659ee
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | | - | |
| 201 | + | |
0 commit comments