not exporting

renamed variable
This commit is contained in:
Miodec 2023-07-28 22:03:35 +02:00
parent 951fc391fd
commit 93c169a465
2 changed files with 8 additions and 15 deletions

View file

@ -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: [],

View file

@ -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,