/** * @name useRequest * @author Fajar Rizky Hidayat */ interface RequestProps { data: T; } type ExecProps = { service: (event?: import('.').EventSend) => Promise; onSuccess?: (

(data: any) => P) | ((data: any) => void); onError?: (e: any) => void; onAlways?: () => void; }; type UseRequest = { isEmpty: boolean; loading: boolean; data: T; exec: (options: ExecProps) => void; query: (key?: string, defaultValue?: any) => any; setQuery: (value: any | ((obj: any) => any)) => void; clear: (clean?: boolean) => void; cancel: () => void; }; export default function useRequest(props: RequestProps): UseRequest;