You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: base.d.ts
+45Lines changed: 45 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -535,6 +535,51 @@ export type StringifyOptions = {
535
535
```
536
536
*/
537
537
readonlyskipEmptyString?: boolean;
538
+
539
+
/**
540
+
A function that transforms key-value pairs before stringification.
541
+
542
+
Similar to the `replacer` parameter of `JSON.stringify()`, this function is called for each key-value pair and can be used to transform values before they are stringified.
543
+
544
+
The function receives the key and value, and should return the transformed value. Returning `undefined` will omit the key-value pair from the resulting query string.
545
+
546
+
This is useful for custom serialization of non-primitive types like `Date`:
A function that transforms key-value pairs before stringification.
528
+
529
+
Type: `function`\
530
+
Default: `undefined`
531
+
532
+
Similar to the `replacer` parameter of `JSON.stringify()`, this function is called for each key-value pair and can be used to transform values before they are stringified. The function receives the key and value, and should return the transformed value. Returning `undefined` will omit the key-value pair from the resulting query string.
533
+
534
+
This is useful for custom serialization of non-primitive types like `Date`:
0 commit comments