tso-data-models
Advanced tools
Comparing version 1.0.109 to 1.0.110
@@ -5,3 +5,4 @@ import DataPoint from "./DataPoint"; | ||
oldestAcceptedRecord: number; | ||
constructor(listOfDataPoints: DataPoint[], oldestAcceptedRecord: number); | ||
offsetAmount: number; | ||
constructor(listOfDataPoints: DataPoint[], oldestAcceptedRecord: number, offsetAmount: number); | ||
getEstimatedPrice(): number; | ||
@@ -11,4 +12,4 @@ } | ||
export declare class PriceEstimatorFactory { | ||
static fromDataPoints(listOfDataPoints: DataPoint[], oldestAcceptedRecord: number): number; | ||
static fromDataPoints(listOfDataPoints: DataPoint[], oldestAcceptedRecord: number, offsetAmount: number): number; | ||
} | ||
//# sourceMappingURL=PriceEstimator.d.ts.map |
@@ -5,5 +5,6 @@ "use strict"; | ||
var PriceEstimator = /** @class */ (function () { | ||
function PriceEstimator(listOfDataPoints, oldestAcceptedRecord) { | ||
function PriceEstimator(listOfDataPoints, oldestAcceptedRecord, offsetAmount) { | ||
this.listOfDataPoints = listOfDataPoints; | ||
this.oldestAcceptedRecord = oldestAcceptedRecord; | ||
this.offsetAmount = offsetAmount; | ||
} | ||
@@ -27,3 +28,3 @@ PriceEstimator.prototype.getEstimatedPrice = function () { | ||
} | ||
return valueToReturn; | ||
return valueToReturn + this.offsetAmount; | ||
}; | ||
@@ -36,4 +37,4 @@ return PriceEstimator; | ||
} | ||
PriceEstimatorFactory.fromDataPoints = function (listOfDataPoints, oldestAcceptedRecord) { | ||
var estimator = new PriceEstimator(listOfDataPoints, oldestAcceptedRecord); | ||
PriceEstimatorFactory.fromDataPoints = function (listOfDataPoints, oldestAcceptedRecord, offsetAmount) { | ||
var estimator = new PriceEstimator(listOfDataPoints, oldestAcceptedRecord, offsetAmount); | ||
return estimator.getEstimatedPrice(); | ||
@@ -40,0 +41,0 @@ }; |
{ | ||
"name": "tso-data-models", | ||
"version": "1.0.109", | ||
"version": "1.0.110", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -8,6 +8,8 @@ import DataPoint from "./DataPoint"; | ||
oldestAcceptedRecord: number; | ||
offsetAmount: number; | ||
constructor(listOfDataPoints: DataPoint[], oldestAcceptedRecord: number) { | ||
constructor(listOfDataPoints: DataPoint[], oldestAcceptedRecord: number, offsetAmount: number) { | ||
this.listOfDataPoints = listOfDataPoints; | ||
this.oldestAcceptedRecord = oldestAcceptedRecord; | ||
this.offsetAmount = offsetAmount; | ||
} | ||
@@ -32,3 +34,3 @@ | ||
} | ||
return valueToReturn; | ||
return valueToReturn + this.offsetAmount; | ||
} | ||
@@ -39,6 +41,6 @@ } | ||
export class PriceEstimatorFactory { | ||
static fromDataPoints(listOfDataPoints: DataPoint[], oldestAcceptedRecord: number): number { | ||
const estimator: PriceEstimator = new PriceEstimator(listOfDataPoints, oldestAcceptedRecord); | ||
static fromDataPoints(listOfDataPoints: DataPoint[], oldestAcceptedRecord: number, offsetAmount: number): number { | ||
const estimator: PriceEstimator = new PriceEstimator(listOfDataPoints, oldestAcceptedRecord, offsetAmount); | ||
return estimator.getEstimatedPrice(); | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
142311
2113