-
-
Notifications
You must be signed in to change notification settings - Fork 71
Expand file tree
/
Copy pathtypes.ts
More file actions
44 lines (42 loc) · 1.28 KB
/
types.ts
File metadata and controls
44 lines (42 loc) · 1.28 KB
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
import type { Type } from '@angular/core'
import type {
ClientEventBusConfig,
TanStackDevtoolsConfig,
} from '@tanstack/devtools'
export type TanStackDevtoolsAngularPlugin = {
id?: string
component: Type<any>
name: string | Type<any>
inputs?: Record<string, any>
defaultOpen?: boolean
}
export interface TanStackDevtoolsAngularInit {
/**
* Array of plugins to be used in the devtools.
* Each plugin should have a `component` that is an Angular component class.
*
* Example:
* ```typescript
* @Component({
* template: `<tanstack-devtools [plugins]="plugins" />`,
* imports: [TanStackDevtoolsComponent],
* })
* class AppComponent {
* plugins: TanStackDevtoolsAngularPlugin[] = [
* { name: 'My Plugin', component: MyPluginComponent }
* ];
* }
* ```
*/
plugins?: Array<TanStackDevtoolsAngularPlugin>
/**
* Configuration for the devtools shell. These configuration options are used to set the
* initial state of the devtools when it is started for the first time. Afterwards,
* the settings are persisted in local storage and changed through the settings panel.
*/
config?: Partial<TanStackDevtoolsConfig>
/**
* Configuration for the TanStack Devtools client event bus.
*/
eventBusConfig?: ClientEventBusConfig
}