UNPKG

@kaltura-ng/kaltura-client

Version:
32 lines 1.44 kB
var __extends = (this && this.__extends) || (function () { var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); var KalturaMultiResponse = (function (_super) { __extends(KalturaMultiResponse, _super); function KalturaMultiResponse(results) { var _newTarget = this.constructor; if (results === void 0) { results = []; } var _this = _super.call(this) || this; if (_newTarget) { // Set the prototype explicitly - see: https://github.com/Microsoft/TypeScript/wiki/FAQ#why-doesnt-extending-built-ins-like-error-array-and-map-work Object.setPrototypeOf(_this, _newTarget.prototype); } if (results && results.length > 0) { _this.push.apply(_this, results); } return _this; } KalturaMultiResponse.prototype.hasErrors = function () { return this.filter(function (result) { return result.error; }).length > 0; }; return KalturaMultiResponse; }(Array)); export { KalturaMultiResponse }; //# sourceMappingURL=kaltura-multi-response.js.map