From 42e0fcda29d2f202feb9b8ef6318eb1adb421d5a Mon Sep 17 00:00:00 2001 From: Samuel Sampson Date: Tue, 17 Aug 2021 22:26:14 +0000 Subject: [PATCH] Fix lint error due to private variable --- src/browser/TimeBasedDebouncer.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/browser/TimeBasedDebouncer.ts b/src/browser/TimeBasedDebouncer.ts index 03e1a0c2..707e25cb 100644 --- a/src/browser/TimeBasedDebouncer.ts +++ b/src/browser/TimeBasedDebouncer.ts @@ -24,7 +24,7 @@ export class TimeBasedDebouncer implements IRenderDebouncer { constructor( private _renderCallback: (start: number, end: number) => void, - private readonly debounceThresholdMS = RENDER_DEBOUNCE_THRESHOLD_MS + private readonly _debounceThresholdMS = RENDER_DEBOUNCE_THRESHOLD_MS ) { } @@ -46,14 +46,14 @@ export class TimeBasedDebouncer implements IRenderDebouncer { // Only refresh if the time since last refresh is above a threshold, otherwise wait for // enough time to pass before refreshing again. const refreshRequestTime: number = Date.now(); - if (refreshRequestTime - this._lastRefreshMs >= this.debounceThresholdMS) { + if (refreshRequestTime - this._lastRefreshMs >= this._debounceThresholdMS) { // Enough time has lapsed since the last refresh; refresh immediately this._lastRefreshMs = refreshRequestTime; this._innerRefresh(); } else if (!this._additionalRefreshRequested) { // This is the first additional request throttled; set up trailing refresh const elapsed = refreshRequestTime - this._lastRefreshMs; - const waitPeriodBeforeTrailingRefresh = this.debounceThresholdMS - elapsed; + const waitPeriodBeforeTrailingRefresh = this._debounceThresholdMS - elapsed; this._additionalRefreshRequested = true; this._refreshTimeoutID = window.setTimeout(() => {