-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(svelte-query): Auto-generate reference docs (#7751)
* docs(svelte-query): Auto-generate reference docs * Fix knip, update exclude
- Loading branch information
1 parent
81ca333
commit 13817e9
Showing
43 changed files
with
1,556 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
docs/framework/svelte/reference/createbasemutationresult.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Type Alias: CreateBaseMutationResult\<TData, TError, TVariables, TContext\> | ||
|
||
```ts | ||
type CreateBaseMutationResult<TData, TError, TVariables, TContext>: Override<MutationObserverResult<TData, TError, TVariables, TContext>, object> & object; | ||
``` | ||
|
||
## Type declaration | ||
|
||
### mutateAsync | ||
|
||
```ts | ||
mutateAsync: CreateMutateAsyncFunction<TData, TError, TVariables, TContext> | ||
``` | ||
|
||
## Type Parameters | ||
|
||
• **TData** = `unknown` | ||
|
||
• **TError** = `DefaultError` | ||
|
||
• **TVariables** = `unknown` | ||
|
||
• **TContext** = `unknown` | ||
|
||
## Defined in | ||
|
||
[packages/svelte-query/src/types.ts:113](https://github.com/TanStack/query/blob/81ca3332486f7b98502d4f5ea50588d88a80f59b/packages/svelte-query/src/types.ts#L113) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Type Alias: CreateBaseQueryOptions\<TQueryFnData, TError, TData, TQueryData, TQueryKey\> | ||
|
||
```ts | ||
type CreateBaseQueryOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey>: QueryObserverOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey>; | ||
``` | ||
|
||
Options for createBaseQuery | ||
|
||
## Type Parameters | ||
|
||
• **TQueryFnData** = `unknown` | ||
|
||
• **TError** = `DefaultError` | ||
|
||
• **TData** = `TQueryFnData` | ||
|
||
• **TQueryData** = `TQueryFnData` | ||
|
||
• **TQueryKey** _extends_ `QueryKey` = `QueryKey` | ||
|
||
## Defined in | ||
|
||
[packages/svelte-query/src/types.ts:23](https://github.com/TanStack/query/blob/81ca3332486f7b98502d4f5ea50588d88a80f59b/packages/svelte-query/src/types.ts#L23) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Type Alias: CreateBaseQueryResult\<TData, TError\> | ||
|
||
```ts | ||
type CreateBaseQueryResult<TData, TError>: Readable<QueryObserverResult<TData, TError>>; | ||
``` | ||
|
||
Result from createBaseQuery | ||
|
||
## Type Parameters | ||
|
||
• **TData** = `unknown` | ||
|
||
• **TError** = `DefaultError` | ||
|
||
## Defined in | ||
|
||
[packages/svelte-query/src/types.ts:32](https://github.com/TanStack/query/blob/81ca3332486f7b98502d4f5ea50588d88a80f59b/packages/svelte-query/src/types.ts#L32) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Function: createInfiniteQuery() | ||
|
||
```ts | ||
function createInfiniteQuery< | ||
TQueryFnData, | ||
TError, | ||
TData, | ||
TQueryKey, | ||
TPageParam, | ||
>(options, queryClient?): CreateInfiniteQueryResult<TData, TError> | ||
``` | ||
|
||
## Type Parameters | ||
|
||
• **TQueryFnData** | ||
|
||
• **TError** = `Error` | ||
|
||
• **TData** = `InfiniteData`\<`TQueryFnData`, `unknown`\> | ||
|
||
• **TQueryKey** _extends_ `QueryKey` = `QueryKey` | ||
|
||
• **TPageParam** = `unknown` | ||
|
||
## Parameters | ||
|
||
• **options**: [`StoreOrVal`](storeorval.md)\<[`CreateInfiniteQueryOptions`](createinfinitequeryoptions.md)\<`TQueryFnData`, `TError`, `TData`, `TQueryFnData`, `TQueryKey`, `TPageParam`\>\> | ||
|
||
• **queryClient?**: `QueryClient` | ||
|
||
## Returns | ||
|
||
[`CreateInfiniteQueryResult`](createinfinitequeryresult.md)\<`TData`, `TError`\> | ||
|
||
## Defined in | ||
|
||
[packages/svelte-query/src/createInfiniteQuery.ts:16](https://github.com/TanStack/query/blob/81ca3332486f7b98502d4f5ea50588d88a80f59b/packages/svelte-query/src/createInfiniteQuery.ts#L16) |
25 changes: 25 additions & 0 deletions
25
docs/framework/svelte/reference/createinfinitequeryoptions.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Type Alias: CreateInfiniteQueryOptions\<TQueryFnData, TError, TData, TQueryData, TQueryKey, TPageParam\> | ||
|
||
```ts | ||
type CreateInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey, TPageParam>: InfiniteQueryObserverOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey, TPageParam>; | ||
``` | ||
|
||
Options for createInfiniteQuery | ||
|
||
## Type Parameters | ||
|
||
• **TQueryFnData** = `unknown` | ||
|
||
• **TError** = `DefaultError` | ||
|
||
• **TData** = `TQueryFnData` | ||
|
||
• **TQueryData** = `TQueryFnData` | ||
|
||
• **TQueryKey** _extends_ `QueryKey` = `QueryKey` | ||
|
||
• **TPageParam** = `unknown` | ||
|
||
## Defined in | ||
|
||
[packages/svelte-query/src/types.ts:52](https://github.com/TanStack/query/blob/81ca3332486f7b98502d4f5ea50588d88a80f59b/packages/svelte-query/src/types.ts#L52) |
17 changes: 17 additions & 0 deletions
17
docs/framework/svelte/reference/createinfinitequeryresult.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Type Alias: CreateInfiniteQueryResult\<TData, TError\> | ||
|
||
```ts | ||
type CreateInfiniteQueryResult<TData, TError>: Readable<InfiniteQueryObserverResult<TData, TError>>; | ||
``` | ||
|
||
Result from createInfiniteQuery | ||
|
||
## Type Parameters | ||
|
||
• **TData** = `unknown` | ||
|
||
• **TError** = `DefaultError` | ||
|
||
## Defined in | ||
|
||
[packages/svelte-query/src/types.ts:69](https://github.com/TanStack/query/blob/81ca3332486f7b98502d4f5ea50588d88a80f59b/packages/svelte-query/src/types.ts#L69) |
19 changes: 19 additions & 0 deletions
19
docs/framework/svelte/reference/createmutateasyncfunction.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Type Alias: CreateMutateAsyncFunction\<TData, TError, TVariables, TContext\> | ||
|
||
```ts | ||
type CreateMutateAsyncFunction<TData, TError, TVariables, TContext>: MutateFunction<TData, TError, TVariables, TContext>; | ||
``` | ||
|
||
## Type Parameters | ||
|
||
• **TData** = `unknown` | ||
|
||
• **TError** = `DefaultError` | ||
|
||
• **TVariables** = `void` | ||
|
||
• **TContext** = `unknown` | ||
|
||
## Defined in | ||
|
||
[packages/svelte-query/src/types.ts:106](https://github.com/TanStack/query/blob/81ca3332486f7b98502d4f5ea50588d88a80f59b/packages/svelte-query/src/types.ts#L106) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Type Alias: CreateMutateFunction()\<TData, TError, TVariables, TContext\> | ||
|
||
```ts | ||
type CreateMutateFunction<TData, TError, TVariables, TContext>: (...args) => void; | ||
``` | ||
|
||
## Type Parameters | ||
|
||
• **TData** = `unknown` | ||
|
||
• **TError** = `DefaultError` | ||
|
||
• **TVariables** = `void` | ||
|
||
• **TContext** = `unknown` | ||
|
||
## Parameters | ||
|
||
• ...**args**: `Parameters`\<`MutateFunction`\<`TData`, `TError`, `TVariables`, `TContext`\>\> | ||
|
||
## Returns | ||
|
||
`void` | ||
|
||
## Defined in | ||
|
||
[packages/svelte-query/src/types.ts:97](https://github.com/TanStack/query/blob/81ca3332486f7b98502d4f5ea50588d88a80f59b/packages/svelte-query/src/types.ts#L97) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Function: createMutation() | ||
|
||
```ts | ||
function createMutation<TData, TError, TVariables, TContext>( | ||
options, | ||
queryClient?, | ||
): CreateMutationResult<TData, TError, TVariables, TContext> | ||
``` | ||
|
||
## Type Parameters | ||
|
||
• **TData** = `unknown` | ||
|
||
• **TError** = `Error` | ||
|
||
• **TVariables** = `void` | ||
|
||
• **TContext** = `unknown` | ||
|
||
## Parameters | ||
|
||
• **options**: [`StoreOrVal`](storeorval.md)\<[`CreateMutationOptions`](createmutationoptions.md)\<`TData`, `TError`, `TVariables`, `TContext`\>\> | ||
|
||
• **queryClient?**: `QueryClient` | ||
|
||
## Returns | ||
|
||
[`CreateMutationResult`](createmutationresult.md)\<`TData`, `TError`, `TVariables`, `TContext`\> | ||
|
||
## Defined in | ||
|
||
[packages/svelte-query/src/createMutation.ts:13](https://github.com/TanStack/query/blob/81ca3332486f7b98502d4f5ea50588d88a80f59b/packages/svelte-query/src/createMutation.ts#L13) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Type Alias: CreateMutationOptions\<TData, TError, TVariables, TContext\> | ||
|
||
```ts | ||
type CreateMutationOptions<TData, TError, TVariables, TContext>: OmitKeyof<MutationObserverOptions<TData, TError, TVariables, TContext>, "_defaulted">; | ||
``` | ||
|
||
Options for createMutation | ||
|
||
## Type Parameters | ||
|
||
• **TData** = `unknown` | ||
|
||
• **TError** = `DefaultError` | ||
|
||
• **TVariables** = `void` | ||
|
||
• **TContext** = `unknown` | ||
|
||
## Defined in | ||
|
||
[packages/svelte-query/src/types.ts:87](https://github.com/TanStack/query/blob/81ca3332486f7b98502d4f5ea50588d88a80f59b/packages/svelte-query/src/types.ts#L87) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Type Alias: CreateMutationResult\<TData, TError, TVariables, TContext\> | ||
|
||
```ts | ||
type CreateMutationResult<TData, TError, TVariables, TContext>: Readable<CreateBaseMutationResult<TData, TError, TVariables, TContext>>; | ||
``` | ||
|
||
Result from createMutation | ||
|
||
## Type Parameters | ||
|
||
• **TData** = `unknown` | ||
|
||
• **TError** = `DefaultError` | ||
|
||
• **TVariables** = `unknown` | ||
|
||
• **TContext** = `unknown` | ||
|
||
## Defined in | ||
|
||
[packages/svelte-query/src/types.ts:126](https://github.com/TanStack/query/blob/81ca3332486f7b98502d4f5ea50588d88a80f59b/packages/svelte-query/src/types.ts#L126) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Function: createQueries() | ||
|
||
```ts | ||
function createQueries<T, TCombinedResult>( | ||
__namedParameters, | ||
queryClient?, | ||
): Readable<TCombinedResult> | ||
``` | ||
|
||
## Type Parameters | ||
|
||
• **T** _extends_ `any`[] | ||
|
||
• **TCombinedResult** = `T` _extends_ [] ? [] : `T` _extends_ [`Head`] ? [`GetResults`\<`Head`\>] : `T` _extends_ [`Head`, `...Tail[]`] ? [`...Tail[]`] _extends_ [] ? [] : [`...Tail[]`] _extends_ [`Head`] ? [`GetResults`\<`Head`\>, `GetResults`\<`Head`\>] : [`...Tail[]`] _extends_ [`Head`, `...Tail[]`] ? [`...Tail[]`] _extends_ [] ? [] : [`...Tail[]`] _extends_ [`Head`] ? [`GetResults`\<`Head`\>, `GetResults`\<`Head`\>, `GetResults`\<`Head`\>] : [`...Tail[]`] _extends_ [`Head`, `...Tail[]`] ? [`...(...)[]`] _extends_ [] ? [] : ... _extends_ ... ? ... : ... : [`...(...)[]`] _extends_ ...[] ? ...[] : ...[] : [`...Tail[]`] _extends_ `QueryObserverOptionsForCreateQueries`\<`TQueryFnData`, `TError`, `TData`, `any`\>[] ? `QueryObserverResult`\<`unknown` _extends_ `TData` ? `TQueryFnData` : `TData`, `unknown` _extends_ `TError` ? `Error` : `TError`\>[] : `QueryObserverResult`[] : `T` _extends_ `QueryObserverOptionsForCreateQueries`\<`TQueryFnData`, `TError`, `TData`, `any`\>[] ? `QueryObserverResult`\<`unknown` _extends_ `TData` ? `TQueryFnData` : `TData`, `unknown` _extends_ `TError` ? `Error` : `TError`\>[] : `QueryObserverResult`[] | ||
|
||
## Parameters | ||
|
||
• **\_\_namedParameters** | ||
|
||
• **\_\_namedParameters.combine?** | ||
|
||
• **\_\_namedParameters.queries?**: [`StoreOrVal`](storeorval.md)\<[`...(T extends [] ? [] : T extends [Head] ? [GetOptions<Head>] : T extends [Head, ...Tail[]] ? [...Tail[]] extends [] ? [] : [...Tail[]] extends [Head] ? [GetOptions<Head>, GetOptions<Head>] : [...Tail[]] extends [Head, ...Tail[]] ? [...(...)[]] extends [] ? [] : (...) extends (...) ? (...) : (...) : readonly (...)[] extends [...(...)[]] ? [...(...)[]] : (...) extends (...) ? (...) : (...) : readonly unknown[] extends T ? T : T extends QueryObserverOptionsForCreateQueries<TQueryFnData, TError, TData, TQueryKey>[] ? QueryObserverOptionsForCreateQueries<TQueryFnData, TError, TData, TQueryKey>[] : QueryObserverOptionsForCreateQueries<unknown, Error, unknown, QueryKey>[])[]`]\> | ||
|
||
• **queryClient?**: `QueryClient` | ||
|
||
## Returns | ||
|
||
`Readable`\<`TCombinedResult`\> | ||
|
||
## Defined in | ||
|
||
[packages/svelte-query/src/createQueries.ts:186](https://github.com/TanStack/query/blob/81ca3332486f7b98502d4f5ea50588d88a80f59b/packages/svelte-query/src/createQueries.ts#L186) |
Oops, something went wrong.