hexo/node_modules/@selderee/plugin-htmlparser2/lib/hp2-builder.d.ts

17 lines
558 B
TypeScript
Raw Normal View History

2024-05-09 16:35:20 +08:00
import { Element } from 'domhandler';
import { Picker, Ast } from 'selderee';
/**
* A {@link BuilderFunction} implementation.
*
* Creates a function (in a {@link Picker} wrapper) that can run
* the decision tree against `htmlparser2` `Element` nodes.
*
* @typeParam V - the type of values associated with selectors.
*
* @param nodes - nodes ({@link DecisionTreeNode})
* from the root level of the decision tree.
*
* @returns a {@link Picker} object.
*/
export declare function hp2Builder<V>(nodes: Ast.DecisionTreeNode<V>[]): Picker<Element, V>;