File tree 1 file changed +4
-2
lines changed
packages/openapi-fetch/src
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -169,17 +169,19 @@ export interface Middleware {
169
169
onResponse ?: typeof onResponse ;
170
170
}
171
171
172
+ type PathMethods = Partial < Record < HttpMethod , { } > > ;
173
+
172
174
/** This type helper makes the 2nd function param required if params/requestBody are required; otherwise, optional */
173
175
export type MaybeOptionalInit <
174
- P extends Record < HttpMethod , { } > ,
176
+ P extends PathMethods ,
175
177
M extends keyof P ,
176
178
> =
177
179
HasRequiredKeys < FetchOptions < FilterKeys < P , M > > > extends never
178
180
? [ ( FetchOptions < FilterKeys < P , M > > | undefined ) ?]
179
181
: [ FetchOptions < FilterKeys < P , M > > ] ;
180
182
181
183
export type ClientMethod <
182
- Paths extends Record < string , Record < HttpMethod , { } > > ,
184
+ Paths extends Record < string , PathMethods > ,
183
185
M extends HttpMethod ,
184
186
> = <
185
187
P extends PathsWithMethod < Paths , M > ,
You can’t perform that action at this time.
0 commit comments