From d3ef332045ee8cd199706e2580ed56c3734a22d8 Mon Sep 17 00:00:00 2001 From: ishiko732 Date: Tue, 17 Dec 2024 11:37:52 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20open-spa?= =?UTF-8?q?ced-repetition/ts-fsrs@af8f8732f62217c981bee8fa52ace4ed58cea67b?= =?UTF-8?q?=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- classes/AbstractScheduler.html | 4 +- classes/FSRS.html | 50 ++++++++++++------------ classes/FSRSAlgorithm.html | 38 +++++++++--------- classes/TypeConvert.html | 4 +- enums/Rating.html | 4 +- enums/State.html | 4 +- enums/StrategyMode.html | 4 +- functions/DefaultInitSeedStrategy.html | 2 +- functions/GenSeedStrategyWithCardId.html | 2 +- functions/clamp.html | 2 +- functions/createEmptyCard.html | 2 +- functions/date_diff.html | 2 +- functions/date_scheduler.html | 2 +- functions/fixDate.html | 2 +- functions/fixRating.html | 2 +- functions/fixState.html | 2 +- functions/formatDate.html | 2 +- functions/fsrs-1.html | 2 +- functions/generatorParameters.html | 2 +- functions/get_fuzz_range.html | 2 +- functions/show_diff_message.html | 2 +- interfaces/Card.html | 4 +- interfaces/CardInput.html | 4 +- interfaces/FSRSParameters.html | 4 +- interfaces/FSRSReview.html | 6 +-- interfaces/IPreview.html | 4 +- interfaces/IScheduler.html | 4 +- interfaces/ReviewLog.html | 4 +- interfaces/ReviewLogInput.html | 4 +- types/DateInput.html | 2 +- types/FSRSHistory.html | 2 +- types/Grade.html | 2 +- types/IReschedule.html | 2 +- types/RatingType.html | 2 +- types/RecordLog.html | 2 +- types/RecordLogItem.html | 2 +- types/RescheduleOptions.html | 2 +- types/StateType.html | 2 +- types/TSchedulerStrategy.html | 2 +- types/TSeedStrategy.html | 2 +- types/TStrategyHandler.html | 2 +- types/double.html | 2 +- types/int.html | 2 +- types/unit.html | 2 +- variables/DECAY.html | 2 +- variables/FACTOR.html | 2 +- variables/FSRSVersion.html | 2 +- variables/Grades.html | 2 +- variables/default_enable_fuzz.html | 2 +- variables/default_enable_short_term.html | 2 +- variables/default_maximum_interval.html | 2 +- variables/default_request_retention.html | 2 +- variables/default_w.html | 2 +- 53 files changed, 111 insertions(+), 107 deletions(-) diff --git a/classes/AbstractScheduler.html b/classes/AbstractScheduler.html index 690222e..6a9ae35 100644 --- a/classes/AbstractScheduler.html +++ b/classes/AbstractScheduler.html @@ -1,7 +1,7 @@ AbstractScheduler | TS-FSRS

Class AbstractSchedulerAbstract

Implements

Constructors

constructor +

Class AbstractSchedulerAbstract

Implements

Constructors

Properties

Constructors

Properties

algorithm: FSRSAlgorithm
current: Card
last: Card
next: Map<Grade, RecordLogItem> = ...
review_time: Date

Methods

+

Constructors

Properties

algorithm: FSRSAlgorithm
current: Card
last: Card
next: Map<Grade, RecordLogItem> = ...
review_time: Date

Methods

diff --git a/classes/FSRS.html b/classes/FSRS.html index a68c778..ec1ed2a 100644 --- a/classes/FSRS.html +++ b/classes/FSRS.html @@ -2,7 +2,7 @@ window.__typeDocPluginKatexOptions=undefined; window.addEventListener('load', () => window.renderMathInElement(document.body, window.__typeDocPluginKatexOptions));

Class FSRS

Hierarchy (view full)

Constructors

Hierarchy (view full)

Constructors

Properties

Constructors

Properties

_seed?: string
intervalModifier: number

Accessors

  • get interval_modifier(): number
  • Returns number

  • get parameters(): FSRSParameters
  • Get the parameters of the algorithm.

    -

    Returns FSRSParameters

  • set parameters(params): void
  • Set the parameters of the algorithm.

    +

Constructors

Properties

_seed?: string
intervalModifier: number

Accessors

  • get interval_modifier(): number
  • Returns number

  • set seed(seed): void
  • Parameters

    • seed: string

    Returns void

Methods

  • If fuzzing is disabled or ivl is less than 2.5, it returns the original interval.

    +

Returns void

  • set seed(seed): void
  • Parameters

    • seed: string

    Returns void

