From d5acca9507d5a71510bf96aa07c938e5d2704192 Mon Sep 17 00:00:00 2001 From: Christian Zheng <czheng@takima.fr> Date: Fri, 15 Apr 2022 10:39:53 +0200 Subject: [PATCH] refactor: change variables names --- .../keycloakOAuth2DeviceFlowConnection.ts | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/deadlock-plugins/deadlock-extension/src/core/keycloakOAuth2DeviceFlowConnection.ts b/deadlock-plugins/deadlock-extension/src/core/keycloakOAuth2DeviceFlowConnection.ts index 327a9f29..a57cbd42 100644 --- a/deadlock-plugins/deadlock-extension/src/core/keycloakOAuth2DeviceFlowConnection.ts +++ b/deadlock-plugins/deadlock-extension/src/core/keycloakOAuth2DeviceFlowConnection.ts @@ -231,22 +231,22 @@ function sleep(ms: number) { } class WaitDuration { - private _durations: Uint16Array; - private _index: number; + private durations: Uint16Array; + private index: number; constructor(durations: number[]) { - this._durations = new Uint16Array(durations); - this._durations.sort(); - this._index = 0; + this.durations = new Uint16Array(durations); + this.durations.sort(); + this.index = 0; } public getCurrentDuration(): number { - if (this._index >= this._durations.length - 1) { - throw new Error(`Index out of bounds. Current index: ${this._index} | Max val: ${this._durations.length - 1}`); + if (this.index >= this.durations.length - 1) { + throw new Error(`Index out of bounds. Current index: ${this.index} | Max val: ${this.durations.length - 1}`); } - return this._durations[this._index]; + return this.durations[this.index]; } public increase(): void { - if (this._index < this._durations.length - 1) { - this._index += 1; + if (this.index < this.durations.length - 1) { + this.index += 1; } } } -- GitLab