mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-21 13:06:01 +08:00
chore: fix snapshotresult type
This commit is contained in:
parent
29e7700390
commit
ec14538c3f
2 changed files with 4 additions and 10 deletions
|
@ -7,7 +7,7 @@ import {
|
|||
import { getDefaultConfig } from "./default-config";
|
||||
import { Mode } from "@monkeytype/schemas/shared";
|
||||
import { Result } from "@monkeytype/schemas/results";
|
||||
import { Config, FunboxName } from "@monkeytype/schemas/configs";
|
||||
import { Config, Difficulty, FunboxName } from "@monkeytype/schemas/configs";
|
||||
import {
|
||||
ModifiableTestActivityCalendar,
|
||||
TestActivityCalendar,
|
||||
|
@ -41,7 +41,7 @@ export type SnapshotResult<M extends Mode> = Omit<
|
|||
bailedOut: boolean;
|
||||
blindMode: boolean;
|
||||
lazyMode: boolean;
|
||||
difficulty: string;
|
||||
difficulty: Difficulty;
|
||||
funbox: FunboxName[];
|
||||
language: Language;
|
||||
numbers: boolean;
|
||||
|
|
|
@ -27,12 +27,7 @@ import * as ResultBatches from "../elements/result-batches";
|
|||
import Format from "../utils/format";
|
||||
import * as TestActivity from "../elements/test-activity";
|
||||
import { ChartData } from "@monkeytype/schemas/results";
|
||||
import {
|
||||
Difficulty,
|
||||
Mode,
|
||||
Mode2,
|
||||
Mode2Custom,
|
||||
} from "@monkeytype/schemas/shared";
|
||||
import { Mode, Mode2, Mode2Custom } from "@monkeytype/schemas/shared";
|
||||
import { ResultFiltersGroupItem } from "@monkeytype/schemas/users";
|
||||
import { findLineByLeastSquares } from "../utils/numbers";
|
||||
import defaultResultFilters from "../constants/default-result-filters";
|
||||
|
@ -300,7 +295,7 @@ async function fillContent(): Promise<void> {
|
|||
if (resdiff === undefined) {
|
||||
resdiff = "normal";
|
||||
}
|
||||
if (!ResultFilters.getFilter("difficulty", resdiff as Difficulty)) {
|
||||
if (!ResultFilters.getFilter("difficulty", resdiff)) {
|
||||
if (filterDebug) {
|
||||
console.log(`skipping result due to difficulty filter`, result);
|
||||
}
|
||||
|
@ -1287,7 +1282,6 @@ $(".pageAccount .group.presetFilterButtons").on(
|
|||
);
|
||||
|
||||
$(".pageAccount .content .group.aboveHistory .exportCSV").on("click", () => {
|
||||
//@ts-expect-error dont really wanna figure out the types here but it works
|
||||
void Misc.downloadResultsCSV(filteredResults);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue