From 93c169a46577bcd458c6935304a901a250ec39e6 Mon Sep 17 00:00:00 2001 From: Miodec Date: Fri, 28 Jul 2023 22:03:35 +0200 Subject: [PATCH] not exporting renamed variable --- frontend/src/ts/test/test-input.ts | 16 ++++++++-------- frontend/src/ts/test/test-stats.ts | 7 ------- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/frontend/src/ts/test/test-input.ts b/frontend/src/ts/test/test-input.ts index 629af42f5..a211d6262 100644 --- a/frontend/src/ts/test/test-input.ts +++ b/frontend/src/ts/test/test-input.ts @@ -219,7 +219,7 @@ export const input = new Input(); export const corrected = new Corrected(); export let keypressPerSecond: Keypress[] = []; -export let currentKeypress: Keypress = { +let currentSecondKeypressData: Keypress = { count: 0, errors: 0, words: [], @@ -262,19 +262,19 @@ export function enableSpacingDebug(): void { } export function incrementKeypressCount(): void { - currentKeypress.count++; + currentSecondKeypressData.count++; } export function setKeypressNotAfk(): void { - currentKeypress.afk = false; + currentSecondKeypressData.afk = false; } export function incrementKeypressErrors(): void { - currentKeypress.errors++; + currentSecondKeypressData.errors++; } export function pushKeypressWord(wordIndex: number): void { - currentKeypress.words.push(wordIndex); + currentSecondKeypressData.words.push(wordIndex); } export function setBurstStart(time: number): void { @@ -282,8 +282,8 @@ export function setBurstStart(time: number): void { } export function pushKeypressesToHistory(): void { - keypressPerSecond.push(currentKeypress); - currentKeypress = { + keypressPerSecond.push(currentSecondKeypressData); + currentSecondKeypressData = { count: 0, errors: 0, words: [], @@ -478,7 +478,7 @@ export function restart(): void { rawHistory = []; burstHistory = []; keypressPerSecond = []; - currentKeypress = { + currentSecondKeypressData = { count: 0, errors: 0, words: [], diff --git a/frontend/src/ts/test/test-stats.ts b/frontend/src/ts/test/test-stats.ts index 789c5ed41..5b33cad86 100644 --- a/frontend/src/ts/test/test-stats.ts +++ b/frontend/src/ts/test/test-stats.ts @@ -41,12 +41,6 @@ interface DebugStats { rawHistory: number[]; burstHistory: number[]; keypressPerSecond: Keypress[]; - currentKeypress: { - count: number; - errors: number; - words: number[]; - afk: boolean; - }; currentBurstStart: number; lastSecondNotRound: boolean; missedWords: { @@ -115,7 +109,6 @@ export function getStats(): DebugStats { rawHistory: TestInput.rawHistory, burstHistory: TestInput.burstHistory, keypressPerSecond: TestInput.keypressPerSecond, - currentKeypress: TestInput.currentKeypress, currentBurstStart: TestInput.currentBurstStart, lastSecondNotRound, missedWords: TestInput.missedWords,