mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-08-27 12:01:00 +00:00
12 lines
370 B
TypeScript
12 lines
370 B
TypeScript
export interface UseFetchOptions extends RequestInit {
|
|
autoInvoke?: boolean;
|
|
}
|
|
export interface UseFetchReturnValue<T> {
|
|
data: T | null;
|
|
loading: boolean;
|
|
error: Error | null;
|
|
refetch: () => Promise<any>;
|
|
abort: () => void;
|
|
}
|
|
export declare function useFetch<T>(url: string, { autoInvoke, ...options }?: UseFetchOptions): UseFetchReturnValue<T>;
|