Steps to reproduce:
- Use
useSendUserOperation hook.
- Inspect
result.data in a branch where result.isSuccess is true.
Expected: based on original react-query types, when isSuccess is true, data should have TData type.
Observed: data is TData | undefined.
Same issue applies to isError and error.
Quick triage suggests original types get mangled by Omit<UseMutationResult<…>, 'mutate'>. Wagmi seems to use a custom UnionOmit utility type to deal with the same problem.