// Minimal ambient types for nspell (the package ships no declarations). We use
// only the handful of methods the spell checker needs: correctness lookup,
// correction suggestions, and adding words to the in-memory personal dictionary.
declare module 'nspell' {
  export interface NSpell {
    correct(word: string): boolean
    suggest(word: string): string[]
    add(word: string, model?: string): NSpell
    remove(word: string): NSpell
  }
  export interface Dictionary {
    aff: string | Buffer
    dic: string | Buffer
  }
  export default function nspell(
    aff: string | Buffer | Dictionary,
    dic?: string | Buffer,
  ): NSpell
}
