@cripty2001/utils 0.0.247 → 0.0.248
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.
- package/dist/react-whispr.d.ts +2 -2
- package/dist/react-whispr.js +2 -2
- package/package.json +1 -1
package/dist/react-whispr.d.ts
CHANGED
|
@@ -91,13 +91,13 @@ export declare function useAsync<I, O>(f: (input: I, setProgress: (p: number) =>
|
|
|
91
91
|
/**
|
|
92
92
|
* Like useAsync, but it also automatically re-execute the async function periodically
|
|
93
93
|
*
|
|
94
|
-
* @param f @see useAsync
|
|
95
94
|
* @param data @see useAsync
|
|
96
95
|
* @param interval The interval to re-execute the async function. If null, the async function will not be re-executed.
|
|
96
|
+
* @param f @see useAsync
|
|
97
97
|
*
|
|
98
98
|
* @returns @see useAsync
|
|
99
99
|
*/
|
|
100
|
-
export declare function useAsyncPeriodic<I, O>(f: (input: I, setProgress: (p: number) => void, signal: AbortSignal) => Promise<O
|
|
100
|
+
export declare function useAsyncPeriodic<I, O>(data: I, interval: number, f: (input: I, setProgress: (p: number) => void, signal: AbortSignal) => Promise<O>): Dispatcher<any, O>;
|
|
101
101
|
/**
|
|
102
102
|
* Async version of useEffect with debouncing. Executes an async function as a side effect when data changes.
|
|
103
103
|
*
|
package/dist/react-whispr.js
CHANGED
|
@@ -200,13 +200,13 @@ function useAsync(f, data, debouce = 200) {
|
|
|
200
200
|
/**
|
|
201
201
|
* Like useAsync, but it also automatically re-execute the async function periodically
|
|
202
202
|
*
|
|
203
|
-
* @param f @see useAsync
|
|
204
203
|
* @param data @see useAsync
|
|
205
204
|
* @param interval The interval to re-execute the async function. If null, the async function will not be re-executed.
|
|
205
|
+
* @param f @see useAsync
|
|
206
206
|
*
|
|
207
207
|
* @returns @see useAsync
|
|
208
208
|
*/
|
|
209
|
-
function useAsyncPeriodic(
|
|
209
|
+
function useAsyncPeriodic(data, interval, f) {
|
|
210
210
|
const timer = useClock(interval);
|
|
211
211
|
const bundle = (0, react_1.useMemo)(() => {
|
|
212
212
|
return {
|
package/package.json
CHANGED