Skip to content

Commit 3d21cac

Browse files
authored
fix(query-devtools): align onClose setter type (#10607)
1 parent fcee7bd commit 3d21cac

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@tanstack/query-devtools': patch
3+
---
4+
5+
Update the devtools panel `setOnClose` callback type to return `void`.

packages/query-devtools/src/TanstackQueryDevtoolsPanel.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class TanstackQueryDevtoolsPanel {
3434
#initialIsOpen: Signal<boolean | undefined>
3535
#errorTypes: Signal<Array<DevtoolsErrorType> | undefined>
3636
#hideDisabledQueries: Signal<boolean | undefined>
37-
#onClose: Signal<(() => unknown) | undefined>
37+
#onClose: Signal<(() => void) | undefined>
3838
#Component: DevtoolsComponentType | undefined
3939
#theme: Signal<Theme | undefined>
4040
#dispose?: () => void
@@ -90,7 +90,7 @@ class TanstackQueryDevtoolsPanel {
9090
this.#client[1](client)
9191
}
9292

93-
setOnClose(onClose: () => unknown) {
93+
setOnClose(onClose: () => void) {
9494
this.#onClose[1](() => onClose)
9595
}
9696

0 commit comments

Comments
 (0)