dom.d.ts 807 B

123456789101112131415161718192021222324252627282930313233343536
  1. import * as cheerio from "cheerio";
  2. /**
  3. * Load an HTML string and return a cheerio instance
  4. * @param html
  5. */
  6. export declare function loadHtml(html: string): cheerio.CheerioAPI;
  7. /**
  8. Parse an HTML string and return its content
  9. @param html
  10. @return {cheerio.Root}
  11. */
  12. export declare function parse(html: string): cheerio.CheerioAPI;
  13. /**
  14. Return main element for a DOM
  15. @param {cheerio.DOM}
  16. @return {cheerio.Node}
  17. */
  18. export declare function root($: any): any;
  19. /**
  20. Return text node of an element
  21. @param {cheerio.Node}
  22. @return {string}
  23. */
  24. export declare function textNode($el: any): any;
  25. /**
  26. Cleanup a DOM by removing all useless divs
  27. @param {cheerio.Node}
  28. @param {cheerio.DOM}
  29. @return {cheerio.Node}
  30. */
  31. export declare function cleanup($el: any, $: any): any;
  32. //# sourceMappingURL=dom.d.ts.map