const options = queryOptions({queryKey: ["test"]});
// Doesn't work
function test(arg: QueryOptions) {}
test(options);
// Doesn't work
function test(arg: Parameters<typeof queryOptions>[0]) {}
test(options);
// Works but ...
function test(arg: QueryOptions<unknown, Error, unknown, any[]>) {
// Than inside the function I can no longer do this
let x = queryOptions(arg)
}
// Which is annoying because this works (outside the function):
queryOptions(queryOptions({queryKey: ["test"]))
const options = queryOptions({queryKey: ["test"]});
// Doesn't work
function test(arg: QueryOptions) {}
test(options);
// Doesn't work
function test(arg: Parameters<typeof queryOptions>[0]) {}
test(options);
// Works but ...
function test(arg: QueryOptions<unknown, Error, unknown, any[]>) {
// Than inside the function I can no longer do this
let x = queryOptions(arg)
}
// Which is annoying because this works (outside the function):
queryOptions(queryOptions({queryKey: ["test"]))