denwa-react-shared
Version:
6 lines (5 loc) • 569 B
TypeScript
import { AxiosResponse } from 'axios';
import { MethodType } from '../../const/methods.js';
import { GetApiResponse } from '../../types/response.js';
import { RouteResponsesByStatusCode, RoutesForMethod, SchemaType } from '../../types/schemeTypes.js';
export declare function convertToFetch<Schema extends SchemaType, Method extends MethodType, Route extends RoutesForMethod<Schema, Method>, DataByCode extends Record<number, unknown> = RouteResponsesByStatusCode<Schema, Method, Route>>(response: Promise<AxiosResponse>): Promise<GetApiResponse<'fetch', DataByCode>>;