We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9c93ff2 commit ca9971dCopy full SHA for ca9971d
packages/nuqs/src/sync.ts
@@ -1,21 +1,14 @@
1
import Mitt from 'mitt'
2
3
export const SYNC_EVENT_KEY = Symbol('__nuqs__SYNC__')
4
-const NOTIFY_EVENT_KEY = Symbol('__nuqs__NOTIFY__')
5
6
-export type QueryUpdateSource = 'internal' | 'external'
7
-export type QueryUpdateNotificationArgs = {
8
- search: URLSearchParams
9
- source: QueryUpdateSource
10
-}
11
export type CrossHookSyncPayload = {
12
state: any
13
query: string | null
14
}
15
16
type EventMap = {
17
[SYNC_EVENT_KEY]: URLSearchParams
18
- [NOTIFY_EVENT_KEY]: QueryUpdateNotificationArgs
19
[key: string]: CrossHookSyncPayload
20
21
0 commit comments