fix(query-core): restore NoInfer on persister's TQueryKey (#10601)
Follow-up to #10510. That PR removed NoInfer from all three persister generics to fix TQueryFnData inference when the companion queryFn declares a parameter (#7842). Keeping NoInfer on TQueryKey preserves that fix while preventing the persister slot from widening TQueryKey inference. Without NoInfer on TQueryKey, the persister slot contributes to TQueryKey inference. When Register.queryKey is augmented to a narrowed constraint, TQueryKey widens to that constraint instead of the literal passed to queryKey. Wrappers that brand their return with DataTag<TQueryKey, ...> then produce a brand on the wider type, which a plain literal tuple can no longer satisfy in contravariant positions (vi.mocked(...).mockReturnValue, typed variable assignments, etc.). TQueryFnData still participates in inference, so #10510's positive and negative type tests continue to pass. Co-authored-by: Wonsuk Choi <sukvvon@gmail.com>
N
Neef Rehman committed
fcee7bdc429385ae8ffa224fa8a7a9ec7b8ee380
Parent: 9b879f1
Committed by GitHub <noreply@github.com>
on 5/3/2026, 12:34:10 PM