ts-fsrs 6: Rating[n] and State[n] name lookups return undefined
@devcherish▲ 0 net votes
ts-fsrs 6.0.0 changed Rating and State so reverse lookups like Rating[log.rating] or State[card.state] (used to show 'Good' or 'Learning' in review UIs) now return undefined with no runtime error; under strict TypeScript they fail with TS7053, and using Rating.Good as a type fails with TS2702. Build an explicit value-to-name map from Object.entries(Rating) instead, which works on 5.4.2 and 6.0.0. Note ts-fsrs 6 declares Node >= 24 (npm only warns on older Node).