Skip to content

Commit

Permalink
add type
Browse files Browse the repository at this point in the history
  • Loading branch information
fitztrev committed Jan 13, 2024
1 parent 1a85531 commit 9e1b97b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ import { ohNoMyQueen } from './goals/oh-no-my-queen'
import { lefongTrap } from './goals/lefong-trap'
import { rosenTrap } from './goals/rosen-trap'
import { alphabetOpening } from './goals/alphabet-openings'
import { PlayerTrophiesByType, TrophyCacheFile, TrophyCheckResult } from './types/types'
import { PlayerTrophiesByType, ReportSource, TrophyCacheFile, TrophyCheckResult } from './types/types'
import { formatSinceDate } from './utils/format-since-date'
const wait = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms))
Expand All @@ -770,7 +770,7 @@ export default {
data() {
return {
inputs: {
type: 'lichess',
type: <ReportSource>'lichess',
value: '',
filters: {
sinceHoursAgo: 0,
Expand Down Expand Up @@ -854,7 +854,7 @@ export default {
this.trophyTypeCount++
},
formFill(type: string, value: string): void {
formFill(type: ReportSource, value: string): void {
this.inputs.type = type
this.inputs.value = value
this.inputs.filters.sinceHoursAgo = 0
Expand Down
2 changes: 2 additions & 0 deletions js/types/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ export type TrophyForGame = {
export type PlayerTrophiesByType = {
[key: string]: TrophyForGame
}

export type ReportSource = 'lichess' | 'chesscom'

0 comments on commit 9e1b97b

Please sign in to comment.