1 | /**
|
2 | * Search represents a request from somebody (the requester of the search)
|
3 | * to find a match for search query (string or regex) in the text stream.
|
4 | * Once the query is found, the search is over and the identified match is returned to the caller.
|
5 | * A search can have a timeout after which it is aborted.
|
6 | */
|
7 | export interface Search {
|
8 | /**
|
9 | * Scan signals to this search that there is new text to look through.
|
10 | */
|
11 | scan(): void;
|
12 | }
|