Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import type {
SimpleChanges,
} from '@angular/core'
import type {
DevToolsErrorType,
DevtoolsErrorType,
TanstackQueryDevtools,
} from '@tanstack/query-devtools'

Expand Down Expand Up @@ -91,7 +91,7 @@ export class AngularQueryDevtools
/**
* Use this so you can define custom errors that can be shown in the devtools.
*/
@Input() errorTypes?: Array<DevToolsErrorType>
@Input() errorTypes?: Array<DevtoolsErrorType>

@ViewChild('ref') ref!: ElementRef

Expand Down
4 changes: 2 additions & 2 deletions packages/query-devtools/src/Context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ type YPosition = 'top' | 'bottom'
export type DevtoolsPosition = XPosition | YPosition
export type DevtoolsButtonPosition = `${YPosition}-${XPosition}` | 'relative'

export interface DevToolsErrorType {
export interface DevtoolsErrorType {
/**
* The name of the error.
*/
Expand All @@ -27,7 +27,7 @@ export interface QueryDevtoolsProps {
buttonPosition?: DevtoolsButtonPosition
position?: DevtoolsPosition
initialIsOpen?: boolean
errorTypes?: Array<DevToolsErrorType>
errorTypes?: Array<DevtoolsErrorType>
shadowDOMTarget?: ShadowRoot
}

Expand Down
4 changes: 2 additions & 2 deletions packages/query-devtools/src/Devtools.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ import {
useTheme,
} from './Context'
import type {
DevToolsErrorType,
DevtoolsButtonPosition,
DevtoolsErrorType,
DevtoolsPosition,
QueryDevtoolsProps,
} from './Context'
Expand Down Expand Up @@ -1916,7 +1916,7 @@ const QueryDetails = () => {
promise?.catch(() => {})
}

const triggerError = (errorType?: DevToolsErrorType) => {
const triggerError = (errorType?: DevtoolsErrorType) => {
const error =
errorType?.initializer(activeQuery()!) ??
new Error('Unknown error from devtools')
Expand Down
8 changes: 4 additions & 4 deletions packages/query-devtools/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import type {
} from '@tanstack/query-core'
import type { DevtoolsComponentType } from './Devtools'
import type {
DevToolsErrorType,
DevtoolsButtonPosition,
DevtoolsErrorType,
DevtoolsPosition,
QueryDevtoolsProps,
} from './Context'
import type { Signal } from 'solid-js'

export type { DevtoolsButtonPosition, DevtoolsPosition, DevToolsErrorType }
export type { DevtoolsButtonPosition, DevtoolsPosition, DevtoolsErrorType }
export interface TanstackQueryDevtoolsConfig extends QueryDevtoolsProps {
styleNonce?: string
shadowDOMTarget?: ShadowRoot
Expand All @@ -31,7 +31,7 @@ class TanstackQueryDevtools {
#buttonPosition: Signal<DevtoolsButtonPosition | undefined>
#position: Signal<DevtoolsPosition | undefined>
#initialIsOpen: Signal<boolean | undefined>
#errorTypes: Signal<Array<DevToolsErrorType> | undefined>
#errorTypes: Signal<Array<DevtoolsErrorType> | undefined>
#Component: DevtoolsComponentType | undefined
#dispose?: () => void

Expand Down Expand Up @@ -72,7 +72,7 @@ class TanstackQueryDevtools {
this.#initialIsOpen[1](isOpen)
}

setErrorTypes(errorTypes: Array<DevToolsErrorType>) {
setErrorTypes(errorTypes: Array<DevtoolsErrorType>) {
this.#errorTypes[1](errorTypes)
}

Expand Down
4 changes: 2 additions & 2 deletions packages/react-query-devtools/src/devtools.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import * as React from 'react'
import { onlineManager, useQueryClient } from '@tanstack/react-query'
import { TanstackQueryDevtools } from '@tanstack/query-devtools'
import type {
DevToolsErrorType,
DevtoolsButtonPosition,
DevtoolsErrorType,
DevtoolsPosition,
} from '@tanstack/query-devtools'
import type { QueryClient } from '@tanstack/react-query'
Expand Down Expand Up @@ -33,7 +33,7 @@ export interface DevtoolsOptions {
/**
* Use this so you can define custom errors that can be shown in the devtools.
*/
errorTypes?: Array<DevToolsErrorType>
errorTypes?: Array<DevtoolsErrorType>
/**
* 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.
*/
Expand Down
4 changes: 2 additions & 2 deletions packages/solid-query-devtools/src/devtools.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import { onlineManager, useQueryClient } from '@tanstack/solid-query'
import { isServer } from 'solid-js/web'
import { TanstackQueryDevtools } from '@tanstack/query-devtools'
import type {
DevToolsErrorType,
DevtoolsButtonPosition,
DevtoolsErrorType,
DevtoolsPosition,
} from '@tanstack/query-devtools'
import type { QueryClient } from '@tanstack/solid-query'
Expand Down Expand Up @@ -43,7 +43,7 @@ interface DevtoolsOptions {
/**
* Use this so you can define custom errors that can be shown in the devtools.
*/
errorTypes?: Array<DevToolsErrorType>
errorTypes?: Array<DevtoolsErrorType>
/**
* 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.
*/
Expand Down
4 changes: 2 additions & 2 deletions packages/svelte-query-devtools/src/Devtools.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import { onlineManager, useQueryClient } from '@tanstack/svelte-query'
import type { QueryClient } from '@tanstack/svelte-query'
import type {
DevToolsErrorType,
DevtoolsButtonPosition,
DevtoolsErrorType,
DevtoolsPosition,
TanstackQueryDevtools,
} from '@tanstack/query-devtools'
Expand All @@ -14,7 +14,7 @@
export let buttonPosition: DevtoolsButtonPosition = 'bottom-right'
export let position: DevtoolsPosition = 'bottom'
export let client: QueryClient = useQueryClient()
export let errorTypes: Array<DevToolsErrorType> = []
export let errorTypes: Array<DevtoolsErrorType> = []
export let styleNonce: string | undefined = undefined
export let shadowDOMTarget: ShadowRoot | undefined = undefined

Expand Down
4 changes: 2 additions & 2 deletions packages/vue-query-devtools/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type {
DevToolsErrorType,
DevtoolsButtonPosition,
DevtoolsErrorType,
DevtoolsPosition,
} from '@tanstack/query-devtools'
import type { QueryClient } from '@tanstack/vue-query'
Expand Down Expand Up @@ -29,7 +29,7 @@ export interface DevtoolsOptions {
/**
* Use this so you can define custom errors that can be shown in the devtools.
*/
errorTypes?: Array<DevToolsErrorType>
errorTypes?: Array<DevtoolsErrorType>
/**
* 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.
*/
Expand Down