Skip to content
Source
Sign inSign up
TanStack/query
Open History to see the last commit

queryFeature.md

49 lines1.3 KB

1---
2id: queryFeature
3title: queryFeature
4---
5​
6<!-- DO NOT EDIT: this page is autogenerated from the type comments -->
7​
8```ts
9function queryFeature<TFeatureKind extends "Devtools" | "PersistQueryClient">(kind: TFeatureKind, providers: Provider[]): QueryFeature<TFeatureKind>;
10```
11​
12Defined in: [packages/angular-query-experimental/src/providers.ts:143](https://github.com/TanStack/query/blob/main/packages/angular-query-experimental/src/providers.ts#L143)
13​
14Helper function to create an object that represents a Query feature.
15​
16## Type Parameters
17​
18### TFeatureKind
19​
20`TFeatureKind` *extends* `"Devtools"` \| `"PersistQueryClient"`
21​
22## Parameters
23​
24### kind
25​
26`TFeatureKind`
27​
28The kind of feature, e.g. `'Devtools'`.
29​
30### providers
31​
32`Provider`[]
33​
34The Angular providers this feature contributes to `provideTanStackQuery`.
35​
36## Returns
37​
38[`QueryFeature`](../interfaces/QueryFeature.md)\<`TFeatureKind`\>
39​
40A Query feature.
41​
42<a id="result-properties"></a>
43​
44### Result properties
45​
46| Property | Type | Description |
47| ------ | ------ | ------ |
48| <a id="result-property-ɵkind"></a> `ɵkind` | `TFeatureKind` | The kind of the feature, e.g. `'Devtools'` or `'PersistQueryClient'`. |
49| <a id="result-property-ɵproviders"></a> `ɵproviders` | `Provider`[] | The providers that `provideTanStackQuery` registers for the feature. |