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

queryFeature.md

47 lines1.2 KB

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