@surveycake/utils
Version:
SurveyCake Javascript Utils
13 lines (12 loc) • 358 B
TypeScript
/**
* @module handler
*/
export interface HandleResponseOptions<T> {
formatter: (response: Response) => Promise<T>;
}
/**
* handler for fetch api.
* @param response response of fetch api.
* @param type content-type.
*/
export declare function handleResponse<T = any>(response: Response, options?: HandleResponseOptions<T>): Promise<T>;