forked from krisk/Fuse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
33 lines (30 loc) · 864 Bytes
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Type definitions for Fuse.js 3.2.0
export = Fuse;
export as namespace Fuse;
declare class Fuse {
constructor(list: any[], options?: Fuse.FuseOptions)
search<T>(pattern: string): T[];
search(pattern: string): any[];
}
declare namespace Fuse {
export interface FuseOptions {
id?: string;
caseSensitive?: boolean;
includeMatches?: boolean;
includeScore?: boolean;
shouldSort?: boolean;
sortFn?: (a: { score: number }, b: { score: number }) => number;
getFn?: (obj: any, path: string) => any;
keys?: string[] | { name: string; weight: number }[];
verbose?: boolean;
tokenize?: boolean;
tokenSeparator?: RegExp;
matchAllTokens?: boolean;
location?: number;
distance?: number;
threshold?: number;
maxPatternLength?: number;
minMatchCharLength?: number;
findAllMatches?: boolean;
}
}