summaryrefslogtreecommitdiff
path: root/includes/external/addressbook/node_modules/cheerio/lib/esm/options.d.ts
diff options
context:
space:
mode:
authorRaindropsSys <contact@minteck.org>2023-04-06 22:18:28 +0200
committerRaindropsSys <contact@minteck.org>2023-04-06 22:18:28 +0200
commit83354b2b88218090988dd6e526b0a2505b57e0f1 (patch)
treee3c73c38a122a78bb7e66fbb99056407edd9d4b9 /includes/external/addressbook/node_modules/cheerio/lib/esm/options.d.ts
parent47b8f2299a483024c4a6a8876af825a010954caa (diff)
downloadpluralconnect-83354b2b88218090988dd6e526b0a2505b57e0f1.tar.gz
pluralconnect-83354b2b88218090988dd6e526b0a2505b57e0f1.tar.bz2
pluralconnect-83354b2b88218090988dd6e526b0a2505b57e0f1.zip
Updated 5 files and added 1110 files (automated)
Diffstat (limited to 'includes/external/addressbook/node_modules/cheerio/lib/esm/options.d.ts')
-rw-r--r--includes/external/addressbook/node_modules/cheerio/lib/esm/options.d.ts90
1 files changed, 90 insertions, 0 deletions
diff --git a/includes/external/addressbook/node_modules/cheerio/lib/esm/options.d.ts b/includes/external/addressbook/node_modules/cheerio/lib/esm/options.d.ts
new file mode 100644
index 0000000..1e619b0
--- /dev/null
+++ b/includes/external/addressbook/node_modules/cheerio/lib/esm/options.d.ts
@@ -0,0 +1,90 @@
+/// <reference types="node" />
+import type { DomHandlerOptions } from 'domhandler';
+import type { ParserOptions } from 'htmlparser2';
+import type { Options as SelectOptions } from 'cheerio-select';
+/**
+ * Options accepted by htmlparser2, the default parser for XML.
+ *
+ * @see https://github.com/fb55/htmlparser2/wiki/Parser-options
+ */
+export interface HTMLParser2Options extends DomHandlerOptions, ParserOptions {
+}
+/** Options for parse5, the default parser for HTML. */
+export interface Parse5Options {
+ /** Disable scripting in parse5, so noscript tags would be parsed. */
+ scriptingEnabled?: boolean;
+ /** Enable location support for parse5. */
+ sourceCodeLocationInfo?: boolean;
+}
+/**
+ * Options accepted by Cheerio.
+ *
+ * Please note that parser-specific options are _only recognized_ if the
+ * relevant parser is used.
+ */
+export interface CheerioOptions extends HTMLParser2Options, Parse5Options {
+ /** Recommended way of configuring htmlparser2 when wanting to parse XML. */
+ xml?: HTMLParser2Options | boolean;
+ /** The base URI for the document. Used for the `href` and `src` props. */
+ baseURI?: string | URL;
+ /**
+ * Is the document in quirks mode?
+ *
+ * This will lead to `.className` and `#id` being case-insensitive.
+ *
+ * @default false
+ */
+ quirksMode?: SelectOptions['quirksMode'];
+ /**
+ * Extension point for pseudo-classes.
+ *
+ * Maps from names to either strings of functions.
+ *
+ * - A string value is a selector that the element must match to be selected.
+ * - A function is called with the element as its first argument, and optional
+ * parameters second. If it returns true, the element is selected.
+ *
+ * @example
+ *
+ * ```js
+ * const $ = cheerio.load(
+ * '<div class="foo"></div><div data-bar="boo"></div>',
+ * {
+ * pseudos: {
+ * // `:foo` is an alias for `div.foo`
+ * foo: 'div.foo',
+ * // `:bar(val)` is equivalent to `[data-bar=val s]`
+ * bar: (el, val) => el.attribs['data-bar'] === val,
+ * },
+ * }
+ * );
+ *
+ * $(':foo').length; // 1
+ * $('div:bar(boo)').length; // 1
+ * $('div:bar(baz)').length; // 0
+ * ```
+ */
+ pseudos?: SelectOptions['pseudos'];
+}
+/** Internal options for Cheerio. */
+export interface InternalOptions extends Omit<CheerioOptions, 'xml'> {
+ /**
+ * Whether to use htmlparser2.
+ *
+ * This is set to true if `xml` is set to true.
+ */
+ _useHtmlParser2?: boolean;
+}
+declare const defaultOpts: CheerioOptions;
+/** Cheerio default options. */
+export default defaultOpts;
+/**
+ * Flatten the options for Cheerio.
+ *
+ * This will set `_useHtmlParser2` to true if `xml` is set to true.
+ *
+ * @param options - The options to flatten.
+ * @returns The flattened options.
+ */
+export declare function flatten(options?: CheerioOptions | null): InternalOptions | undefined;
+//# sourceMappingURL=options.d.ts.map \ No newline at end of file