Skip to content
1 min read · 92 words

Function: suggestVerbs() ​

ts
function suggestVerbs(input: string, candidates: readonly string[]): string[];

Defined in: src/batteries/media/verbs.ts:851

Suggest the nearest verbs to an unknown input, for did-you-mean errors. Matches whole folded forms AND suffix words (resize suggests image resize), per the frozen error model.

Parameters ​

ParameterTypeDescription
inputstringThe unknown verb text as written.
candidatesreadonly string[]The folded verb forms to search (pass the narrowed set to avoid suggesting unconfigured verbs).

Returns ​

string[]

Up to three suggestions, best first.