File tree Expand file tree Collapse file tree 1 file changed +0
-20
lines changed Expand file tree Collapse file tree 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) => {
2828}
2929
3030const 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-
5031 if ( typeof v === 'string' ) return v . toString ( )
5132 if ( typeof v === 'number' ) return v . toString ( )
5233 if ( typeof v === 'bigint' ) return v . toString ( )
5334 if ( typeof v === 'boolean' ) return v . toString ( )
54-
5535 throw new UnserializableParamError ( k , `is a ${ typeof v } ` )
5636}
5737
You can’t perform that action at this time.
0 commit comments