How can I specify accepting a queryOptions as a type?
I want to make a SelectAsync component that accepts this prop:
I'm not sure that UseQueryOptions is the right type to specify though, since my constructed
queryOptions
calls aren't matching up3 Replies
other-emeraldOP•10mo ago
I'm also using
select
a bit in these queryOptions, so that might be part of the issue?other-emeraldOP•10mo ago
TS Playground - An online editor for exploring TypeScript and JavaS...
The Playground lets you write TypeScript or JavaScript online in a safe and sharable way.
extended-salmon•10mo ago
your queryFn returns
number
but your select is set to boolean
, so:
https://www.typescriptlang.org/play/?#code/JYWwDg9gTgLgBAbzgRwK4FMoE8DyYbAQB2AzgDRwCqJ6AihtngceXACLoBmAhqgDYwAolCjQK9TFgDS6LHAC+cTqJBwARAAEY3UtoDGAawD0UdNz0wAtGklqAUHb0t4N7DLkBeOAAoAlAC44CTdZOA8APjgAbTUDWTUAXUdnFAYsADEiMJ9fMMiABRVgGgA6UxIIPgA3dG8ARl9k3VTJAGV0PnQLaGzvABNubUCiVBAAI0xciLgB7ThIuocnZoh8QlJsgB4AFTJw7xpOi0D+we5h0YmoKcjtm5bGNZZvBDs4B+lZQNdPrD8yN4fTLfNKZAHvQ5dGAA+S+ADcDj6XT43FMSlQRAs6zgAEkAOo6GDBXBPUjeH5MdYkQLUOhpSksTYjcaYCgcHj8IQiMRwMYQSpmIjhAJwKoQYB9BF2fGE4kMsmrZhkn7tI4waC+eF2IATS Playground - An online editor for exploring TypeScript and JavaS...
The Playground lets you write TypeScript or JavaScript online in a safe and sharable way.