declare type TSearchItem = Record | string; /** * searches within array of objects by given key, returns filtered array of objects using fuzzy algorithm * @param {string} query - the phrase by which it searches * @param {Array} arrayToFilter - array which will be searched * @param {string} key - key of object within arrayToFilter where search should be used * @example * // returns [{id: 1, text: 'polish'}, {id: 2, text: 'portugal'}] * fuzzySearch('pol', [ * {id: 1, text: 'polish'}, * {id: 2, text: 'portugal'}, * {id: 3, text: 'english'} * ], 'text') * @returns {Array} - filtered array */ export declare function fuzzySearch(query: string, arrayToFilter: T[], key?: string): T[]; export {};