2025-05-12 05:38:44 +09:00

36 lines
807 B
TypeScript

import * as cheerio from "cheerio";
/**
* Load an HTML string and return a cheerio instance
* @param html
*/
export declare function loadHtml(html: string): cheerio.CheerioAPI;
/**
Parse an HTML string and return its content
@param html
@return {cheerio.Root}
*/
export declare function parse(html: string): cheerio.CheerioAPI;
/**
Return main element for a DOM
@param {cheerio.DOM}
@return {cheerio.Node}
*/
export declare function root($: any): any;
/**
Return text node of an element
@param {cheerio.Node}
@return {string}
*/
export declare function textNode($el: any): any;
/**
Cleanup a DOM by removing all useless divs
@param {cheerio.Node}
@param {cheerio.DOM}
@return {cheerio.Node}
*/
export declare function cleanup($el: any, $: any): any;
//# sourceMappingURL=dom.d.ts.map