// @file // Type definitions for search-query-parser. // Project: https://github.com/nepsilon/search-query-parser // Definitions by: Geoffrey Roberts // Definitions: https://github.com/nepsilon/search-query-parser export module SearchQueryParser { interface SearchParserOptions { offsets?: boolean; tokenize?: boolean; keywords?: string[]; ranges?: string[]; alwaysArray?: boolean; } interface ISearchParserDictionary { [key: string]: any; } interface SearchParserOffset { keyword: string; value?: string; offsetStart: number; offsetEnd: number; } interface SearchParserResult extends ISearchParserDictionary { text?: string | string[]; offsets?: SearchParserOffset[]; exclude?: ISearchParserDictionary; } function parse(string: string, options?: SearchParserOptions): string | SearchParserResult; }