Skip to main content

Interface: SuggestionCollector

Defined in: packages/cspell-trie-lib/dist/index.d.ts:332

Properties

add()

add: (suggestion) => SuggestionCollector

Defined in: packages/cspell-trie-lib/dist/index.d.ts:344

Parameters

suggestion

SuggestionResultBase

Returns

SuggestionCollector


changeLimit

readonly changeLimit: number

Defined in: packages/cspell-trie-lib/dist/index.d.ts:346


collect()

collect: (src, timeout?, filter?) => void

Defined in: packages/cspell-trie-lib/dist/index.d.ts:343

Collection suggestions from a SuggestionIterator

Parameters

src

SuggestionGenerator

the SuggestionIterator used to generate suggestions.

timeout?

number

the amount of time in milliseconds to allow for suggestions. before sending symbolStopProcessing Iterator implementation:

filter?

FilterWordFn

Returns

void

Example

r = yield(suggestion);
if (r === collector.symbolStopProcessing) // ...stop generating suggestions.

genSuggestionOptions

readonly genSuggestionOptions: GenSuggestionOptionsRO

Defined in: packages/cspell-trie-lib/dist/index.d.ts:352


ignoreCase

readonly ignoreCase: boolean

Defined in: packages/cspell-trie-lib/dist/index.d.ts:351


includesTies

readonly includesTies: boolean

Defined in: packages/cspell-trie-lib/dist/index.d.ts:350


maxCost

readonly maxCost: number

Defined in: packages/cspell-trie-lib/dist/index.d.ts:347


maxNumSuggestions

readonly maxNumSuggestions: number

Defined in: packages/cspell-trie-lib/dist/index.d.ts:349


suggestions

readonly suggestions: SuggestionResult[]

Defined in: packages/cspell-trie-lib/dist/index.d.ts:345


symbolStopProcessing

readonly symbolStopProcessing: symbol

Defined in: packages/cspell-trie-lib/dist/index.d.ts:356

Possible value sent to the SuggestionIterator telling it to stop processing.


word

readonly word: string

Defined in: packages/cspell-trie-lib/dist/index.d.ts:348