File tree 1 file changed +0
-20
lines changed
1 file changed +0
-20
lines changed Original file line number Diff line number Diff line change @@ -28,30 +28,10 @@ export const paramsSerializer: CustomParamsSerializer = (params) => {
28
28
}
29
29
30
30
const serialize = ( k : string , v : unknown ) : string => {
31
- if ( v == null ) {
32
- throw new UnserializableParamError ( k , `is ${ v } or contains ${ v } ` )
33
- }
34
-
35
- if ( typeof v === 'function' ) {
36
- throw new UnserializableParamError (
37
- k ,
38
- 'is a function or contains a function' ,
39
- )
40
- }
41
-
42
- if ( typeof v === 'object' ) {
43
- throw new UnserializableParamError ( k , 'is an object or contains an object' )
44
- }
45
-
46
- if ( typeof v === 'symbol' ) {
47
- throw new UnserializableParamError ( k , 'is a symbol' )
48
- }
49
-
50
31
if ( typeof v === 'string' ) return v . toString ( )
51
32
if ( typeof v === 'number' ) return v . toString ( )
52
33
if ( typeof v === 'bigint' ) return v . toString ( )
53
34
if ( typeof v === 'boolean' ) return v . toString ( )
54
-
55
35
throw new UnserializableParamError ( k , `is a ${ typeof v } ` )
56
36
}
57
37
You can’t perform that action at this time.
0 commit comments