new
Scheduler(unnamed 0: { name: string; init?: (s: ScheduleCache) => ScheduleCache; filter?: (_s: ScheduleCache) => boolean; sort?: (_sA: ScheduleCache,_sB: ScheduleCache,) => number; update?: (s: ScheduleCache,quality: Quality,) => ScheduleCache; })
filter(_s: ScheduleCache): boolean
To be used as a predicate to filter an array of ScheduleCache objs. Helps determine what cards will be shown in a given timeframe.
init(_s: Partial<ScheduleCache>): ScheduleCache
Applies default properties to a cache , to ensure that all the other methods work.
sort(_sA: ScheduleCache,_sB: ScheduleCache,): number
To be used as a predicate for .sort
and .toSorted
methods.
Helps determine card priority
update(s: ScheduleCache,_quality: Quality,): ScheduleCache
This is the scheduler's grading algorithm, and is expected to update the ScheduleCache with updated stats