How to correctly type errorMap? - TanStack