/// import * as stream from "stream"; import * as events from "events"; // Markup data //----------------------------------------------------------------------------------- declare namespace MarkupData { interface Location { /** * One-based line index */ line: number; /** * One-based column index */ col: number; /** * Zero-based first character index */ startOffset: number; /** * Zero-based last character index */ endOffset: number; } interface AttributesLocation { [attributeName: string]: Location; } interface StartTagLocation extends Location { /** * Start tag attributes' location info */ attrs: AttributesLocation } interface ElementLocation extends StartTagLocation { /** * Element's start tag location info. */ startTag: StartTagLocation; /** * Element's end tag location info. */ endTag: Location; } } // Errors //----------------------------------------------------------------------------------- declare namespace Errors { export interface ParsingError { /** * Errror message code * Description can be found the in the spec: https://html.spec.whatwg.org/#parse-errors */ code: string; /** * One-based first character line */ startLine: number; /** * One-based first character column */ startCol: number; /** * Zero-based first character index */ startOffset: number; /** * One-based last character line */ endLine: number; /** * One-based last character column */ endCol: number; /** * Zero-based last character index */ endOffset: number; } } // Options //----------------------------------------------------------------------------------- declare namespace Options { export interface ParserOptions { /** * [Scripting flag](https://html.spec.whatwg.org/multipage/parsing.html#scripting-flag). * When enabled the parser treats `