mirror of
https://github.com/keymanapp/keyman.git
synced 2026-10-19 04:17:39 +00:00
chore(developer): drops redundant buildFromWordList return
This commit is contained in:
parent
c16ae2724a
commit
8504a96a4e
1 changed files with 2 additions and 3 deletions
|
|
@ -304,13 +304,12 @@ namespace Trie {
|
|||
* Populates the trie with the contents of an entire wordlist.
|
||||
* @param words a list of word and count pairs.
|
||||
*/
|
||||
function buildFromWordList(trie: Trie, words: WordList): Trie {
|
||||
function buildFromWordList(trie: Trie, words: WordList): void {
|
||||
for (let [wordform, weight] of Object.entries(words)) {
|
||||
let key = trie.toKey(wordform);
|
||||
const key = trie.toKey(wordform);
|
||||
addUnsorted(trie.root, { key, weight, content: wordform }, 0);
|
||||
}
|
||||
sortTrie(trie.root);
|
||||
return trie;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue