tag-soup
Version:
The fastest pure JS SAX/DOM XML/HTML parser.
13 lines (12 loc) • 669 B
TypeScript
import { IDomHandler, IParser, IParserOptions } from './parser-types';
/**
* Creates a new stateful DOM parser.
*
* @template Node The type of object that describes a node in the DOM tree.
* @template ContainerNode The type of object that describes an element or a document in the DOM tree.
*
* @param handler The handler that provides factories and callbacks that produce the DOM tree.
* @param options The parser options.
* @returns The new parser that produces a DOM tree during parsing.
*/
export declare function createDomParser<Node, ContainerNode extends Node>(handler: IDomHandler<Node, ContainerNode>, options?: IParserOptions): IParser<Array<Node>>;