import { TagToken } from './index'; import type { Config, LintError, AST } from '../../base'; import type { AttributesParentBase } from '../../mixin/attributesParent'; import type { Token, AttributesToken } from '../../internal'; import type { AstRange } from '../../lib/range'; export interface HtmlToken extends AttributesParentBase { } /** * HTML tag * * HTML标签 * @classdesc `{childNodes: [AttributesToken]}` */ export declare abstract class HtmlToken extends TagToken { #private; readonly name: string; readonly childNodes: readonly [AttributesToken]; abstract get firstChild(): AttributesToken; abstract get lastChild(): AttributesToken; abstract get children(): [AttributesToken]; abstract get firstElementChild(): AttributesToken; abstract get lastElementChild(): AttributesToken; get type(): 'html'; /** whether to be self-closing / 是否自封闭 */ get selfClosing(): boolean; /** @throws `Error` 闭合标签或无效自封闭标签 */ set selfClosing(value: boolean); /** * @param name 标签名 * @param attr 标签属性 * @param closing 是否闭合 * @param selfClosing 是否自封闭 */ constructor(name: string, attr: AttributesToken, closing: boolean, selfClosing: boolean, config?: Config, accum?: Token[]); cloneNode(): this; /** * Change the tag name * * 更换标签名 * @param tag tag name / 标签名 * @throws `RangeError` 非法的HTML标签 */ replaceTag(tag: string): void; /** * Fix the invalid self-closing tag * * 修复无效自封闭标签 * @throws `Error` 无法修复无效自封闭标签 */ fix(): void; }