File tree 1 file changed +4
-5
lines changed
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 1
- interface SearchParams
2
- extends Record < string , string | number | Array < string | number > > { }
1
+ interface SearchParams extends Record < string , any > { }
3
2
4
3
interface Payload {
5
4
json ?: unknown
@@ -109,7 +108,7 @@ interface RequestOptions<P extends Payload>
109
108
interface Options < P extends Payload = Payload >
110
109
extends Partial < RequiredOptions < P > > { }
111
110
112
- interface Instance < P extends Payload > {
111
+ interface Instance < P extends Payload = Payload > {
113
112
get : RequestMethod < P >
114
113
post : RequestMethod < P >
115
114
patch : RequestMethod < P >
@@ -147,9 +146,9 @@ function defaultSerialize(input: SearchParams): URLSearchParams {
147
146
for ( const key of Object . keys ( input ) ) {
148
147
if ( Array . isArray ( input [ key ] ) ) {
149
148
// @ts -expect-error checked the variable inside if statement
150
- input [ key ] . forEach ( ( item ) => params . append ( key , item as string ) )
149
+ input [ key ] . forEach ( ( item ) => params . append ( key , item ) )
151
150
} else {
152
- params . append ( key , input [ key ] as string )
151
+ params . append ( key , input [ key ] )
153
152
}
154
153
}
155
154
You can’t perform that action at this time.
0 commit comments