TanStackT
TanStack15mo ago
3 replies
standard-azure

How can I specify accepting a queryOptions as a type?

I want to make a SelectAsync component that accepts this prop:

 /**
   * A react-query queryOptions to be passed to {@link useQuery},
   * with data being returned as an array of `items`.
   *
   * The query is made immediately upon mount, not lazily upon dropdown open.
   */
  getItemsQueryOptions: UseQueryOptions<{ items: Item[] }>;


I'm not sure that UseQueryOptions is the right type to specify though, since my constructed queryOptions calls aren't matching up
Was this page helpful?