@knora/api
Version:
JavaScript library that handles API requests to Knora
26 lines (25 loc) • 770 B
TypeScript
import { JsonConvert } from "json2typescript";
import { AjaxResponse } from "rxjs/ajax";
import { ApiResponse } from "./api-response";
export declare class ApiResponseData<T> extends ApiResponse {
/**
* The returned data from the body
*/
body: T;
/**
* Detailed AjaxResponse, if applicable
*/
response: AjaxResponse;
/**
* Constructor.
*/
private constructor();
/**
* Create an instance from an AjaxResponse.
* If the return type in the body shall be checked, this method requires the arguments dataType and jsonConvert.
* @throws DataError
*/
static fromAjaxResponse<T>(ajaxResponse: AjaxResponse, dataType?: {
new (): T;
}, jsonConvert?: JsonConvert): ApiResponseData<T>;
}