useQuery Placeholder + Typescript #1963
Unanswered
writes-of-spring
asked this question in
Q&A
Replies: 1 comment 1 reply
-
on type level, so I think this should work:
|
Beta Was this translation helpful? Give feedback.
1 reply
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.
-
Hey, how do I correctly type a query that uses placeholder data of a different type,
for useModifiedPosts, the return value is inferred as UseQueryResult<Post[], unknown>
but the useQuery is inferred as useQuery<UpperPost[], unknown, Post[]>
Code sandbox link https://codesandbox.io/s/intelligent-mendel-evrm3
Thanks for any help / info you can provide!
Beta Was this translation helpful? Give feedback.
All reactions