import { ApiCall, ApiDefinition } from "../api"; export type NamedErrors = Partial> | null; type ResetApiCall = () => void; export type UseApiCallResult = [ ApiCall, { data: R | null; loading: boolean; errors: string[] | null; namedErrors: NamedErrors

; status: number; success: boolean; }, ResetApiCall ]; export type UseApiCall = { (apiDefinition: ApiDefinition): UseApiCallResult; }; /** * This hook is used to trigger an api call in an event handler. * The return parameters' data, status and errors have the same value as the * promise result of the call function * @param {ApiDefinition} apiDefinition * @return UseApiCallResult */ declare const useApiCall: UseApiCall; export default useApiCall;