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
extended-salmonOP•13mo ago
I'm also using
select a bit in these queryOptions, so that might be part of the issue?extended-salmonOP•13mo 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.
rival-black•13mo 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.