@twip/web
    Preparing search index...

    Interface Spelling

    Spell checking.

    interface Spelling {
        add(word: string): Promise<void>;
        addDictionary(dictionary: Dictionary): Promise<void>;
        ignore(word: string): Promise<void>;
        loadUserWords(language: string, words: string[]): Promise<void>;
        next(): Promise<{ suggestions: string[]; word: string } | null>;
        setEnabled(on: boolean): Promise<void>;
        setLanguage(language: string): Promise<void>;
        suggestions(word: string, language?: string): Promise<string[]>;
    }
    Index
    • Adds a word to the user's dictionary: emits wordAdded, for the application to persist.

      Parameters

      • word: string

      Returns Promise<void>

    • Loads the user's words for a language; kept until that language's dictionary arrives.

      Parameters

      • language: string
      • words: string[]

      Returns Promise<void>

    • Selects the next misspelling (F7), or resolves null when there is none.

      Returns Promise<{ suggestions: string[]; word: string } | null>

    • Suggestions for a word.

      Parameters

      • word: string
      • Optionallanguage: string

      Returns Promise<string[]>