import { Element, Document } from "parse5"; import { BackcompatRoot } from "./backcompat"; export declare type ExperimentalName = "lang" | "textContent"; export interface ParserOptions { baseUrl: string; experimental?: { lang?: boolean; textContent?: boolean; }; } export interface ParsingOptions extends ParserOptions { implyProperties?: boolean; idRefs: IdRefs; inherited: { roots: BackcompatRoot[]; lang?: string; }; } export interface ParsedDocument { rels: Rels; "rel-urls": RelUrls; items: MicroformatRoot[]; doc?: Document; } export declare type MicroformatProperties = Record; export interface MicroformatRoot { id?: string; lang?: string; type?: string[]; properties: MicroformatProperties; children?: MicroformatRoot[]; value?: MicroformatProperty; } export interface Image { alt: string; value?: string; } export interface Html { html: string; value: string; lang?: string; } export declare type MicroformatProperty = MicroformatRoot | Image | Html | string; export declare type Rels = Record; export declare type RelUrls = Record; export declare type IdRefs = Record; export declare type PropertyType = "p" | "u" | "e" | "dt"; export interface ParsedProperty { key: string; value: MicroformatProperty | undefined; type: PropertyType; } export interface Backcompat { type: string[]; properties: Record; rels?: Record; }