import JSZip from 'jszip'; export * from './builders/dictionaryIndex'; export * from './builders/termEntry'; export * from './builders/kanjiEntry'; import { DictionaryIndexType } from './types/yomitan/dictionaryindex'; import { DictionaryOptions, DictionaryStats, Counters } from './types/dictionary'; import { DictionaryTermBankV3, TermInformation } from './types/yomitan/termbank'; import { DictionaryTermMetaBankV3, TermMetaEntryType } from './types/yomitan/termbankmeta'; import { DictionaryKanjiBankV3, KanjiInformation, KanjiStats } from './types/yomitan/kanjibank'; import { DictionaryKanjiMetaBankV3, KanjiCharacterMetadata } from './types/yomitan/kanjibankmeta'; import { DictionaryTagBankV3, TagOption } from './types/yomitan/tagbank'; export declare class Dictionary { options: Required; zip: JSZip; stats: DictionaryStats; counters: Counters; termBank: DictionaryTermBankV3; termMetaBank: DictionaryTermMetaBankV3; kanjiBank: DictionaryKanjiBankV3; kanjiMetaBank: DictionaryKanjiMetaBankV3; tagBank: DictionaryTagBankV3; constructor(options: DictionaryOptions); /** * Writes the dictionary index * @param index - JSON object * @returns */ setIndex(index: DictionaryIndexType, directory?: string, fileName?: string): Promise; /** * Adds a tag * @param tag - The tag to add */ addTag(tag: TagOption): this; /** * Saves a tag bank to the zip */ private saveTagBank; /** * Adds a term to the dictionary * @param term - The term to add */ addTerm(term: TermInformation): Promise; /** * Saves a term bank to the zip */ private saveTermBank; /** * Adds a term meta to the dictionary * @param meta - The term meta to add */ addTermMeta(meta: TermMetaEntryType): Promise; /** * Saves a term meta bank to the zip */ private saveTermMetaBank; /** * Adds a kanji to the dictionary * @param kanji - The kanji to add */ addKanji(kanji: KanjiInformation | { kanji: string; onyomi?: string; kunyomi?: string; tags?: string; meanings?: string[]; stats?: KanjiStats; }): Promise; /** * Accepts an input file and saves it to the dictionary * @param inputFilePath - The input file name to save to the dictionary */ addFile(inputFilePath: string, zipFilePath: string): Promise; /** * Saves a kanji bank to the zip */ private saveKanjiBank; /** * Adds a kanji meta to the dictionary * @param meta - The kanji meta to add */ addKanjiMeta(meta: KanjiCharacterMetadata): Promise; /** * Saves a kanji meta bank to the zip */ private saveKanjiMetaBank; /** * Exports the dictionary to a zip file * @param directory - The directory to export the dictionary to * @returns The dictionary stats */ export(directory?: string): Promise; private saveJsonToZip; }