Describe the bug#
useInfiniteQuery causes NotifyEventQueryObserverOptionsUpdated event to be fired without query parameter set that breaks types.

interface NotifyEventQueryObserverOptionsUpdated extends NotifyEvent {
type: 'observerOptionsUpdated';
query: Query<any, any, any, any>;
observer: QueryObserver<any, any, any, any, any>;
}
The issue is missing in 5.21.2 but appears after updating to 5.21.4, so most likely this PR introduces it: https://github.com/TanStack/query/pull/6879
Your minimal, reproducible example#
https://stackblitz.com/edit/stackblitz-starters-kx6qgr?file=src%2FApp.tsx
Steps to reproduce#
The issue is missing in 5.21.2 but appears after updating to 5.21.4
Expected behavior#
NotifyEventQueryObserverOptionsUpdated should be fired with the query parameter set.
How often does this bug happen?#
None
Screenshots or Videos#
No response
Platform#
Linux
Tanstack Query adapter#
None
TanStack Query version#
5.21.4+
TypeScript version#
latest
Additional context#
No response