# @types/hunspell-spellchecker

> TypeScript definitions for hunspell-spellchecker

Latest version **1.0.2** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/hunspell-spellchecker
pnpm add @types/hunspell-spellchecker
yarn add @types/hunspell-spellchecker
bun add @types/hunspell-spellchecker
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2023-11-07 |
| First published | 2022-07-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51432 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/hunspell-spellchecker
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/hunspell-spellchecker
- npm.io page: https://npm.io/package/@types/hunspell-spellchecker

## Dependencies (1)

- [@types/node](https://npm.io/package/@types/node.md) *

## Recent versions

- 1.0.2 (latest) — 2023-11-07
- 1.0.0 (ts4.0) — 2022-07-14
- 1.0.1 — 2023-10-18

## README

# Installation
> `npm install --save @types/hunspell-spellchecker`

# Summary
This package contains type definitions for hunspell-spellchecker (https://github.com/GitbookIO/hunspell-spellchecker).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/hunspell-spellchecker.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/hunspell-spellchecker/index.d.ts)
````ts
/// <reference types="node" />

declare namespace Spellchecker {
    interface Dictionary {
        rules: object;
        dictionaryTable: object;
        compoundRules: unknown[];
        compoundRuleCodes: object;
        replacementTable: unknown[];
        flags: object;
    }
}

declare class Spellchecker {
    constructor(dictionary?: Spellchecker.Dictionary);

    /** Parse a dicitonary */
    parse(files: { aff: Buffer; dic: Buffer }): Spellchecker.Dictionary;

    /** Use a parsed dictionary */
    use(dictionary: Spellchecker.Dictionary): void;

    /**
     * Checks whether a word or a capitalization variant exists in the current dictionary.
     * The word is trimmed and several variations of capitalizations are checked.
     * If you want to check a word without any changes made to it, call checkExact()
     */
    check(word: string): boolean;

    /** Checks whether a word exists in the current dictionary. */
    checkExact(word: string): boolean;

    /** Looks up whether a given word is flagged with a given flag. */
    hasFlag(word: string, flag: string): boolean;

    /**
     * Returns a list of suggestions for a misspelled word.
     *
     * @see http://www.norvig.com/spell-correct.html for the basis of this suggestor.
     * This suggestor is primitive, but it works.
     *
     * @param limit The maximum number of suggestions to return.
     */
    suggest(word: string, limit?: number): string[];
}

export = Spellchecker;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 03:09:37 GMT
 * Dependencies: [@types/node](https://npmjs.com/package/@types/node)

# Credits
These definitions were written by [Kyle Hensel](https://github.com/k-yle).

---
_Source: https://npm.io/package/@types/hunspell-spellchecker · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