Methods

  • If fuzzing is disabled or ivl is less than 2.5, it returns the original interval.

    Parameters

    • ivl: number

      The interval to be fuzzed.

    • elapsed_days: number

      t days since the last review

    Returns int

    • The fuzzed interval.
    -
  • Parameters

  • The formula used is : $$\min \lbrace \max \lbrace D_0,1 \rbrace,10\rbrace$$

    Parameters

    • difficulty: number

      $$D \in [1,10]$$

      -

    Returns number

  • Type Parameters

    Parameters

    • card: Card | CardInput

      Card to be processed

    • now: DateInput

      Current time or scheduled time

    • reset_count: boolean = false

      Should the review count information(reps,lapses) be reset. (Optional)

    • OptionalafterHandler: ((recordLogItem: RecordLogItem) => R)

      Convert the result to another type. (Optional)

      @@ -57,34 +57,34 @@
      interface RepeatRecordLog {
      card: CardUnChecked; //see method: createEmptyCard
      log: RevLogUnchecked; //see method: fsrs.repeat()
      }

      function forgetAfterHandler(recordLogItem: RecordLogItem): RepeatRecordLog {
      return {
      card: {
      ...(recordLogItem.card as Card & { cid: string }),
      due: recordLogItem.card.due.getTime(),
      state: State[recordLogItem.card.state] as StateType,
      last_review: recordLogItem.card.last_review
      ? recordLogItem.card.last_review!.getTime()
      : null,
      },
      log: {
      ...recordLogItem.log,
      cid: (recordLogItem.card as Card & { cid: string }).cid,
      due: recordLogItem.log.due.getTime(),
      review: recordLogItem.log.review.getTime(),
      state: State[recordLogItem.log.state] as StateType,
      rating: Rating[recordLogItem.log.rating] as RatingType,
      },
      };
      }
      const now = new Date();
      const f = fsrs();
      const emptyCardFormAfterHandler = createEmptyCard(now, cardAfterHandler); //see method: createEmptyCard
      const repeatFormAfterHandler = f.repeat(emptyCardFormAfterHandler, now, repeatAfterHandler); //see method: fsrs.repeat()
      const { card } = repeatFormAfterHandler[Rating.Hard];
      const forgetFromAfterHandler = f.forget(card, date_scheduler(now, 1, true), false, forgetAfterHandler);
      -
  • The formula used is : +

  • The formula used is : $$R(t,S) = (1 + \text{FACTOR} \times \frac{t}{9 \cdot S})^{\text{DECAY}}$$

    Parameters

    • elapsed_days: number

      t days since the last review

    • stability: number

      Stability (interval when R=90%)

    Returns number

    r Retrievability (probability of recall)

    -
  • Get the retrievability of the card

    Type Parameters

    • T extends boolean

    Parameters

    • card: Card | CardInput

      Card to be processed

    • Optionalnow: DateInput

      Current time or scheduled time

    • format: T = ...

      default:true , Convert the result to another type. (Optional)

    Returns T extends true
        ? string
        : number

    The retrievability of the card,if format is true, the result is a string, otherwise it is a number

    -
  • The formula used is : +

  • The formula used is : $$D_0(G) = w_4 - e^{(G-1) \cdot w_5} + 1 $$ $$D_0 = \min \lbrace \max \lbrace D_0(G),1 \rbrace,10 \rbrace$$ where the $$D_0(1)=w_4$$ when the first rating is good.

    Parameters

    • g: Grade

      Grade (rating at Anki) [1.again,2.hard,3.good,4.easy]

    Returns number

    Difficulty $$D \in [1,10]$$

    -
  • The formula used is : $$ S_0(G) = w_{G-1}$$ $$S_0 = \max \lbrace S_0,0.1\rbrace $$

    Parameters

    • g: Grade

      Grade (rating at Anki) [1.again,2.hard,3.good,4.easy]

    Returns number

    Stability (interval when R=90%)

    -
  • The formula used is : $$w_7 \cdot \text{init} +(1 - w_7) \cdot \text{current}$$

    Parameters

    • init: number

      $$w_2 : D_0(3) = w_2 + (R-2) \cdot w_3= w_2$$

    • current: number

      $$D - w_6 \cdot (R - 2)$$

    Returns number

    difficulty

    -
  • Display the collection of cards and logs for the card scheduled at the current time, after applying a specific grade rating.

    +
  • Display the collection of cards and logs for the card scheduled at the current time, after applying a specific grade rating.

    Type Parameters

    Parameters

    • card: Card | CardInput

      Card to be processed

    • now: DateInput

      Current time or scheduled time

    • grade: Grade

      Rating of the review (Again, Hard, Good, Easy)

      @@ -95,34 +95,36 @@
      interface RevLogUnchecked
      extends Omit<ReviewLog, "due" | "review" | "state" | "rating"> {
      cid: string;
      due: Date | number;
      state: StateType;
      review: Date | number;
      rating: RatingType;
      }

      interface NextRecordLog {
      card: CardUnChecked; //see method: createEmptyCard
      log: RevLogUnchecked;
      }

      function nextAfterHandler(recordLogItem: RecordLogItem) {
      const recordItem = {
      card: {
      ...(recordLogItem.card as Card & { cid: string }),
      due: recordLogItem.card.due.getTime(),
      state: State[recordLogItem.card.state] as StateType,
      last_review: recordLogItem.card.last_review
      ? recordLogItem.card.last_review!.getTime()
      : null,
      },
      log: {
      ...recordLogItem.log,
      cid: (recordLogItem.card as Card & { cid: string }).cid,
      due: recordLogItem.log.due.getTime(),
      review: recordLogItem.log.review.getTime(),
      state: State[recordLogItem.log.state] as StateType,
      rating: Rating[recordLogItem.log.rating] as RatingType,
      },
      };
      return recordItem
      }
      const card: Card = createEmptyCard(new Date(), cardAfterHandler); //see method: createEmptyCard
      const f = fsrs();
      const recordLogItem = f.repeat(card, new Date(), Rating.Again, nextAfterHandler);
      -
  • The formula used is : +

  • The formula used is : $$\text{delta}_d = -w_6 \cdot (g - 3)$$ $$\text{next}_d = D + \text{linear damping}(\text{delta}_d , D)$$ $$D^\prime(D,R) = w_7 \cdot D_0(4) +(1 - w_7) \cdot \text{next}_d$$

    Parameters

    • d: number

      Difficulty $$D \in [1,10]$$

    • g: Grade

      Grade (rating at Anki) [1.again,2.hard,3.good,4.easy]

    Returns number

    $$\text{next}_D$$

    -
  • The formula used is : -$$S^\prime_f(D,S,R) = w_{11}\cdot D^{-w_{12}}\cdot ((S+1)^{w_{13}}-1) \cdot e^{w_{14}\cdot(1-R)}$$

    +
  • The formula used is : +$$S^\prime_f(D,S,R) = w_{11}\cdot D^{-w_{12}}\cdot ((S+1)^{w_{13}}-1) \cdot e^{w_{14}\cdot(1-R)}$$ +enable_short_term = true : $$S^\prime_f \in \min \lbrace \max \lbrace S^\prime_f,0.01\rbrace, \frac{S}{e^{w_{17} \cdot w_{18}}} \rbrace$$ +enable_short_term = false : $$S^\prime_f \in \min \lbrace \max \lbrace S^\prime_f,0.01\rbrace, S \rbrace$$

    Parameters

    • d: number

      Difficulty D \in [1,10]

    • s: number

      Stability (interval when R=90%)

    • r: number

      Retrievability (probability of recall)

    Returns number

    S^\prime_f new stability after forgetting

    -
  • The formula used is : $$S^\prime_r(D,S,R,G) = S\cdot(e^{w_8}\cdot (11-D)\cdot S^{-w_9}\cdot(e^{w_{10}\cdot(1-R)}-1)\cdot w_{15}(\text{if} G=2) \cdot w_{16}(\text{if} G=4)+1)$$

    Parameters

    • d: number

      Difficulty D \in [1,10]

    • s: number

      Stability (interval when R=90%)

    • r: number

      Retrievability (probability of recall)

    • g: Grade

      Grade (Rating[0.again,1.hard,2.good,3.easy])

    Returns number

    S^\prime_r new stability after recall

    -
  • The formula used is : $$S^\prime_s(S,G) = S \cdot e^{w_{17} \cdot (G-3+w_{18})}$$

    Parameters

    • s: number

      Stability (interval when R=90%)

    • g: Grade

      Grade (Rating[0.again,1.hard,2.good,3.easy])

      -

    Returns number

  • Display the collection of cards and logs for the four scenarios after scheduling the card at the current time.

    +

