forked from nepsilon/search-query-parser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
32 lines (27 loc) · 860 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
// @file
// Type definitions for search-query-parser.
// Project: https://github.com/nepsilon/search-query-parser
// Definitions by: Geoffrey Roberts <[email protected]>
// Definitions: https://github.com/nepsilon/search-query-parser
export interface SearchParserOptions {
offsets?: boolean;
tokenize?: boolean;
keywords?: string[];
ranges?: string[];
alwaysArray?: boolean;
}
export interface ISearchParserDictionary {
[key: string]: any;
}
export interface SearchParserOffset {
keyword: string;
value?: string;
offsetStart: number;
offsetEnd: number;
}
export interface SearchParserResult extends ISearchParserDictionary {
text?: string | string[];
offsets?: SearchParserOffset[];
exclude?: ISearchParserDictionary;
}
export function parse(string: string, options?: SearchParserOptions): string | SearchParserResult;