UNPKG

spacerepetition

Version:
41 lines (40 loc) 1.14 kB
import { Flashcard, HumanReadableDueDate } from "../types.js"; export default class Card implements Flashcard { interval: number; repetition: number; easeFactor: number; minEaseFactor: number; dueDate: number; learningAlgorithm: any; [key: string]: any; /** * Creates an instance of Card. * @param {Flashcard} card - The flashcard data. * @param {object} config - Configuration object for the card. */ constructor(card: Flashcard, config: object); /** * Updates the difficulty of the card. * @param {number} difficulty - The difficulty rating. */ updateDifficulty(difficulty: number): void; /** * Marks the card as "again". */ again(): void; /** * Marks the card as "hard". */ hard(): void; /** * Marks the card as "good". */ good(): void; /** * Marks the card as "easy". */ easy(): void; getPotentialDueDate(difficulty: number): number; getPotentialDueDates(difficulties: number[]): number[]; getPotentialDueDatesHumanReadable(difficulties: number[]): HumanReadableDueDate[]; }