@react-pakistan/util-functions 1.23.90 → 1.23.91
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/hooks/use-fetch.d.ts +3 -4
- package/package.json +1 -1
package/hooks/use-fetch.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
interface FetchResult {
|
|
1
|
+
export interface FetchResult {
|
|
2
2
|
data: any;
|
|
3
3
|
error: any;
|
|
4
4
|
}
|
|
5
|
-
interface FetchConfig extends RequestInit {
|
|
5
|
+
export interface FetchConfig extends RequestInit {
|
|
6
6
|
autoFetch?: boolean;
|
|
7
7
|
callback?: (result: FetchResult) => void;
|
|
8
8
|
}
|
|
9
|
-
interface Return {
|
|
9
|
+
export interface Return {
|
|
10
10
|
apiResult: API_RESULT | undefined;
|
|
11
11
|
data: any;
|
|
12
12
|
error: any;
|
|
@@ -18,4 +18,3 @@ export declare enum API_RESULT {
|
|
|
18
18
|
ERROR = "ERROR"
|
|
19
19
|
}
|
|
20
20
|
export declare const useFetch: (url: string, config?: FetchConfig) => Return;
|
|
21
|
-
export {};
|