Interface: SpellingDictionary
Defined in: packages/cspell-dictionary/dist/SpellingDictionary/SpellingDictionary.d.ts:89
Extends
DictionaryInfo
Extended by
Properties
containsNoSuggestWords
readonlycontainsNoSuggestWords:boolean
Defined in: packages/cspell-dictionary/dist/SpellingDictionary/SpellingDictionary.d.ts:91
getPreferredSuggestions()?
optionalgetPreferredSuggestions: (word) =>PreferredSuggestion[]
Defined in: packages/cspell-dictionary/dist/SpellingDictionary/SpellingDictionary.d.ts:114
Parameters
word
string
Returns
PreferredSuggestion[]
isDictionaryCaseSensitive
readonlyisDictionaryCaseSensitive:boolean
Defined in: packages/cspell-dictionary/dist/SpellingDictionary/SpellingDictionary.d.ts:125
name
readonlyname:string
Defined in: packages/cspell-dictionary/dist/SpellingDictionary/SpellingDictionary.d.ts:83
The name of the dictionary
Inherited from
DictionaryInfo.name
options
readonlyoptions:SpellingDictionaryOptions
Defined in: packages/cspell-dictionary/dist/SpellingDictionary/SpellingDictionary.d.ts:87
Options
Inherited from
DictionaryInfo.options
remapWord()?
optionalremapWord: (word) =>string[]
Defined in: packages/cspell-dictionary/dist/SpellingDictionary/SpellingDictionary.d.ts:123
Generates all possible word combinations by applying repMap.
This acts a bit like brace expansions in globs.
Parameters
word
string
the word to map
Returns
string[]
array of adjusted words.
size
readonlysize:number
Defined in: packages/cspell-dictionary/dist/SpellingDictionary/SpellingDictionary.d.ts:124
source
readonlysource:string
Defined in: packages/cspell-dictionary/dist/SpellingDictionary/SpellingDictionary.d.ts:85
The source, filename or URI
Inherited from
DictionaryInfo.source
type
readonlytype:string
Defined in: packages/cspell-dictionary/dist/SpellingDictionary/SpellingDictionary.d.ts:90
Methods
find()
find(
word,options?):FindResult|undefined
Defined in: packages/cspell-dictionary/dist/SpellingDictionary/SpellingDictionary.d.ts:94
A more detailed search for a word, might take longer than has
Parameters
word
string
options?
Readonly<SearchOptions>
Returns
FindResult | undefined
genSuggestions()
genSuggestions(
collector,suggestOptions):void
Defined in: packages/cspell-dictionary/dist/SpellingDictionary/SpellingDictionary.d.ts:115
Parameters
collector
suggestOptions
SuggestOptionsRO
Returns
void
getErrors()?
optionalgetErrors():Error[]
Defined in: packages/cspell-dictionary/dist/SpellingDictionary/SpellingDictionary.d.ts:126
Returns
Error[]
has()
has(
word,options?):boolean
Defined in: packages/cspell-dictionary/dist/SpellingDictionary/SpellingDictionary.d.ts:92
Parameters
word
string
options?
Readonly<SearchOptions>
Returns
boolean
isForbidden()
isForbidden(
word,ignoreCaseAndAccents?):boolean
Defined in: packages/cspell-dictionary/dist/SpellingDictionary/SpellingDictionary.d.ts:99
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:107
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
mapWord()
mapWord(
word):string
Defined in: packages/cspell-dictionary/dist/SpellingDictionary/SpellingDictionary.d.ts:116
Parameters
word
string
Returns
string
suggest()
suggest(
word,suggestOptions?):SuggestionResult[]
Defined in: packages/cspell-dictionary/dist/SpellingDictionary/SpellingDictionary.d.ts:113
Generate suggestions for a word
Parameters
word
string
word
suggestOptions?
Readonly<SuggestOptions>
options