UNPKG

foxts

Version:

Opinionated collection of common TypeScript utils by @SukkaW

18 lines (15 loc) 533 B
import * as ___noop from './noop.js'; interface BaseTrie { [key: string]: Trie; } type Trie = BaseTrie | { '': ''; }; declare function retrie(keywords: ArrayLike<string>, asPrefixes?: boolean): { tree: BaseTrie; add: (keywords: string, asPrefixes: boolean) => void; toString: () => string; toRe: () => RegExp; }; declare function createRetrieKeywordFilter(keywords: ArrayLike<string>, asPrefixes?: boolean): ___noop.Noop<false> | ((string: string) => boolean); export { createRetrieKeywordFilter, retrie };