Returns number

+
diff --git a/classes/FSRSAlgorithm.html b/classes/FSRSAlgorithm.html index 5b13f80..ce215a7 100644 --- a/classes/FSRSAlgorithm.html +++ b/classes/FSRSAlgorithm.html @@ -2,7 +2,7 @@ window.__typeDocPluginKatexOptions=undefined; window.addEventListener('load', () => window.renderMathInElement(document.body, window.__typeDocPluginKatexOptions));

Class FSRSAlgorithm

Hierarchy (view full)

Constructors

Hierarchy (view full)

Constructors

Properties

_seed?: string
intervalModifier: number

Accessors

Constructors

Properties

_seed?: string
intervalModifier: number

Accessors

  • set seed(seed): void
  • Parameters

    • seed: string

    Returns void

Methods

  • If fuzzing is disabled or ivl is less than 2.5, it returns the original interval.

    +

Returns void

  • set seed(seed): void
  • Parameters

    • seed: string

    Returns void

Methods

  • If fuzzing is disabled or ivl is less than 2.5, it returns the original interval.

    Parameters

    • ivl: number

      The interval to be fuzzed.

    • elapsed_days: number

      t days since the last review

    Returns int

    • The fuzzed interval.
    -
  • Parameters

    • request_retention: number

      0<request_retention<=1,Requested retention rate

      +
  • The formula used is : +

  • The formula used is : $$\min \lbrace \max \lbrace D_0,1 \rbrace,10\rbrace$$

    Parameters

    • difficulty: number

      $$D \in [1,10]$$

      -

    Returns number

  • The formula used is : +

Returns number

  • The formula used is : $$R(t,S) = (1 + \text{FACTOR} \times \frac{t}{9 \cdot S})^{\text{DECAY}}$$

    Parameters

    • elapsed_days: number

      t days since the last review

    • stability: number

      Stability (interval when R=90%)

    Returns number

    r Retrievability (probability of recall)

    -
  • The formula used is : $$D_0(G) = w_4 - e^{(G-1) \cdot w_5} + 1 $$ $$D_0 = \min \lbrace \max \lbrace D_0(G),1 \rbrace,10 \rbrace$$ where the $$D_0(1)=w_4$$ when the first rating is good.

    Parameters

    • g: Grade

      Grade (rating at Anki) [1.again,2.hard,3.good,4.easy]

    Returns number

    Difficulty $$D \in [1,10]$$

    -
  • The formula used is : $$ S_0(G) = w_{G-1}$$ $$S_0 = \max \lbrace S_0,0.1\rbrace $$

    Parameters

    • g: Grade

      Grade (rating at Anki) [1.again,2.hard,3.good,4.easy]

    Returns number

    Stability (interval when R=90%)

    -
  • The formula used is : +

  • The formula used is : $$w_7 \cdot \text{init} +(1 - w_7) \cdot \text{current}$$

    Parameters

    • init: number

      $$w_2 : D_0(3) = w_2 + (R-2) \cdot w_3= w_2$$

    • current: number

      $$D - w_6 \cdot (R - 2)$$

    Returns number

    difficulty

    -
  • The formula used is : $$\text{delta}_d = -w_6 \cdot (g - 3)$$ $$\text{next}_d = D + \text{linear damping}(\text{delta}_d , D)$$ $$D^\prime(D,R) = w_7 \cdot D_0(4) +(1 - w_7) \cdot \text{next}_d$$

    Parameters

    • d: number

      Difficulty $$D \in [1,10]$$

    • g: Grade

      Grade (rating at Anki) [1.again,2.hard,3.good,4.easy]

    Returns number

    $$\text{next}_D$$

    -
  • The formula used is : -$$S^\prime_f(D,S,R) = w_{11}\cdot D^{-w_{12}}\cdot ((S+1)^{w_{13}}-1) \cdot e^{w_{14}\cdot(1-R)}$$

    +
  • The formula used is : +$$S^\prime_f(D,S,R) = w_{11}\cdot D^{-w_{12}}\cdot ((S+1)^{w_{13}}-1) \cdot e^{w_{14}\cdot(1-R)}$$ +enable_short_term = true : $$S^\prime_f \in \min \lbrace \max \lbrace S^\prime_f,0.01\rbrace, \frac{S}{e^{w_{17} \cdot w_{18}}} \rbrace$$ +enable_short_term = false : $$S^\prime_f \in \min \lbrace \max \lbrace S^\prime_f,0.01\rbrace, S \rbrace$$

    Parameters

    • d: number

      Difficulty D \in [1,10]

    • s: number

      Stability (interval when R=90%)

    • r: number

      Retrievability (probability of recall)

    Returns number

    S^\prime_f new stability after forgetting

    -
  • Parameters

  • The formula used is : +

  • The formula used is : $$S^\prime_r(D,S,R,G) = S\cdot(e^{w_8}\cdot (11-D)\cdot S^{-w_9}\cdot(e^{w_{10}\cdot(1-R)}-1)\cdot w_{15}(\text{if} G=2) \cdot w_{16}(\text{if} G=4)+1)$$

    Parameters

    • d: number

      Difficulty D \in [1,10]

    • s: number

      Stability (interval when R=90%)

    • r: number

      Retrievability (probability of recall)

    • g: Grade

      Grade (Rating[0.again,1.hard,2.good,3.easy])

    Returns number

    S^\prime_r new stability after recall

    -
  • The formula used is : +

  • The formula used is : $$S^\prime_s(S,G) = S \cdot e^{w_{17} \cdot (G-3+w_{18})}$$

    Parameters

    • s: number

      Stability (interval when R=90%)

    • g: Grade

      Grade (Rating[0.again,1.hard,2.good,3.easy])

      -

    Returns number

