import * as parse5 from 'parse5'; export type Node = parse5.Node; export type Element = parse5.Element; export type TextNode = parse5.TextNode; export type GeneratedElementCategory = 'basic' | 'custom' | 'shadowBoundary' | 'container' | 'scope' | 'text' | 'frame'; /** * Wrapper function to check if node has attribute and return its value * @param element HTML element * @param attrName name of the attribute */ export declare function getAttribute(element: Element, attrName: string): string | undefined; export declare function getAttributeNames(element: Element): string[]; export declare function getAttributeClassValues(element: Element): string[]; /** * Wrapper function to check if node has name and hence is an element * @param node HTML node * @returns boolean true if it has */ export declare function isElementNode(node: any): node is Element; /** * Wrapper function to check if node is a text * @param node HTML node * @returns boolean true if it is */ export declare function isTextNode(node: any): node is TextNode; /** * Wrapper function to get node name (for HTML node it's same as tag) * @param node HTML node * @returns string tag */ export declare function getName(node: Node): string; /** * Wrapper function to get child nodes * @param parent parent element * @returns array of elements */ export declare function getChildElements(parent: Element): Array; /** * Check if element has inner text then it will be added as basic public element * @param parent parent element * @returns true if it contains text */ export declare function hasInnerText(parent: Element): boolean; /** * check if element has child elements * @param element HTML element * @returns true if there are children */ export declare function hasChildElements(element: Element): boolean; /** * find first HTML element and treat it like root node * @param htmlString HTML as a string * @returns root element or undefined */ export declare function getRootNodes(htmlString: string): Element[]; /** * frame/iframe usually contains another HTML tree that is considered a childNode of text type * however we also are prepared to have html fragment inside * @param frameNode frame element itself * @returns array of child nodes */ export declare function getFrameContent(frameNode: Element): Element[]; //# sourceMappingURL=parser-wrapper.d.ts.map