Closed lextoc closed 1 year ago
Your type definition is slightly incorrect:
export default
corresponds to require('fuzzysearch').default
string
Try this instead:
declare function fuzzysearch (needle: string, haystack: string): boolean;
export = fuzzysearch;
I added this when I wrapped search for my own uses
export type FuzzyResults = (string | object)[] | MatchData<string | object>[];
@jchook is correct. A PR to add correct type definitions is available in #19. Such definitions are also available via @types/fuzzysearch
. I suggest closing this PR.
Saw request for declaration file, does this look good?
https://github.com/bevacqua/fuzzysearch/issues/23