createQueries

Function: createQueries()

ts
function createQueries<T, TCombinedResult>(createQueriesOptions, queryClient?): TCombinedResult;
function createQueries<T, TCombinedResult>(createQueriesOptions, queryClient?): TCombinedResult;

Defined in: packages/svelte-query/src/createQueries.svelte.ts:189

Type Parameters

T

T extends any[]

TCombinedResult

TCombinedResult = T extends [] ? [] : T extends [Head] ? [GetCreateQueryResult<Head>] : T extends [Head, ...Tails[]] ? [...Tails[]] extends [] ? [] : [...Tails[]] extends [Head] ? [GetCreateQueryResult<Head>, GetCreateQueryResult<Head>] : [...Tails[]] extends [Head, ...Tails[]] ? [...Tails[]] extends [] ? [] : [...Tails[]] extends [Head] ? [GetCreateQueryResult<Head>, GetCreateQueryResult<Head>, GetCreateQueryResult<Head>] : [...Tails[]] extends [Head, ...Tails[]] ? [...(...)[]] extends [] ? [] : ... extends ... ? ... : ... : [...{ [K in (...)]: (...) }[]] : [...{ [K in string | number | symbol]: GetCreateQueryResult<Tails[K<(...)>]> }[]] : { [K in string | number | symbol]: GetCreateQueryResult<T[K<K>]> }

Parameters

createQueriesOptions

Accessor<{ combine?: (result) => TCombinedResult; queries: | readonly [T extends [] ? [] : T extends [Head] ? [GetCreateQueryOptionsForCreateQueries<Head>] : T extends [Head, ...Tails[]] ? [...Tails[]] extends [] ? [] : [...Tails[]] extends [Head] ? [GetCreateQueryOptionsForCreateQueries<...>, GetCreateQueryOptionsForCreateQueries<...>] : [...(...)[]] extends [..., ...(...)[]] ? ... extends ... ? ... : ... : ... extends ... ? ... : ... : readonly unknown[] extends T ? T : T extends CreateQueryOptionsForCreateQueries<..., ..., ..., ...>[] ? CreateQueryOptionsForCreateQueries<..., ..., ..., ...>[] : CreateQueryOptionsForCreateQueries<..., ..., ..., ...>[]] | readonly [{ [K in string | number | symbol]: GetCreateQueryOptionsForCreateQueries<T[K<K>]> }]; }>

queryClient?

Accessor<QueryClient>

Returns

TCombinedResult