import { ServiceError } from '@escapenavigator/utils/dist/get-service-error'; import { AxiosPromise, AxiosResponse } from 'axios'; type ApiMethod
= {
(params: P, transportConfig?: T): AxiosPromise = {
fetch: ApiMethod ;
data: R | null;
loading: boolean;
error: ServiceError | null;
statusOk: boolean | null;
};
type Result = {
[K in keyof BaseResult as `${DisplayName}${Capitalize [K];
};
type Props = {
api: ApiMethod ;
successCallback?: (data: AxiosResponse ({ api, successCallback, errorCallback, }: Props ) => Result ;
export {};