Problems with typification of useQueries #10740
Unanswered
andreynovikov
asked this question in
Q&A
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have created a helper hook based on
useQueries. The idea is to encapsulate specific fetching logic inqueryFnand reformat results for easier use. It works as intended, but I can not fix typescript errors. The full code is:The main problem is with
@ts-expect-error- I didn't manage to fix it. The other problem is withas unknown as..., without it it doesn't work too.P.S. I have a similar helper hook for single
useQuery, and I've managed to typificate it without problems.Beta Was this translation helpful? Give feedback.
All reactions