|
1 |
| -export type MatcherFunction = (content: string, element: HTMLElement) => boolean; |
2 |
| -export type Matcher = string | RegExp | MatcherFunction; |
| 1 | +export type MatcherFunction = (content: string, element: HTMLElement) => boolean |
| 2 | +export type Matcher = string | RegExp | MatcherFunction |
3 | 3 |
|
4 |
| -export type NormalizerFn = (text: string) => string; |
| 4 | +export type NormalizerFn = (text: string) => string |
5 | 5 |
|
6 | 6 | export interface MatcherOptions {
|
7 |
| - exact?: boolean; |
8 |
| - /** Use normalizer with getDefaultNormalizer instead */ |
9 |
| - trim?: boolean; |
10 |
| - /** Use normalizer with getDefaultNormalizer instead */ |
11 |
| - collapseWhitespace?: boolean; |
12 |
| - normalizer?: NormalizerFn; |
| 7 | + exact?: boolean |
| 8 | + /** Use normalizer with getDefaultNormalizer instead */ |
| 9 | + trim?: boolean |
| 10 | + /** Use normalizer with getDefaultNormalizer instead */ |
| 11 | + collapseWhitespace?: boolean |
| 12 | + normalizer?: NormalizerFn |
| 13 | + /** set query suppress suggestions */ |
| 14 | + suggest?: boolean |
13 | 15 | }
|
14 | 16 |
|
15 | 17 | export type Match = (
|
16 |
| - textToMatch: string, |
17 |
| - node: HTMLElement | null, |
18 |
| - matcher: Matcher, |
19 |
| - options?: MatcherOptions, |
20 |
| -) => boolean; |
| 18 | + textToMatch: string, |
| 19 | + node: HTMLElement | null, |
| 20 | + matcher: Matcher, |
| 21 | + options?: MatcherOptions, |
| 22 | +) => boolean |
21 | 23 |
|
22 | 24 | export interface DefaultNormalizerOptions {
|
23 |
| - trim?: boolean; |
24 |
| - collapseWhitespace?: boolean; |
| 25 | + trim?: boolean |
| 26 | + collapseWhitespace?: boolean |
25 | 27 | }
|
26 | 28 |
|
27 |
| -export function getDefaultNormalizer(options?: DefaultNormalizerOptions): NormalizerFn; |
| 29 | +export function getDefaultNormalizer( |
| 30 | + options?: DefaultNormalizerOptions, |
| 31 | +): NormalizerFn |
28 | 32 |
|
29 | 33 | // N.B. Don't expose fuzzyMatches + matches here: they're not public API
|
0 commit comments