export type TGetHTMLFromStrArgs = Parameters; export type TGetHTMLFromStrReturn = ReturnType; /** * Get parsed HTML from string and return NodeList that includes elements and text * @param str{string} - source string * @param {DOMParserSupportedType}type - content type: * "application/xhtml+xml", "application/xml", "image/svg+xml", * "text/html" (default), or "text/xml" * @returns {Promise} Promise resolving to NodeList, or rejecting with TypeError on invalid arguments. * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser * @example * // How to get parsed HTML elements from string? * const nodes = await getHTMLFromStr(` *

Hello world!

*

Hello world!

* `); * const elements = Array.from(nodes); // array of two paragraph nodes * @example * // Parse an SVG string into DOM nodes on the browser or server * const iconNodes = await getHTMLFromStr( * ``, * "image/svg+xml" * ); */ export declare const getHTMLFromStr: (str?: string, type?: DOMParserSupportedType) => Promise;