Skip to content

Commit

Permalink
fix: moving averages record types (#935)
Browse files Browse the repository at this point in the history
  • Loading branch information
vasco-santos authored Apr 30, 2021
1 parent e5187d0 commit b5a9eb2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/metrics/stats.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ const { BigNumber: Big } = require('bignumber.js')
const MovingAverage = require('@vascosantos/moving-average')
const retimer = require('retimer')

/**
* @typedef {import('@vascosantos/moving-average').IMovingAverage} IMovingAverage
*/

class Stats extends EventEmitter {
/**
* A queue based manager for stat processing
Expand All @@ -29,7 +33,7 @@ class Stats extends EventEmitter {
this._frequencyLastTime = Date.now()
this._frequencyAccumulators = {}

/** @type {{ dataReceived: MovingAverage[], dataSent: MovingAverage[] }} */
/** @type {{ dataReceived: IMovingAverage[], dataSent: IMovingAverage[] }} */
this._movingAverages = {}

this._update = this._update.bind(this)
Expand Down

0 comments on commit b5a9eb2

Please sign in to comment.