File tree Expand file tree Collapse file tree 2 files changed +4
-10
lines changed
Expand file tree Collapse file tree 2 files changed +4
-10
lines changed Original file line number Diff line number Diff line change 77import { getDefaultConfig } from "./default-config" ;
88import { Mode } from "@monkeytype/schemas/shared" ;
99import { Result } from "@monkeytype/schemas/results" ;
10- import { Config , FunboxName } from "@monkeytype/schemas/configs" ;
10+ import { Config , Difficulty , FunboxName } from "@monkeytype/schemas/configs" ;
1111import {
1212 ModifiableTestActivityCalendar ,
1313 TestActivityCalendar ,
@@ -41,7 +41,7 @@ export type SnapshotResult<M extends Mode> = Omit<
4141 bailedOut : boolean ;
4242 blindMode : boolean ;
4343 lazyMode : boolean ;
44- difficulty : string ;
44+ difficulty : Difficulty ;
4545 funbox : FunboxName [ ] ;
4646 language : Language ;
4747 numbers : boolean ;
Original file line number Diff line number Diff line change @@ -27,12 +27,7 @@ import * as ResultBatches from "../elements/result-batches";
2727import Format from "../utils/format" ;
2828import * as TestActivity from "../elements/test-activity" ;
2929import { ChartData } from "@monkeytype/schemas/results" ;
30- import {
31- Difficulty ,
32- Mode ,
33- Mode2 ,
34- Mode2Custom ,
35- } from "@monkeytype/schemas/shared" ;
30+ import { Mode , Mode2 , Mode2Custom } from "@monkeytype/schemas/shared" ;
3631import { ResultFiltersGroupItem } from "@monkeytype/schemas/users" ;
3732import { findLineByLeastSquares } from "../utils/numbers" ;
3833import defaultResultFilters from "../constants/default-result-filters" ;
@@ -300,7 +295,7 @@ async function fillContent(): Promise<void> {
300295 if ( resdiff === undefined ) {
301296 resdiff = "normal" ;
302297 }
303- if ( ! ResultFilters . getFilter ( "difficulty" , resdiff as Difficulty ) ) {
298+ if ( ! ResultFilters . getFilter ( "difficulty" , resdiff ) ) {
304299 if ( filterDebug ) {
305300 console . log ( `skipping result due to difficulty filter` , result ) ;
306301 }
@@ -1287,7 +1282,6 @@ $(".pageAccount .group.presetFilterButtons").on(
12871282) ;
12881283
12891284$ ( ".pageAccount .content .group.aboveHistory .exportCSV" ) . on ( "click" , ( ) => {
1290- //@ts -expect-error dont really wanna figure out the types here but it works
12911285 void Misc . downloadResultsCSV ( filteredResults ) ;
12921286} ) ;
12931287
You can’t perform that action at this time.
0 commit comments