You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{queryOptions}from"@tanstack/vue-query"import{computed}from"vue"queryOptions({queryKey: ["hello"],queryFn: ({ queryKey })=>{queryKey// ^? (parameter) queryKey: string[]}})queryOptions({queryKey: computed(()=>["hello"]),queryFn: ({ queryKey })=>{queryKey// ^? (parameter) queryKey: readonly unknown[]// the type should be the same as in the first example without computed}})
I noticed this after upgrading to the latest version of vue-query (5.35.5) from 5.29.0
The text was updated successfully, but these errors were encountered:
MellKam
changed the title
[vue-query]: invalid inferred type for computed queryKey readonly unknown[]
[vue-query]: invalid inferred type for computed queryKey readonly unknown[] in queryOptions
May 12, 2024
Describe the bug
I noticed this after upgrading to the latest version of vue-query (5.35.5) from 5.29.0
Your minimal, reproducible example
typescript playground reproduction
Tanstack Query adapter
vue-query
TanStack Query version
5.35.5
TypeScript version
5.4.5
The text was updated successfully, but these errors were encountered: