UNPKG

@dasch-swiss/dsp-js

Version:

JavaScript library that handles API requests to Knora

29 lines (28 loc) 806 B
import { JsonConvert } from "json2typescript"; import { AjaxResponse } from "rxjs/ajax"; import { ApiResponse } from "./api-response"; /** * @category Response */ export declare class ApiResponseData<T> extends ApiResponse { /** * The returned data from the body */ body: T; /** * Detailed AjaxResponse, if applicable */ response: AjaxResponse<T>; /** * 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<T>, dataType?: { new (): T; }, jsonConvert?: JsonConvert): ApiResponseData<T>; }