usequery error typing
Hello everyone,
When I use a queryKey created with queryOptions in useQuery, the data type is automatically inferred from the return value of queryFn.
However, the error type is inferred as Error.
Is there a reason for this?
Other than using generics in useQuery to define the error type or using declare, are there any other options?
When I use a queryKey created with queryOptions in useQuery, the data type is automatically inferred from the return value of queryFn.
However, the error type is inferred as Error.
Is there a reason for this?
Other than using generics in useQuery to define the error type or using declare, are there any other options?