public_library_map/node_modules/domutils/lib/stringify.d.ts

46 lines
1.6 KiB
TypeScript
Raw Normal View History

2022-09-03 17:12:22 +10:00
import { AnyNode } from "domhandler";
2021-11-24 19:46:47 +11:00
import { DomSerializerOptions } from "dom-serializer";
/**
2022-09-03 17:12:22 +10:00
* @category Stringify
* @deprecated Use the `dom-serializer` module directly.
2021-11-24 19:46:47 +11:00
* @param node Node to get the outer HTML of.
* @param options Options for serialization.
* @returns `node`'s outer HTML.
*/
2022-09-03 17:12:22 +10:00
export declare function getOuterHTML(node: AnyNode | ArrayLike<AnyNode>, options?: DomSerializerOptions): string;
2021-11-24 19:46:47 +11:00
/**
2022-09-03 17:12:22 +10:00
* @category Stringify
* @deprecated Use the `dom-serializer` module directly.
2021-11-24 19:46:47 +11:00
* @param node Node to get the inner HTML of.
* @param options Options for serialization.
* @returns `node`'s inner HTML.
*/
2022-09-03 17:12:22 +10:00
export declare function getInnerHTML(node: AnyNode, options?: DomSerializerOptions): string;
2021-11-24 19:46:47 +11:00
/**
* Get a node's inner text. Same as `textContent`, but inserts newlines for `<br>` tags.
*
2022-09-03 17:12:22 +10:00
* @category Stringify
2021-11-24 19:46:47 +11:00
* @deprecated Use `textContent` instead.
* @param node Node to get the inner text of.
* @returns `node`'s inner text.
*/
2022-09-03 17:12:22 +10:00
export declare function getText(node: AnyNode | AnyNode[]): string;
2021-11-24 19:46:47 +11:00
/**
* Get a node's text content.
*
2022-09-03 17:12:22 +10:00
* @category Stringify
2021-11-24 19:46:47 +11:00
* @param node Node to get the text content of.
* @returns `node`'s text content.
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent}
*/
2022-09-03 17:12:22 +10:00
export declare function textContent(node: AnyNode | AnyNode[]): string;
2021-11-24 19:46:47 +11:00
/**
* Get a node's inner text.
*
2022-09-03 17:12:22 +10:00
* @category Stringify
2021-11-24 19:46:47 +11:00
* @param node Node to get the inner text of.
* @returns `node`'s inner text.
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Node/innerText}
*/
2022-09-03 17:12:22 +10:00
export declare function innerText(node: AnyNode | AnyNode[]): string;
2021-11-24 19:46:47 +11:00
//# sourceMappingURL=stringify.d.ts.map