For example with ReactQuery's useQuery<TQueryFnData = unknown, TError = unknown, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>, I want do like;
type QueryTypeParams = [Record<string, number>, unknown, unknown, "aKey" as const]
const {data} = useQuery<...QueryTypeParams>(
"anotherKey", // <- expects typescript error
() => {...}
)
But the compiler saids
Variable 'QueryTypeParams' implicitly has an 'any' type.
at where I use spread operator.
Is there any way to pass generics parameters at once?
Thanks in advance.