From 5a2bc4e542b7f22d1e6a4ba318cfcdc33817d34a Mon Sep 17 00:00:00 2001 From: Kuuuube <61125188+Kuuuube@users.noreply.github.com> Date: Fri, 2 Feb 2024 21:53:42 -0500 Subject: Add frequency number handlebars (#600) * Add frequencies-num handlebar * Fix handlebar name * Fix inconsistent variable name format * Add frequency-number to anki tests * Use full names for total and frequency variables * Migrate handlebars to JS, split rank and occurance, add average * Remove left behind frequency-number * Fix "occurrence" spelling * Cleanup types * Add frequency support for kanji cards * Fix code style * Clean up most of duplicate code and merge functions * Fix frequencies.length check * Use less witchcraft and remove redundant type casting --- types/ext/anki-templates.d.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'types/ext') diff --git a/types/ext/anki-templates.d.ts b/types/ext/anki-templates.d.ts index ad90e93e..37c3d52f 100644 --- a/types/ext/anki-templates.d.ts +++ b/types/ext/anki-templates.d.ts @@ -135,6 +135,8 @@ export type KanjiDictionaryEntry = { readonly tags: Tag[]; readonly stats: KanjiStatGroups; readonly frequencies: KanjiFrequency[]; + readonly frequencyHarmonic: number; + readonly frequencyAverage: number; url: string; readonly cloze: Cloze; }; @@ -190,6 +192,8 @@ export type TermDictionaryEntry = { readonly termTags?: Tag[]; readonly definitions?: TermDefinition[]; readonly frequencies: TermFrequency[]; + readonly frequencyHarmonic: number; + readonly frequencyAverage: number; readonly pitches: TermPitchAccent[]; readonly phoneticTranscriptions: TermPhoneticTranscription[]; sourceTermExactMatchCount: number; -- cgit v1.2.3