Skip to content

Commit

Permalink
Remove VoidFunction type (#6809)
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronMoat authored Jan 2, 2025
1 parent 3ab15e5 commit 4912f19
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/four-bees-relate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphql-tools/utils': patch
---

Remove use of `VoidFunction` type, which requires DOM types
2 changes: 1 addition & 1 deletion packages/utils/src/registerAbortSignalListener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const getListenersOfAbortSignal = memoize1(function getListenersOfAbortSignal(si
* "possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit."
* warning occuring on Node.js
*/
export function registerAbortSignalListener(signal: AbortSignal, listener: VoidFunction) {
export function registerAbortSignalListener(signal: AbortSignal, listener: () => void) {
// If the signal is already aborted, call the listener immediately
if (signal.aborted) {
listener();
Expand Down

0 comments on commit 4912f19

Please sign in to comment.