+

Returns number

diff --git a/classes/TypeConvert.html b/classes/TypeConvert.html index 78ac47d..bfc9108 100644 --- a/classes/TypeConvert.html +++ b/classes/TypeConvert.html @@ -1,10 +1,10 @@ TypeConvert | TS-FSRS

Class TypeConvert

Constructors

constructor +

Class TypeConvert

Constructors

Methods

  • Parameters

    • value: unknown

    Returns Date

+

Constructors

Methods

  • Parameters

    • value: unknown

    Returns Date

diff --git a/enums/Rating.html b/enums/Rating.html index b5a7028..002716a 100644 --- a/enums/Rating.html +++ b/enums/Rating.html @@ -1,9 +1,9 @@ Rating | TS-FSRS

Enumeration Rating

Enumeration Members

Again +

Enumeration Rating

Enumeration Members

Enumeration Members

Again: 1
Easy: 4
Good: 3
Hard: 2
Manual: 0
+

Enumeration Members

Again: 1
Easy: 4
Good: 3
Hard: 2
Manual: 0
diff --git a/enums/State.html b/enums/State.html index 189e17c..0e23275 100644 --- a/enums/State.html +++ b/enums/State.html @@ -1,8 +1,8 @@ State | TS-FSRS

Enumeration State

Enumeration Members

Learning +

Enumeration State

Enumeration Members

Enumeration Members

Learning: 1
New: 0
Relearning: 3
Review: 2
+

Enumeration Members

Learning: 1
New: 0
Relearning: 3
Review: 2
diff --git a/enums/StrategyMode.html b/enums/StrategyMode.html index aa4a0b8..72d6847 100644 --- a/enums/StrategyMode.html +++ b/enums/StrategyMode.html @@ -1,6 +1,6 @@ StrategyMode | TS-FSRS

Enumeration StrategyMode

Enumeration Members

SCHEDULER +

Enumeration StrategyMode

Enumeration Members

Enumeration Members

SCHEDULER: "Scheduler"
SEED: "Seed"
+

Enumeration Members

SCHEDULER: "Scheduler"
SEED: "Seed"
diff --git a/functions/DefaultInitSeedStrategy.html b/functions/DefaultInitSeedStrategy.html index c064b7d..80984f0 100644 --- a/functions/DefaultInitSeedStrategy.html +++ b/functions/DefaultInitSeedStrategy.html @@ -1,4 +1,4 @@ DefaultInitSeedStrategy | TS-FSRS

Function DefaultInitSeedStrategy

+

Function DefaultInitSeedStrategy

diff --git a/functions/GenSeedStrategyWithCardId.html b/functions/GenSeedStrategyWithCardId.html index 70a7250..632603b 100644 --- a/functions/GenSeedStrategyWithCardId.html +++ b/functions/GenSeedStrategyWithCardId.html @@ -9,4 +9,4 @@
const seedStrategy = GenCardIdSeedStrategy('card_id');
const f = fsrs().useStrategy(StrategyMode.SEED, seedStrategy)
const card = createEmptyCard<Card & { card_id: number }>()
card.card_id = 555
const record = f.repeat(card, new Date())
-
+
diff --git a/functions/clamp.html b/functions/clamp.html index 7e136bb..1ded8a5 100644 --- a/functions/clamp.html +++ b/functions/clamp.html @@ -1,4 +1,4 @@ clamp | TS-FSRS

Function clamp

  • Parameters

    • value: number
    • min: number
    • max: number

    Returns number

+

Function clamp

  • Parameters

    • value: number
    • min: number
    • max: number

    Returns number

diff --git a/functions/createEmptyCard.html b/functions/createEmptyCard.html index b5bcf21..34dad00 100644 --- a/functions/createEmptyCard.html +++ b/functions/createEmptyCard.html @@ -10,4 +10,4 @@
interface CardUnChecked
extends Omit<Card, "due" | "last_review" | "state"> {
cid: string;
due: Date | number;
last_review: Date | null | number;
state: StateType;
}

function cardAfterHandler(card: Card) {
return {
...card,
cid: "test001",
state: State[card.state],
last_review: card.last_review ?? null,
} as CardUnChecked;
}

const card: CardUnChecked = createEmptyCard(new Date(), cardAfterHandler);
-
+
diff --git a/functions/date_diff.html b/functions/date_diff.html index 258dd7f..8ab2fa4 100644 --- a/functions/date_diff.html +++ b/functions/date_diff.html @@ -1,4 +1,4 @@ date_diff | TS-FSRS

Function date_diff

+

Function date_diff

