Skip to content

Commit 5290aa1

Browse files
fix(queryCore): export MutationCacheNotifyEvent type (#6270)
* fix(mutationCache): export MutationCacheNotifyEvent type Export MutationCacheNotifyEvent type to make it consistent with QueryCacheNotifyEvent (which is exported) and make it easier to write listener functions. * fix(mutationCache): export MutationCacheNotifyEvent type --------- Co-authored-by: Damian Osipiuk <[email protected]>
1 parent a950962 commit 5290aa1

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

packages/query-core/src/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export { QueryObserver } from './queryObserver'
88
export { QueriesObserver } from './queriesObserver'
99
export { InfiniteQueryObserver } from './infiniteQueryObserver'
1010
export { MutationCache } from './mutationCache'
11+
export type { MutationCacheNotifyEvent } from './mutationCache'
1112
export { MutationObserver } from './mutationObserver'
1213
export { notifyManager } from './notifyManager'
1314
export { focusManager } from './focusManager'

packages/query-core/src/mutationCache.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ interface NotifyEventMutationUpdated extends NotifyEvent {
6969
action: Action<any, any, any, any>
7070
}
7171

72-
type MutationCacheNotifyEvent =
72+
export type MutationCacheNotifyEvent =
7373
| NotifyEventMutationAdded
7474
| NotifyEventMutationRemoved
7575
| NotifyEventMutationObserverAdded

0 commit comments

Comments
 (0)