nepsilon / search-query-parser

A simple parser for advanced search query syntax
https://www.npmjs.org/package/search-query-parser
MIT License
253 stars 40 forks source link

Wrong types for text (non-keyword) input #37

Closed sqwk closed 3 years ago

sqwk commented 4 years ago

SearchParserOffset is missing an optional text: string type if the relevant input is not a keyword.

Could be solved by adding text?: string to the SearchParserOffset. The better option would be to create an intersection type for both keyword and non-keyword types.

Happy to create a PR for this.