Interface: DictionaryEntry
A single dictionary entry: a hanja key with one hangul reading.
Callers pass these in MapDictionarySource.entries to build a
dictionary at runtime. Fields mirror the Rust ReadingCandidate type plus
the hanja key.
Properties
hanja
readonlyhanja:string
The hanja form (dictionary key), e.g. "漢字".
preference?
readonlyoptionalpreference?:number
Relative default preference for this reading within its hanja key, a
non-negative integer. Larger values win, so an entry listed twice with
different preferences keeps competing readings and uses the higher one by
default. Absent means 0.
List order never selects the default: when two readings share a preference the tie is broken by reading spelling. Set distinct preferences to choose a default deliberately.
Corresponds to Rust ReadingCandidate::preference.
reading
readonlyreading:string
The word-initial hangul reading, e.g. "한자".
requireHangul?
readonlyoptionalrequireHangul?:boolean
When true, the renderer should always show a hangul gloss alongside
the original hanja (used with rendering: "original").
Corresponds to Rust MatchMark::require_hangul.
requireHanja?
readonlyoptionalrequireHanja?:boolean
When true, the renderer should always show the original hanja
alongside the hangul reading, regardless of ambiguity.
Corresponds to Rust MatchMark::require_hanja.
suffixReading?
readonlyoptionalsuffixReading?:string
The reading used when the match is not word-initial, when it differs from
reading. For example a 年代 entry with reading: "연대" and
suffixReading: "년대" reads 1990年代 as 1990년대 but 年代 alone as
연대.
Corresponds to Rust ReadingCandidate::suffix_reading.