From 4f6ef35ca84e2949e8347757c6dee82c8ef2e426 Mon Sep 17 00:00:00 2001 From: Sean Tan Date: Wed, 6 Dec 2017 23:36:11 +0800 Subject: [PATCH] [lunr] Add missing lunr.generateStopWordFilter function (#21998) --- types/lunr/index.d.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/types/lunr/index.d.ts b/types/lunr/index.d.ts index 0ee88cfcc7..e16851b52b 100644 --- a/types/lunr/index.d.ts +++ b/types/lunr/index.d.ts @@ -626,6 +626,19 @@ declare namespace lunr { */ function stemmer(token: Token): Token; + /** + * lunr.generateStopWordFilter builds a stopWordFilter function from the provided + * list of stop words. + * + * The built in lunr.stopWordFilter is built using this generator and can be used + * to generate custom stopWordFilters for applications or non English languages. + * + * @param stopWords - The list of stop words + * @see lunr.Pipeline + * @see lunr.stopWordFilter + */ + function generateStopWordFilter(stopWords: string[]): PipelineFunction; + /** * lunr.stopWordFilter is an English language stop word list filter, any words * contained in the list will not be passed through the filter.