mirror of
https://github.com/Sevichecc/Urara-Blog.git
synced 2025-05-02 17:09:30 +08:00
17 lines
459 B
Text
17 lines
459 B
Text
/**
|
||
* @typedef Options
|
||
* @property {boolean} [includeImageAlt=true]
|
||
*/
|
||
/**
|
||
* Get the text content of a node.
|
||
* Prefer the node’s plain-text fields, otherwise serialize its children,
|
||
* and if the given value is an array, serialize the nodes in it.
|
||
*
|
||
* @param {unknown} node
|
||
* @param {Options} [options]
|
||
* @returns {string}
|
||
*/
|
||
export function toString(node: unknown, options?: Options): string
|
||
export type Options = {
|
||
includeImageAlt?: boolean
|
||
}
|