-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(angular-query): add jsdoc (#7379)
* fix: remove unused export
- Loading branch information
Showing
18 changed files
with
439 additions
and
34 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
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
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
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
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
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
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
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
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
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
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
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
24 changes: 21 additions & 3 deletions
24
packages/angular-query-experimental/src/inject-query-client.ts
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 |
---|---|---|
@@ -1,7 +1,25 @@ | ||
import { createNoopInjectionToken } from './util/create-injection-token/create-injection-token' | ||
import type { QueryClient } from '@tanstack/query-core' | ||
|
||
const [injectQueryClient, provideQueryClient, QUERY_CLIENT] = | ||
createNoopInjectionToken<QueryClient>('QueryClientToken') | ||
const tokens = createNoopInjectionToken<QueryClient>('QueryClientToken') | ||
|
||
export { injectQueryClient, provideQueryClient, QUERY_CLIENT } | ||
/** | ||
* Injects the `QueryClient` instance into the component or service. | ||
* | ||
* **Example** | ||
* ```ts | ||
* const queryClient = injectQueryClient(); | ||
* ``` | ||
* @returns The `QueryClient` instance. | ||
* @public | ||
*/ | ||
export const injectQueryClient = tokens[0] | ||
|
||
/** | ||
* Usually {@link provideAngularQuery} is used once to set up TanStack Query and the | ||
* {@link https://tanstack.com/query/latest/docs/reference/QueryClient|QueryClient} | ||
* for the entire application. You can use `provideQueryClient` to provide a | ||
* different `QueryClient` instance for a part of the application. | ||
* @public | ||
*/ | ||
export const provideQueryClient = tokens[1] |
Oops, something went wrong.