Skip to content

Commit 8139e96

Browse files
committed
doc: Better migration guidelines for throttleMs
1 parent 7b0dd2c commit 8139e96

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

packages/nuqs/src/defs.ts

+8-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,14 @@ export type Options = {
4141
*
4242
* Note: the value will be limited to a minimum of 50ms, anything lower
4343
* will not have any effect.
44-
* @deprecated use limitUrlUpdates: { 'method': 'throttle', timeMs: number }
44+
*
45+
* @deprecated use `limitUrlUpdates: { 'method': 'throttle', timeMs: number }`
46+
* or use the shorthand:
47+
* ```ts
48+
* import { throttle } from 'nuqs'
49+
*
50+
* limitUrlUpdates: throttle(100) // time in ms
51+
* ```
4552
*/
4653
throttleMs?: number
4754

0 commit comments

Comments
 (0)