UNPKG

734 BTypeScriptView Raw
1// TypeScript Version: 3.5
2
3import {Node} from 'unist'
4
5/**
6 * Is there a match for the given selector in the Unist tree
7 *
8 * @param selector CSS-like selector
9 * @param tree Unist node or tree of nodes to search
10 */
11declare function matches(selector: string, tree: Node): boolean
12
13/**
14 * Find first Node that matches selector
15 *
16 * @param selector CSS-like selector
17 * @param tree Unist node or tree of nodes to search
18 */
19declare function select(selector: string, tree: Node): Node | null
20
21/**
22 * Find all Nodes that match selector
23 *
24 * @param selector CSS-like selector
25 * @param tree Unist node or tree of nodes to search
26 */
27declare function selectAll(selector: string, tree: Node): Node[]
28
29export {matches, select, selectAll}
30
\No newline at end of file