Add DailyLearningEvent intermediate base class#10
Merged
Conversation
Creates DailyLearningEvent extending Event with constructor (date: HDate, desc: string, mask = flags.DAILY_LEARNING). Updates all 13 event classes that previously extended Event directly to extend DailyLearningEvent instead. https://claude.ai/code/session_01HFo843jJUGDwFtstBe8H8F
- DirshuAmudYomi is now a simple type {name, amud, side} instead of
a class extending DafPage (renamed blattNum → amud)
- DirshuAmudYomiEvent now extends DailyLearningEvent directly instead
of DafPageEvent; renderBrief() contains the render logic previously
in DirshuAmudYomi.render()
- Update tests to use plain object property access instead of class methods
https://claude.ai/code/session_01HFo843jJUGDwFtstBe8H8F
render() keeps the full Hebrew form with דף and ע״א/ע״ב notation (e.g. "פסחים דף פ״ד ע״ב"), while renderBrief() now uses a shorter form without דף and with plain א/ב (e.g. "פסחים פ״ד ב"). https://claude.ai/code/session_01HFo843jJUGDwFtstBe8H8F
Replace the verbose:
locale = locale || 'en';
if (typeof locale === 'string') { locale = locale.toLowerCase(); }
with the concise:
const loc = (locale || 'en').toLowerCase();
Applied across all 11 files that used the old pattern.
https://claude.ai/code/session_01HFo843jJUGDwFtstBe8H8F
…umber TypeScript was inferring mask as the literal type 67108864 from the default value, causing TS2345 when callers passed a generic number. https://claude.ai/code/session_01HFo843jJUGDwFtstBe8H8F
Replaces the repeated inline check loc === 'he' || loc === 'he-x-nonikud' with a single call to isHebrewLocale(loc) across 10 files. https://claude.ai/code/session_01HFo843jJUGDwFtstBe8H8F
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Creates DailyLearningEvent extending Event with constructor
(date: HDate, desc: string, mask = flags.DAILY_LEARNING).
Updates all 13 event classes that previously extended Event
directly to extend DailyLearningEvent instead.
https://claude.ai/code/session_01HFo843jJUGDwFtstBe8H8F