@steroidsjs/core 3.0.0-beta.64 → 3.0.0-beta.65

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.
@@ -13,16 +13,16 @@ export interface IFetchConfig {
13
13
  params?: Record<string, unknown>;
14
14
  onFetch?: (config: IFetchConfig, components: IComponents, addCancelToken: (token: any) => any) => any;
15
15
  }
16
- export interface IFetchResult {
16
+ export interface IFetchResult<T> {
17
17
  data?: {
18
18
  providerData?: {
19
19
  type: string;
20
20
  value: string;
21
21
  };
22
22
  [key: string]: unknown;
23
- } | any;
23
+ } | T;
24
24
  isLoading: boolean;
25
- fetch?: (newParams?: Record<string, unknown>) => void;
25
+ fetch: (newParams?: Record<string, unknown>) => void;
26
26
  axiosError: AxiosError | null;
27
27
  }
28
28
  export declare const normalizeConfig: (config: any) => any;
@@ -38,4 +38,4 @@ export declare const fetchData: (config: any, components: any, addCancelToken: a
38
38
  * В процесс загрузки HOC будет отображать "Загрузка...", а после уже отрендерит компонент, передав данные в указанный
39
39
  * ключ `key`.
40
40
  */
41
- export default function useFetch(rawConfig?: IFetchConfig): IFetchResult;
41
+ export default function useFetch<T = any>(rawConfig?: IFetchConfig): IFetchResult<T>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steroidsjs/core",
3
- "version": "3.0.0-beta.64",
3
+ "version": "3.0.0-beta.65",
4
4
  "description": "",
5
5
  "author": "Vladimir Kozhin <hello@kozhindev.com>",
6
6
  "repository": {