Skip to content

Commit 6a5c051

Browse files
committed
#346 🧊 update js doc for options
1 parent bb83675 commit 6a5c051

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

‎packages/core/src/hooks/useUrlSearchParams/useUrlSearchParams.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,20 @@ export type UrlParams = Record<string, string | string[]>;
44
export type UrlSearchParamsMode = 'hash-params' | 'hash' | 'history';
55

66
export interface UseUrlSearchParamsOptions<VALUE> {
7-
/** The data types for drop zone */
7+
/** The initial value for hook that use in URL params */
88
initialValue?: VALUE;
9-
/** The data types for drop zone */
9+
/** The boolean flag, for remove values that has falsy values (e.g. `''`, `0`, `false`, `NaN`) */
1010
removeFalsyValues?: boolean;
11-
/** The data types for drop zone */
11+
/** The boolean flag, for remove values that 'null' and 'undefined' */
1212
removeNullishValues?: boolean;
13-
/** The data types for drop zone */
13+
/** The custom window object */
1414
window?: Window;
15-
/** The data types for drop zone */
15+
/** Whether to write changes back to the URL */
1616
write?: boolean;
17-
/** The data types for drop zone */
17+
/**
18+
* Use `'push'` to push a new history entry on each update,
19+
* or `'replace'` to replace the current entry.
20+
*/
1821
writeMode?: 'push' | 'replace';
1922
}
2023

0 commit comments

Comments
 (0)