Skip to content

Commit

Permalink
v6.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
xnimorz committed Apr 3, 2021
1 parent b4f5063 commit c72a5d7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 6.0.1

- Fixed `useDebouncedCallback` return type. Closed https://github.com/xnimorz/use-debounce/issues/103 thanks to [@VanTanev](https://github.com/VanTanev)

## 6.0.0

- _breakind change_: removed `callback` field, instead of this `useDebouncedCallback` and `useThrottledCallback` returns a callable function:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "use-debounce",
"version": "6.0.0",
"version": "6.0.1",
"description": "Debounce hook for react",
"main": "lib/index.js",
"module": "esm/index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/useDebouncedCallback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface ControlFunctions {
* Note, that if there are no previous invocations it's mean you will get undefined. You should check it in your code properly.
*/
export interface DebouncedState<T extends (...args: any[]) => ReturnType<T>> extends ControlFunctions {
(...args: Parameters<T>): ReturnType<T>;
(...args: Parameters<T>): ReturnType<T> | undefined;
}

/**
Expand Down

0 comments on commit c72a5d7

Please sign in to comment.