From bbfc2fc6f3222dfe2c9217937182903c0f56138f Mon Sep 17 00:00:00 2001 From: Rob Pocklington Date: Mon, 6 May 2019 16:40:05 +1000 Subject: [PATCH] fix: typescript transpilation / assertion error in 2.9.x (see https://github.com/Microsoft/TypeScript/issues/24963) --- lib/response/get/GetResponse.js | 8 ++++---- lib/response/set/SetResponse.js | 7 ++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/response/get/GetResponse.js b/lib/response/get/GetResponse.js index 8050c2fc..e6d3b73e 100644 --- a/lib/response/get/GetResponse.js +++ b/lib/response/get/GetResponse.js @@ -14,10 +14,8 @@ var getSize = require("./../../support/getSize"); * @augments ModelResponse * @private */ -var GetResponse = module.exports = function GetResponse(model, paths, - isJSONGraph, - isProgressive, - forceCollect) { +var GetResponse = function GetResponse(model, paths, isJSONGraph, + isProgressive, forceCollect) { this.model = model; this.currentRemainingPaths = paths; this.isJSONGraph = isJSONGraph || false; @@ -79,3 +77,5 @@ GetResponse.prototype._subscribe = function _subscribe(observer) { return getRequestCycle(this, model, results, observer, errors, 1); }; + +module.exports = GetResponse; diff --git a/lib/response/set/SetResponse.js b/lib/response/set/SetResponse.js index 617d216d..21def97e 100644 --- a/lib/response/set/SetResponse.js +++ b/lib/response/set/SetResponse.js @@ -22,9 +22,8 @@ var setRequestCycle = require("./setRequestCycle"); * @augments ModelResponse * @private */ -var SetResponse = module.exports = function SetResponse(model, args, - isJSONGraph, - isProgressive) { +var SetResponse = function SetResponse(model, args, isJSONGraph, + isProgressive) { // The response properties. this._model = model; @@ -106,3 +105,5 @@ SetResponse.prototype.progressively = function progressively() { return new SetResponse(this._model, this._initialArgs, this._isJSONGraph, true); }; + +module.exports = SetResponse;