@cripty2001/utils 0.0.246 → 0.0.247

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -94,11 +94,10 @@ export declare function useAsync<I, O>(f: (input: I, setProgress: (p: number) =>
94
94
  * @param f @see useAsync
95
95
  * @param data @see useAsync
96
96
  * @param interval The interval to re-execute the async function. If null, the async function will not be re-executed.
97
- * @param debounce @see useAsync
98
97
  *
99
98
  * @returns @see useAsync
100
99
  */
101
- export declare function useAsyncPeriodic<I, O>(f: (input: I, setProgress: (p: number) => void, signal: AbortSignal) => Promise<O>, data: I, interval: number, debounce?: number): Dispatcher<any, O>;
100
+ export declare function useAsyncPeriodic<I, O>(f: (input: I, setProgress: (p: number) => void, signal: AbortSignal) => Promise<O>, data: I, interval: number): Dispatcher<any, O>;
102
101
  /**
103
102
  * Async version of useEffect with debouncing. Executes an async function as a side effect when data changes.
104
103
  *
@@ -203,19 +203,18 @@ function useAsync(f, data, debouce = 200) {
203
203
  * @param f @see useAsync
204
204
  * @param data @see useAsync
205
205
  * @param interval The interval to re-execute the async function. If null, the async function will not be re-executed.
206
- * @param debounce @see useAsync
207
206
  *
208
207
  * @returns @see useAsync
209
208
  */
210
- function useAsyncPeriodic(f, data, interval, debounce) {
209
+ function useAsyncPeriodic(f, data, interval) {
211
210
  const timer = useClock(interval);
212
211
  const bundle = (0, react_1.useMemo)(() => {
213
212
  return {
214
213
  data,
215
214
  interval
216
215
  };
217
- }, [data, timer, debounce]);
218
- return useAsync((i, p, s) => f(i.data, p, s), bundle, debounce);
216
+ }, [data, timer]);
217
+ return useAsync((i, p, s) => f(i.data, p, s), bundle);
219
218
  }
220
219
  /**
221
220
  * Async version of useEffect with debouncing. Executes an async function as a side effect when data changes.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cripty2001/utils",
3
- "version": "0.0.246",
3
+ "version": "0.0.247",
4
4
  "description": "Internal Set of utils. If you need them use them, otherwise go to the next package ;)",
5
5
  "homepage": "https://github.com/cripty2001/utils#readme",
6
6
  "bugs": {