UNPKG

926 BTypeScriptView Raw
1import HTMLElement from './nodes/html';
2/**
3 * Matcher class to make CSS match
4 *
5 * @class Matcher
6 */
7export default class Matcher {
8 private matchers;
9 private nextMatch;
10 /**
11 * Creates an instance of Matcher.
12 * @param {string} selector
13 *
14 * @memberof Matcher
15 */
16 constructor(selector: string);
17 /**
18 * Trying to advance match pointer
19 * @param {HTMLElement} el element to make the match
20 * @return {bool} true when pointer advanced.
21 */
22 advance(el: HTMLElement): boolean;
23 /**
24 * Rewind the match pointer
25 */
26 rewind(): void;
27 /**
28 * Trying to determine if match made.
29 * @return {bool} true when the match is made
30 */
31 get matched(): boolean;
32 /**
33 * Rest match pointer.
34 * @return {[type]} [description]
35 */
36 reset(): void;
37 /**
38 * flush cache to free memory
39 */
40 flushCache(): void;
41}