Skip to main content

Interface: SpellingDictionary

Defined in: packages/cspell-dictionary/dist/SpellingDictionary/SpellingDictionary.d.ts:96

Extends​

  • DictionaryInfo

Extended by​

Properties​

containsNoSuggestWords​

readonly containsNoSuggestWords: boolean

Defined in: packages/cspell-dictionary/dist/SpellingDictionary/SpellingDictionary.d.ts:98


getPreferredSuggestions?​

optional getPreferredSuggestions?: (word) => PreferredSuggestion[]

Defined in: packages/cspell-dictionary/dist/SpellingDictionary/SpellingDictionary.d.ts:121

Parameters​

word​

string

Returns​

PreferredSuggestion[]


isDictionaryCaseSensitive​

readonly isDictionaryCaseSensitive: boolean

Defined in: packages/cspell-dictionary/dist/SpellingDictionary/SpellingDictionary.d.ts:132


mapWord?​

optional mapWord?: MapWordSingleFn

Defined in: packages/cspell-dictionary/dist/SpellingDictionary/SpellingDictionary.d.ts:123


name​

readonly name: string

Defined in: packages/cspell-dictionary/dist/SpellingDictionary/SpellingDictionary.d.ts:88

The name of the dictionary

Inherited from​

DictionaryInfo.name


options​

readonly options: SpellingDictionaryOptions

Defined in: packages/cspell-dictionary/dist/SpellingDictionary/SpellingDictionary.d.ts:92

Options

Inherited from​

DictionaryInfo.options


remapWord?​

optional remapWord?: MapWordMultipleFn

Defined in: packages/cspell-dictionary/dist/SpellingDictionary/SpellingDictionary.d.ts:130

Generates all possible word combinations by applying repMap. This acts a bit like brace expansions in globs.

Param​

word

the word to map

Returns​

array of adjusted words.


size​

readonly size: number

Defined in: packages/cspell-dictionary/dist/SpellingDictionary/SpellingDictionary.d.ts:131


source​

readonly source: string

Defined in: packages/cspell-dictionary/dist/SpellingDictionary/SpellingDictionary.d.ts:90

The source, filename or URI

Inherited from​

DictionaryInfo.source


terms?​

optional terms?: () => Iterable<string>

Defined in: packages/cspell-dictionary/dist/SpellingDictionary/SpellingDictionary.d.ts:138

Get all the terms in the dictionary, they may be formatted according to the dictionary options.

Returns​

Iterable<string>

the terms in the dictionary.


type​

readonly type: string

Defined in: packages/cspell-dictionary/dist/SpellingDictionary/SpellingDictionary.d.ts:97

Methods​

find()​

find(word, options?): FindResult | undefined

Defined in: packages/cspell-dictionary/dist/SpellingDictionary/SpellingDictionary.d.ts:101

A more detailed search for a word, might take longer than has

Parameters​

word​

string

options?​

Readonly<FindOptions>

Returns​

FindResult | undefined


genSuggestions()​

genSuggestions(collector, suggestOptions): void

Defined in: packages/cspell-dictionary/dist/SpellingDictionary/SpellingDictionary.d.ts:122

Parameters​

collector​

SuggestionCollector

suggestOptions​

SuggestOptionsRO

Returns​

void


getErrors()?​

optional getErrors(): Error[]

Defined in: packages/cspell-dictionary/dist/SpellingDictionary/SpellingDictionary.d.ts:133

Returns​

Error[]


has()​

has(word, options?): boolean

Defined in: packages/cspell-dictionary/dist/SpellingDictionary/SpellingDictionary.d.ts:99

Parameters​

word​

string

options?​

Readonly<SearchOptions>

Returns​

boolean


isForbidden()​

isForbidden(word, ignoreCaseAndAccents?): boolean

Defined in: packages/cspell-dictionary/dist/SpellingDictionary/SpellingDictionary.d.ts:106

Checks if a word is forbidden.

Parameters​

word​

string

word to check.

ignoreCaseAndAccents?​

boolean

Returns​

boolean


isNoSuggestWord()​

isNoSuggestWord(word, options): boolean

Defined in: packages/cspell-dictionary/dist/SpellingDictionary/SpellingDictionary.d.ts:114

No Suggest words are considered correct but will not be listed when suggestions are generated. No Suggest words and "Ignored" words are equivalent. Ignored / no suggest words override forbidden words.

Parameters​

word​

string

word to check

options​

HasOptionsRO

options

Returns​

boolean


suggest()​

suggest(word, suggestOptions?): SuggestionResult[]

Defined in: packages/cspell-dictionary/dist/SpellingDictionary/SpellingDictionary.d.ts:120

Generate suggestions for a word

Parameters​

word​

string

word

suggestOptions?​

Readonly<SuggestOptions>

options

Returns​

SuggestionResult[]