generated from napi-rs/package-template
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.d.ts
51 lines (49 loc) · 1.69 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/* tslint:disable */
/* eslint-disable */
/* auto-generated by NAPI-RS */
/**
* directly use fsrs::DEFAULT_PARAMETERS will cause error.
* referencing statics in constants is unstable
* see issue #119618 <https://github.com/rust-lang/rust/issues/119618> for more information
* `static` and `const` variables can refer to other `const` variables. A `const` variable, however, cannot refer to a `static` variable.
* to fix this, the value can be extracted to a `const` and then used.
*/
export const DEFAULT_PARAMETERS: number[]
export declare class FSRS {
constructor()
computeParameters(trainSet: Array<FSRSItem>): Array<number>
nextStates(currentMemoryState: MemoryState | undefined | null, desiredRetention: number, daysElapsed: number): NextStates
benchmark(trainSet: Array<FSRSItem>): Array<number>
memoryStateFromSm2(easeFactor: number, interval: number, sm2Retention: number): MemoryState
memoryState(item: FSRSItem, startingState?: MemoryState | undefined | null): MemoryState
}
export declare class FSRSReview {
constructor(rating: number, deltaT: number)
get rating(): number
get deltaT(): number
toJSON(): string
}
export declare class FSRSItem {
constructor(reviews: Array<FSRSReview>)
get reviews(): Array<FSRSReview>
longTermReviewCnt(): number
toJSON(): string
}
export declare class MemoryState {
constructor(stability: number, difficulty: number)
get stability(): number
get difficulty(): number
toJSON(): string
}
export declare class NextStates {
get hard(): ItemState
get good(): ItemState
get easy(): ItemState
get again(): ItemState
toJSON(): string
}
export declare class ItemState {
get memory(): MemoryState
get interval(): number
toJSON(): string
}