From 22a25ded9f7d9c9a96cce8d1bc12475ca0434201 Mon Sep 17 00:00:00 2001 From: Minteck Date: Wed, 9 Feb 2022 17:58:07 +0100 Subject: Major update --- node_modules/cheerio/lib/static.d.ts | 88 ++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 node_modules/cheerio/lib/static.d.ts (limited to 'node_modules/cheerio/lib/static.d.ts') diff --git a/node_modules/cheerio/lib/static.d.ts b/node_modules/cheerio/lib/static.d.ts new file mode 100644 index 0000000..666c243 --- /dev/null +++ b/node_modules/cheerio/lib/static.d.ts @@ -0,0 +1,88 @@ +import type { CheerioAPI, Cheerio } from '.'; +import { Node, Document } from 'domhandler'; +import { CheerioOptions } from './options'; +/** + * Renders the document. + * + * @param options - Options for the renderer. + * @returns The rendered document. + */ +export declare function html(this: CheerioAPI | void, options?: CheerioOptions): string; +/** + * Renders the document. + * + * @param dom - Element to render. + * @param options - Options for the renderer. + * @returns The rendered document. + */ +export declare function html(this: CheerioAPI | void, dom?: string | ArrayLike | Node, options?: CheerioOptions): string; +/** + * Render the document as XML. + * + * @param dom - Element to render. + * @returns THe rendered document. + */ +export declare function xml(this: CheerioAPI, dom?: string | ArrayLike | Node): string; +/** + * Render the document as text. + * + * @param elements - Elements to render. + * @returns The rendered document. + */ +export declare function text(this: CheerioAPI | void, elements?: ArrayLike): string; +/** + * Parses a string into an array of DOM nodes. The `context` argument has no + * meaning for Cheerio, but it is maintained for API compatibility with jQuery. + * + * @param data - Markup that will be parsed. + * @param context - Will be ignored. If it is a boolean it will be used as the + * value of `keepScripts`. + * @param keepScripts - If false all scripts will be removed. + * @returns The parsed DOM. + * @alias Cheerio.parseHTML + * @see {@link https://api.jquery.com/jQuery.parseHTML/} + */ +export declare function parseHTML(this: CheerioAPI, data: string, context?: unknown | boolean, keepScripts?: boolean): Node[]; +export declare function parseHTML(this: CheerioAPI, data?: '' | null): null; +/** + * Sometimes you need to work with the top-level root element. To query it, you + * can use `$.root()`. + * + * @example + * + * ```js + * $.root().append('
    ').html(); + * //=>
      ...
      + * ``` + * + * @returns Cheerio instance wrapping the root node. + * @alias Cheerio.root + */ +export declare function root(this: CheerioAPI): Cheerio; +/** + * Checks to see if the `contained` DOM element is a descendant of the + * `container` DOM element. + * + * @param container - Potential parent node. + * @param contained - Potential child node. + * @returns Indicates if the nodes contain one another. + * @alias Cheerio.contains + * @see {@link https://api.jquery.com/jQuery.contains/} + */ +export declare function contains(container: Node, contained: Node): boolean; +interface WritableArrayLike extends ArrayLike { + length: number; + [n: number]: T; +} +/** + * $.merge(). + * + * @param arr1 - First array. + * @param arr2 - Second array. + * @returns `arr1`, with elements of `arr2` inserted. + * @alias Cheerio.merge + * @see {@link https://api.jquery.com/jQuery.merge/} + */ +export declare function merge(arr1: WritableArrayLike, arr2: ArrayLike): ArrayLike | undefined; +export {}; +//# sourceMappingURL=static.d.ts.map \ No newline at end of file -- cgit