Skip to content

Commit

Permalink
fix: Text Only Offset Type (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
sqwk authored Jun 2, 2021
1 parent 48c378b commit 74b8701
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 74b8701

Please sign in to comment.