@pushwoosh/kit-helpers 4.6.0 → 4.6.1

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.
@@ -18,12 +18,12 @@ export type AsyncState<T> = {
18
18
  value: T;
19
19
  };
20
20
  type StateFromFunctionReturningPromise<T extends FunctionReturningPromise> = AsyncState<PromiseType<ReturnType<T>>>;
21
- export type AsyncFnReturn<T extends FunctionReturningPromise = FunctionReturningPromise> = [
22
- StateFromFunctionReturningPromise<T>,
23
- T
24
- ];
25
21
  export type CallbackParams = {
26
22
  reset?: boolean;
27
23
  };
24
+ export type AsyncFnReturn<T extends FunctionReturningPromise = FunctionReturningPromise> = [
25
+ StateFromFunctionReturningPromise<T>,
26
+ (p?: CallbackParams) => ReturnType<T>
27
+ ];
28
28
  export default function useAsyncFn<T extends FunctionReturningPromise>(fn: T, deps?: DependencyList, initialState?: StateFromFunctionReturningPromise<T> | (() => StateFromFunctionReturningPromise<T>)): AsyncFnReturn<T>;
29
29
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/kit-helpers",
3
- "version": "4.6.0",
3
+ "version": "4.6.1",
4
4
  "description": "React component for build Pushwoosh products",
5
5
  "main": "index.js",
6
6
  "module": "index.js",