Skip to content
Open
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
10 changes: 10 additions & 0 deletions .changeset/chatty-socks-act.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
"@tanstack/angular-query-experimental": patch
"@tanstack/query-devtools": patch
"@tanstack/react-query-devtools": patch
"@tanstack/solid-query-devtools": patch
"@tanstack/vue-query-devtools": patch
---

fix(devtools): change onClose callback type from () => unknown to () => void

2 changes: 1 addition & 1 deletion docs/framework/react/devtools.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ function App() {
- Default: `{ height: '500px' }`
- Example: `{ height: '100%' }`
- Example: `{ height: '100%', width: '100%' }`
- `onClose?: () => unknown`
- `onClose?: () => void`
- Callback function that is called when the devtools panel is closed
- `client?: QueryClient`,
- Use this to use a custom QueryClient. Otherwise, the one from the nearest context will be used.
Expand Down
2 changes: 1 addition & 1 deletion docs/framework/vue/devtools.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function toggleDevtools() {
- Default: `{ height: '500px' }`
- Example: `{ height: '100%' }`
- Example: `{ height: '100%', width: '100%' }`
- `onClose?: () => unknown`
- `onClose?: () => void`
- Callback function that is called when the devtools panel is closed
- `client?: QueryClient`,
- Use this to use a custom QueryClient. Otherwise, the one from the nearest context will be used.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export interface DevtoolsPanelOptions {
/**
* Callback function that is called when the devtools panel is closed
*/
onClose?: () => unknown
onClose?: () => void

/**
* Element where to render the devtools panel. When set to undefined or null, the devtools panel will not be created, or destroyed if existing.
Expand Down
2 changes: 1 addition & 1 deletion packages/query-devtools/src/Devtools.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ interface ContentViewProps {
localStore: StorageObject<string>
setLocalStore: StorageSetter<string, unknown>
showPanelViewOnly?: boolean
onClose?: () => unknown
onClose?: () => void
}

interface QueryStatusProps {
Expand Down
2 changes: 1 addition & 1 deletion packages/query-devtools/src/TanstackQueryDevtoolsPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import type { Signal } from 'solid-js'
export interface TanstackQueryDevtoolsPanelConfig extends QueryDevtoolsProps {
styleNonce?: string
shadowDOMTarget?: ShadowRoot
onClose?: () => unknown
onClose?: () => void
}

class TanstackQueryDevtoolsPanel {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export interface QueryDevtoolsProps {
initialIsOpen?: boolean
errorTypes?: Array<DevtoolsErrorType>
shadowDOMTarget?: ShadowRoot
onClose?: () => unknown
onClose?: () => void
hideDisabledQueries?: boolean
theme?: Theme
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export interface DevtoolsPanelOptions {
/**
* Callback function that is called when the devtools panel is closed
*/
onClose?: () => unknown
onClose?: () => void
/**
* Set this to true to hide disabled queries from the devtools panel.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/solid-query-devtools/src/devtoolsPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export interface DevtoolsPanelOptions {
/**
* Callback function that is called when the devtools panel is closed
*/
onClose?: () => unknown
onClose?: () => void
/**
* Set this to true to hide disabled queries from the devtools panel.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/vue-query-devtools/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export interface DevtoolsPanelOptions {
/**
* Callback function that is called when the devtools panel is closed
*/
onClose?: () => unknown
onClose?: () => void
/**
* Set this to true to hide disabled queries from the devtools panel.
*/
Expand Down