File size: 3,350 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
---
id: DevtoolsOptions
title: DevtoolsOptions
---

# Interface: DevtoolsOptions

Options for configuring the TanStack Query devtools.

## Properties

### buttonPosition?

```ts
optional buttonPosition: DevtoolsButtonPosition;
```

The position of the TanStack logo to open and close the devtools panel.
`top-left` | `top-right` | `bottom-left` | `bottom-right` | `relative`
Defaults to `bottom-right`.

#### Defined in

[providers.ts:192](https://github.com/TanStack/query/blob/main/packages/angular-query-experimental/src/providers.ts#L192)

---

### client?

```ts
optional client: QueryClient;
```

Custom instance of QueryClient

#### Defined in

[providers.ts:202](https://github.com/TanStack/query/blob/main/packages/angular-query-experimental/src/providers.ts#L202)

---

### errorTypes?

```ts
optional errorTypes: DevtoolsErrorType[];
```

Use this so you can define custom errors that can be shown in the devtools.

#### Defined in

[providers.ts:206](https://github.com/TanStack/query/blob/main/packages/angular-query-experimental/src/providers.ts#L206)

---

### initialIsOpen?

```ts
optional initialIsOpen: boolean;
```

Set this true if you want the devtools to default to being open

#### Defined in

[providers.ts:186](https://github.com/TanStack/query/blob/main/packages/angular-query-experimental/src/providers.ts#L186)

---

### loadDevtools?

```ts
optional loadDevtools: boolean | "auto";
```

Whether the developer tools should load.

- `auto`- (Default) Lazily loads devtools when in development mode. Skips loading in production mode.
- `true`- Always load the devtools, regardless of the environment.
- `false`- Never load the devtools, regardless of the environment.

You can use `true` and `false` to override loading developer tools from an environment file.
For example, a test environment might run in production mode but you may want to load developer tools.

Additionally, you can use a signal in the callback to dynamically load the devtools based on a condition. For example,
a signal created from a RxJS observable that listens for a keyboard shortcut.

**Example**

```ts
withDevtools(() => ({
  initialIsOpen: true,
  loadDevtools: inject(ExampleService).loadDevtools(),
}))
```

#### Defined in

[providers.ts:236](https://github.com/TanStack/query/blob/main/packages/angular-query-experimental/src/providers.ts#L236)

---

### position?

```ts
optional position: DevtoolsPosition;
```

The position of the TanStack Query devtools panel.
`top` | `bottom` | `left` | `right`
Defaults to `bottom`.

#### Defined in

[providers.ts:198](https://github.com/TanStack/query/blob/main/packages/angular-query-experimental/src/providers.ts#L198)

---

### shadowDOMTarget?

```ts
optional shadowDOMTarget: ShadowRoot;
```

Use this so you can attach the devtool's styles to a specific element in the DOM.

#### Defined in

[providers.ts:214](https://github.com/TanStack/query/blob/main/packages/angular-query-experimental/src/providers.ts#L214)

---

### styleNonce?

```ts
optional styleNonce: string;
```

Use this to pass a nonce to the style tag that is added to the document head. This is useful if you are using a Content Security Policy (CSP) nonce to allow inline styles.

#### Defined in

[providers.ts:210](https://github.com/TanStack/query/blob/main/packages/angular-query-experimental/src/providers.ts#L210)