diff --git a/functions/date_scheduler.html b/functions/date_scheduler.html index 009169d..615be4e 100644 --- a/functions/date_scheduler.html +++ b/functions/date_scheduler.html @@ -6,4 +6,4 @@
  • t: number

    时间偏移量,当 isDay 为 true 时表示天数,为 false 时表示分钟

  • OptionalisDay: boolean

    (可选)是否按天数单位进行偏移,默认为 false,表示按分钟单位计算偏移

  • Returns Date

    偏移后的日期和时间对象

    -
    +
    diff --git a/functions/fixDate.html b/functions/fixDate.html index d92abba..c56422a 100644 --- a/functions/fixDate.html +++ b/functions/fixDate.html @@ -2,4 +2,4 @@ window.__typeDocPluginKatexOptions=undefined; window.addEventListener('load', () => window.renderMathInElement(document.body, window.__typeDocPluginKatexOptions));

    Function fixDate

    • Parameters

      • value: unknown

      Returns Date

      Use TypeConvert.time instead

      -
    +
    diff --git a/functions/fixRating.html b/functions/fixRating.html index e6088dc..eabec91 100644 --- a/functions/fixRating.html +++ b/functions/fixRating.html @@ -2,4 +2,4 @@ window.__typeDocPluginKatexOptions=undefined; window.addEventListener('load', () => window.renderMathInElement(document.body, window.__typeDocPluginKatexOptions));

    Function fixRating

    • Parameters

      • value: unknown

      Returns Rating

      Use TypeConvert.rating instead

      -
    +
    diff --git a/functions/fixState.html b/functions/fixState.html index 7a14e41..3eee8a8 100644 --- a/functions/fixState.html +++ b/functions/fixState.html @@ -2,4 +2,4 @@ window.__typeDocPluginKatexOptions=undefined; window.addEventListener('load', () => window.renderMathInElement(document.body, window.__typeDocPluginKatexOptions));

    Function fixState

    • Parameters

      • value: unknown

      Returns State

      Use TypeConvert.state instead

      -
    +
    diff --git a/functions/formatDate.html b/functions/formatDate.html index 3a4279e..b0591e5 100644 --- a/functions/formatDate.html +++ b/functions/formatDate.html @@ -1,4 +1,4 @@ formatDate | TS-FSRS

    Function formatDate

    +

    Function formatDate

    diff --git a/functions/fsrs-1.html b/functions/fsrs-1.html index b74cec0..3ad4579 100644 --- a/functions/fsrs-1.html +++ b/functions/fsrs-1.html @@ -12,4 +12,4 @@

    Returns FSRS

    diff --git a/functions/generatorParameters.html b/functions/generatorParameters.html index 558fda2..a383d4d 100644 --- a/functions/generatorParameters.html +++ b/functions/generatorParameters.html @@ -1,4 +1,4 @@ generatorParameters | TS-FSRS

    Function generatorParameters

    +

    Function generatorParameters

    diff --git a/functions/get_fuzz_range.html b/functions/get_fuzz_range.html index 1b2830b..a01814c 100644 --- a/functions/get_fuzz_range.html +++ b/functions/get_fuzz_range.html @@ -1,4 +1,4 @@ get_fuzz_range | TS-FSRS

    Function get_fuzz_range

    • Parameters

      • interval: number
      • elapsed_days: number
      • maximum_interval: number

      Returns {
          max_ivl: number;
          min_ivl: number;
      }

      • max_ivl: number
      • min_ivl: number
    +

    Function get_fuzz_range

    • Parameters

      • interval: number
      • elapsed_days: number
      • maximum_interval: number

      Returns {
          max_ivl: number;
          min_ivl: number;
      }

      • max_ivl: number
      • min_ivl: number
    diff --git a/functions/show_diff_message.html b/functions/show_diff_message.html index 7560a7a..5af37f7 100644 --- a/functions/show_diff_message.html +++ b/functions/show_diff_message.html @@ -1,4 +1,4 @@ show_diff_message | TS-FSRS

    Function show_diff_message

    • Parameters

      • due: DateInput
      • last_review: DateInput
      • Optionalunit: boolean
      • timeUnit: string[] = TIMEUNITFORMAT

      Returns string

    +

    Function show_diff_message

    • Parameters

      • due: DateInput
      • last_review: DateInput
      • Optionalunit: boolean
      • timeUnit: string[] = TIMEUNITFORMAT

      Returns string

    diff --git a/interfaces/Card.html b/interfaces/Card.html index d3df67a..4775efc 100644 --- a/interfaces/Card.html +++ b/interfaces/Card.html @@ -1,7 +1,7 @@ Card | TS-FSRS

    Interface Card

    interface Card {
        difficulty: number;
        due: Date;
        elapsed_days: number;
        lapses: number;
        last_review?: Date;
        reps: number;
        scheduled_days: number;
        stability: number;
        state: State;
    }

    Properties

    difficulty +

    Interface Card

    interface Card {
        difficulty: number;
        due: Date;
        elapsed_days: number;
        lapses: number;
        last_review?: Date;
        reps: number;
        scheduled_days: number;
        stability: number;
        state: State;
    }

    Properties

    difficulty: number
    due: Date
    elapsed_days: number
    lapses: number
    last_review?: Date
    reps: number
    scheduled_days: number
    stability: number
    state: State
    +

    Properties

    difficulty: number
    due: Date
    elapsed_days: number
    lapses: number
    last_review?: Date
    reps: number
    scheduled_days: number
    stability: number
    state: State
    diff --git a/interfaces/CardInput.html b/interfaces/CardInput.html index c3ec085..9133f45 100644 --- a/interfaces/CardInput.html +++ b/interfaces/CardInput.html @@ -1,7 +1,7 @@ CardInput | TS-FSRS

    Interface CardInput

    interface CardInput {
        difficulty: number;
        due: DateInput;
        elapsed_days: number;
        lapses: number;
        last_review?: null | DateInput;
        reps: number;
        scheduled_days: number;
        stability: number;
        state: StateType | State;
    }

    Hierarchy

    • Omit<Card, "state" | "due" | "last_review">
      • CardInput

    Properties

    difficulty +

    Interface CardInput

    interface CardInput {
        difficulty: number;
        due: DateInput;
        elapsed_days: number;
        lapses: number;
        last_review?: null | DateInput;
        reps: number;
        scheduled_days: number;
        stability: number;
        state: StateType | State;
    }

    Hierarchy

    • Omit<Card, "state" | "due" | "last_review">
      • CardInput

    Properties

    difficulty: number
    elapsed_days: number
    lapses: number
    last_review?: null | DateInput
    reps: number
    scheduled_days: number
    stability: number
    state: StateType | State
    +

    Properties

    difficulty: number
    elapsed_days: number
    lapses: number
    last_review?: null | DateInput
    reps: number
    scheduled_days: number
    stability: number
    state: StateType | State
    diff --git a/interfaces/FSRSParameters.html b/interfaces/FSRSParameters.html index c301b12..924f0e2 100644 --- a/interfaces/FSRSParameters.html +++ b/interfaces/FSRSParameters.html @@ -1,9 +1,9 @@ FSRSParameters | TS-FSRS

    Interface FSRSParameters

    interface FSRSParameters {
        enable_fuzz: boolean;
        enable_short_term: boolean;
        maximum_interval: number;
        request_retention: number;
        w: number[];
    }

    Properties

    enable_fuzz +

    Interface FSRSParameters

    interface FSRSParameters {
        enable_fuzz: boolean;
        enable_short_term: boolean;
        maximum_interval: number;
        request_retention: number;
        w: number[];
    }

    Properties

    enable_fuzz: boolean
    enable_short_term: boolean
    maximum_interval: number
    request_retention: number
    w: number[]
    +

    Properties

    enable_fuzz: boolean
    enable_short_term: boolean
    maximum_interval: number
    request_retention: number
    w: number[]
    diff --git a/interfaces/FSRSReview.html b/interfaces/FSRSReview.html index b22e497..68cbf7c 100644 --- a/interfaces/FSRSReview.html +++ b/interfaces/FSRSReview.html @@ -1,11 +1,11 @@ FSRSReview | TS-FSRS

    Interface FSRSReview

    interface FSRSReview {
        delta_t: number;
        rating: Rating;
    }

    Properties

    delta_t +

    Interface FSRSReview

    interface FSRSReview {
        delta_t: number;
        rating: Rating;
    }

    Properties

    Properties

    delta_t: number

    The number of days that passed = revlog.elapsed_days = round(revlog[-1].review - revlog[-2].review)

    -
    rating: Rating

    0-4: Manual, Again, Hard, Good, Easy +

    rating: Rating

    0-4: Manual, Again, Hard, Good, Easy = revlog.rating

    -
    +
    diff --git a/interfaces/IPreview.html b/interfaces/IPreview.html index 6e5641b..6403dbc 100644 --- a/interfaces/IPreview.html +++ b/interfaces/IPreview.html @@ -1,9 +1,9 @@ IPreview | TS-FSRS

    Interface IPreview

    interface IPreview {
        1: RecordLogItem;
        2: RecordLogItem;
        3: RecordLogItem;
        4: RecordLogItem;
        [iterator](): IterableIterator<RecordLogItem>;
    }

    Hierarchy (view full)

    Properties

    1 +

    Interface IPreview

    interface IPreview {
        1: RecordLogItem;
        2: RecordLogItem;
        3: RecordLogItem;
        4: RecordLogItem;
        [iterator](): IterableIterator<RecordLogItem>;
    }

    Hierarchy (view full)

    Properties

    1 2 3 4

    Methods

    Properties

    Methods

    +

    Properties

    Methods

    diff --git a/interfaces/IScheduler.html b/interfaces/IScheduler.html index 3202456..5fad214 100644 --- a/interfaces/IScheduler.html +++ b/interfaces/IScheduler.html @@ -1,6 +1,6 @@ IScheduler | TS-FSRS

    Interface IScheduler

    interface IScheduler {
        preview(): IPreview;
        review(state: Grade): RecordLogItem;
    }

    Implemented by

    Methods

    preview +

    Interface IScheduler

    interface IScheduler {
        preview(): IPreview;
        review(state: Grade): RecordLogItem;
    }

    Implemented by

    Methods

    Methods

    +

    Methods

    diff --git a/interfaces/ReviewLog.html b/interfaces/ReviewLog.html index 66753d6..af45502 100644 --- a/interfaces/ReviewLog.html +++ b/interfaces/ReviewLog.html @@ -1,7 +1,7 @@ ReviewLog | TS-FSRS

    Interface ReviewLog

    interface ReviewLog {
        difficulty: number;
        due: Date;
        elapsed_days: number;
        last_elapsed_days: number;
        rating: Rating;
        review: Date;
        scheduled_days: number;
        stability: number;
        state: State;
    }

    Properties

    difficulty +

    Interface ReviewLog

    interface ReviewLog {
        difficulty: number;
        due: Date;
        elapsed_days: number;
        last_elapsed_days: number;
        rating: Rating;
        review: Date;
        scheduled_days: number;
        stability: number;
        state: State;
    }

    Properties

    difficulty: number
    due: Date
    elapsed_days: number
    last_elapsed_days: number
    rating: Rating
    review: Date
    scheduled_days: number
    stability: number
    state: State
    +

    Properties

    difficulty: number
    due: Date
    elapsed_days: number
    last_elapsed_days: number
    rating: Rating
    review: Date
    scheduled_days: number
    stability: number
    state: State
    diff --git a/interfaces/ReviewLogInput.html b/interfaces/ReviewLogInput.html index f685534..4e77888 100644 --- a/interfaces/ReviewLogInput.html +++ b/interfaces/ReviewLogInput.html @@ -1,7 +1,7 @@ ReviewLogInput | TS-FSRS

    Interface ReviewLogInput

    interface ReviewLogInput {
        difficulty: number;
        due: DateInput;
        elapsed_days: number;
        last_elapsed_days: number;
        rating: RatingType | Rating;
        review: DateInput;
        scheduled_days: number;
        stability: number;
        state: StateType | State;
    }

    Hierarchy

    • Omit<ReviewLog,
          | "rating"
          | "state"
          | "due"
          | "review">
      • ReviewLogInput

    Properties

    difficulty +

    Interface ReviewLogInput

    interface ReviewLogInput {
        difficulty: number;
        due: DateInput;
        elapsed_days: number;
        last_elapsed_days: number;
        rating: RatingType | Rating;
        review: DateInput;
        scheduled_days: number;
        stability: number;
        state: StateType | State;
    }

    Hierarchy

    • Omit<ReviewLog,
          | "rating"
          | "state"
          | "due"
          | "review">
      • ReviewLogInput

    Properties

    difficulty: number
    elapsed_days: number
    last_elapsed_days: number
    rating: RatingType | Rating
    review: DateInput
    scheduled_days: number
    stability: number
    state: StateType | State
    +

    Properties

    difficulty: number
    elapsed_days: number
    last_elapsed_days: number
    rating: RatingType | Rating
    review: DateInput
    scheduled_days: number
    stability: number
    state: StateType | State
    diff --git a/types/DateInput.html b/types/DateInput.html index 29594a9..889ae92 100644 --- a/types/DateInput.html +++ b/types/DateInput.html @@ -1,4 +1,4 @@ DateInput | TS-FSRS

    Type Alias DateInput

    DateInput: Date | number | string
    +

    Type Alias DateInput

    DateInput: Date | number | string
    diff --git a/types/FSRSHistory.html b/types/FSRSHistory.html index 05d6452..3c7688e 100644 --- a/types/FSRSHistory.html +++ b/types/FSRSHistory.html @@ -1,4 +1,4 @@ FSRSHistory | TS-FSRS

    Type Alias FSRSHistory

    FSRSHistory: Partial<Omit<ReviewLog, "rating" | "review" | "elapsed_days">> & ({
        rating: Grade;
        review: DateInput | Date;
    } | {
        due: DateInput | Date;
        rating: Manual;
        review: DateInput | Date;
        state: State;
    })
    +

    Type Alias FSRSHistory

    FSRSHistory: Partial<Omit<ReviewLog, "rating" | "review" | "elapsed_days">> & ({
        rating: Grade;
        review: DateInput | Date;
    } | {
        due: DateInput | Date;
        rating: Manual;
        review: DateInput | Date;
        state: State;
    })
    diff --git a/types/Grade.html b/types/Grade.html index 4f0c1b0..63387f6 100644 --- a/types/Grade.html +++ b/types/Grade.html @@ -1,4 +1,4 @@ Grade | TS-FSRS

    Type Alias Grade

    Grade: ExcludeManual<Rating>
    +

    Type Alias Grade

    Grade: ExcludeManual<Rating>
    diff --git a/types/IReschedule.html b/types/IReschedule.html index b96a458..d69a559 100644 --- a/types/IReschedule.html +++ b/types/IReschedule.html @@ -1,4 +1,4 @@ IReschedule | TS-FSRS

    Type Alias IReschedule<T>

    IReschedule<T>: {
        collections: T[];
        reschedule_item: T | null;
    }

    Type Parameters

    +

    Type Alias IReschedule<T>

    IReschedule<T>: {
        collections: T[];
        reschedule_item: T | null;
    }

    Type Parameters

    diff --git a/types/RatingType.html b/types/RatingType.html index bcf8819..3b3227a 100644 --- a/types/RatingType.html +++ b/types/RatingType.html @@ -1,4 +1,4 @@ RatingType | TS-FSRS

    Type Alias RatingType

    RatingType:
        | "Manual"
        | "Again"
        | "Hard"
        | "Good"
        | "Easy"
    +

    Type Alias RatingType

    RatingType:
        | "Manual"
        | "Again"
        | "Hard"
        | "Good"
        | "Easy"
    diff --git a/types/RecordLog.html b/types/RecordLog.html index 92eb8f4..bca6b38 100644 --- a/types/RecordLog.html +++ b/types/RecordLog.html @@ -1,4 +1,4 @@ RecordLog | TS-FSRS

    Type Alias RecordLog

    RecordLog: {
        [key in Grade]: RecordLogItem
    }
    +

    Type Alias RecordLog

    RecordLog: {
        [key in Grade]: RecordLogItem
    }
    diff --git a/types/RecordLogItem.html b/types/RecordLogItem.html index 6bc0a65..0db04d5 100644 --- a/types/RecordLogItem.html +++ b/types/RecordLogItem.html @@ -1,4 +1,4 @@ RecordLogItem | TS-FSRS

    Type Alias RecordLogItem

    RecordLogItem: {
        card: Card;
        log: ReviewLog;
    }
    +

    Type Alias RecordLogItem

    RecordLogItem: {
        card: Card;
        log: ReviewLog;
    }
    diff --git a/types/RescheduleOptions.html b/types/RescheduleOptions.html index 01a93e5..0f43b73 100644 --- a/types/RescheduleOptions.html +++ b/types/RescheduleOptions.html @@ -14,4 +14,4 @@

    Returns number

    A negative number if a should be ordered before b, a positive number if a should be ordered after b, or 0 if they have the same order.

  • skipManual: boolean

    Indicating whether to skip manual steps.

  • update_memory_state: boolean

    Indicating whether to update the FSRS memory state.

    -
  • +
    diff --git a/types/StateType.html b/types/StateType.html index aebd7bf..663b84d 100644 --- a/types/StateType.html +++ b/types/StateType.html @@ -1,4 +1,4 @@ StateType | TS-FSRS

    Type Alias StateType

    StateType:
        | "New"
        | "Learning"
        | "Review"
        | "Relearning"
    +

    Type Alias StateType

    StateType:
        | "New"
        | "Learning"
        | "Review"
        | "Relearning"
    diff --git a/types/TSchedulerStrategy.html b/types/TSchedulerStrategy.html index 74d8373..7ca2ea6 100644 --- a/types/TSchedulerStrategy.html +++ b/types/TSchedulerStrategy.html @@ -1,4 +1,4 @@ TSchedulerStrategy | TS-FSRS

    Type Alias TSchedulerStrategy<T>

    TSchedulerStrategy<T>: (new (card: T, now: DateInput, algorithm: FSRSAlgorithm, strategies: {
        seed: TSeedStrategy;
    }) => IScheduler)

    Type Parameters

    +

    Type Alias TSchedulerStrategy<T>

    TSchedulerStrategy<T>: (new (card: T, now: DateInput, algorithm: FSRSAlgorithm, strategies: {
        seed: TSeedStrategy;
    }) => IScheduler)

    Type Parameters

    diff --git a/types/TSeedStrategy.html b/types/TSeedStrategy.html index e9e659f..cd93b5d 100644 --- a/types/TSeedStrategy.html +++ b/types/TSeedStrategy.html @@ -1,4 +1,4 @@ TSeedStrategy | TS-FSRS

    Type Alias TSeedStrategy

    TSeedStrategy: ((this: AbstractScheduler) => string)
    +

    Type Alias TSeedStrategy

    TSeedStrategy: ((this: AbstractScheduler) => string)
    diff --git a/types/TStrategyHandler.html b/types/TStrategyHandler.html index f77e537..c4a2f40 100644 --- a/types/TStrategyHandler.html +++ b/types/TStrategyHandler.html @@ -1,4 +1,4 @@ TStrategyHandler | TS-FSRS

    Type Alias TStrategyHandler<E>

    TStrategyHandler<E>: E extends SCHEDULER
        ? TSchedulerStrategy
        : E extends SEED
            ? TSeedStrategy
            : never

    Type Parameters

    +

    Type Alias TStrategyHandler<E>

    TStrategyHandler<E>: E extends SCHEDULER
        ? TSchedulerStrategy
        : E extends SEED
            ? TSeedStrategy
            : never

    Type Parameters

    diff --git a/types/double.html b/types/double.html index 6f02f19..108810b 100644 --- a/types/double.html +++ b/types/double.html @@ -1,4 +1,4 @@ double | TS-FSRS

    Type Alias double

    double: number & {
        __double__: void;
    }
    +

    Type Alias double

    double: number & {
        __double__: void;
    }
    diff --git a/types/int.html b/types/int.html index d55a7ac..4f1298c 100644 --- a/types/int.html +++ b/types/int.html @@ -1,4 +1,4 @@ int | TS-FSRS

    Type Alias int

    int: number & {
        __int__: void;
    }
    +

    Type Alias int

    int: number & {
        __int__: void;
    }
    diff --git a/types/unit.html b/types/unit.html index 5797a4f..56bb568 100644 --- a/types/unit.html +++ b/types/unit.html @@ -1,4 +1,4 @@ unit | TS-FSRS

    Type Alias unit

    unit: "days" | "minutes"
    +

    Type Alias unit

    unit: "days" | "minutes"
    diff --git a/variables/DECAY.html b/variables/DECAY.html index d975592..dc9198f 100644 --- a/variables/DECAY.html +++ b/variables/DECAY.html @@ -4,4 +4,4 @@

    Variable DECAYConst

    DECAY: number = -0.5
    DECAY = -0.5
     
    -
    +
    diff --git a/variables/FACTOR.html b/variables/FACTOR.html index 1b7bad4..344beb1 100644 --- a/variables/FACTOR.html +++ b/variables/FACTOR.html @@ -6,4 +6,4 @@
    FACTOR = 19 / 81
     
    -
    +
    diff --git a/variables/FSRSVersion.html b/variables/FSRSVersion.html index b2e281e..ceff80c 100644 --- a/variables/FSRSVersion.html +++ b/variables/FSRSVersion.html @@ -1,4 +1,4 @@ FSRSVersion | TS-FSRS

    Variable FSRSVersionConst

    FSRSVersion: string = 'v4.5.0 using FSRS-5.0'
    +

    Variable FSRSVersionConst

    FSRSVersion: string = 'v4.5.1 using FSRS-5.0'
    diff --git a/variables/Grades.html b/variables/Grades.html index 14ff34f..819545a 100644 --- a/variables/Grades.html +++ b/variables/Grades.html @@ -1,4 +1,4 @@ Grades | TS-FSRS

    Variable GradesConst

    Grades: Readonly<Grade[]> = ...
    +

    Variable GradesConst

    Grades: Readonly<Grade[]> = ...
    diff --git a/variables/default_enable_fuzz.html b/variables/default_enable_fuzz.html index 722cb20..3ad3c50 100644 --- a/variables/default_enable_fuzz.html +++ b/variables/default_enable_fuzz.html @@ -1,4 +1,4 @@ default_enable_fuzz | TS-FSRS

    Variable default_enable_fuzzConst

    default_enable_fuzz: false = false
    +

    Variable default_enable_fuzzConst

    default_enable_fuzz: false = false
    diff --git a/variables/default_enable_short_term.html b/variables/default_enable_short_term.html index 0fc7525..64301be 100644 --- a/variables/default_enable_short_term.html +++ b/variables/default_enable_short_term.html @@ -1,4 +1,4 @@ default_enable_short_term | TS-FSRS

    Variable default_enable_short_termConst

    default_enable_short_term: true = true
    +

    Variable default_enable_short_termConst

    default_enable_short_term: true = true
    diff --git a/variables/default_maximum_interval.html b/variables/default_maximum_interval.html index 5575e30..588f41e 100644 --- a/variables/default_maximum_interval.html +++ b/variables/default_maximum_interval.html @@ -1,4 +1,4 @@ default_maximum_interval | TS-FSRS

    Variable default_maximum_intervalConst

    default_maximum_interval: 36500 = 36500
    +

    Variable default_maximum_intervalConst

    default_maximum_interval: 36500 = 36500
    diff --git a/variables/default_request_retention.html b/variables/default_request_retention.html index 631a4b5..17ca514 100644 --- a/variables/default_request_retention.html +++ b/variables/default_request_retention.html @@ -1,4 +1,4 @@ default_request_retention | TS-FSRS

    Variable default_request_retentionConst

    default_request_retention: 0.9 = 0.9
    +

    Variable default_request_retentionConst

    default_request_retention: 0.9 = 0.9
    diff --git a/variables/default_w.html b/variables/default_w.html index 689a1f0..d22965e 100644 --- a/variables/default_w.html +++ b/variables/default_w.html @@ -1,4 +1,4 @@ default_w | TS-FSRS

    Variable default_wConst

    default_w: number[] = ...
    +

    Variable default_wConst

    default_w: number[] = ...