Skip to content

Commit

Permalink
fix: Text Only Offset Type
Browse files Browse the repository at this point in the history
  • Loading branch information
sqwk committed Dec 12, 2019
1 parent d2568fa commit 2364ad6
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,21 @@ export interface ISearchParserDictionary {
[key: string]: any;
}

export interface SearchParserOffset {
keyword: string;
value?: string;
export type SearchParserOffset = SearchParserKeyWordOffset & SearchParserTextOffset & {
offsetStart: number;
offsetEnd: number;
}

export type SearchParserKeyWordOffset = {
keyword: string;
value?: string;

}

export type SearchParserTextOffset = {
text: string;
}

export interface SearchParserResult extends ISearchParserDictionary {
text?: string | string[];
offsets?: SearchParserOffset[];
Expand Down

0 comments on commit 2364ad6

Please sign in to comment.