File size: 818 Bytes
bc20498
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/**
 * Get the text content of a node or list of nodes.
 *
 * Prefers the node’s plain-text fields, otherwise serializes its children,
 * and if the given value is an array, serialize the nodes in it.
 *
 * @param {unknown} value
 *   Thing to serialize, typically `Node`.
 * @param {Options | null | undefined} [options]
 *   Configuration (optional).
 * @returns {string}
 *   Serialized `value`.
 */
export function toString(
  value: unknown,
  options?: Options | null | undefined
): string
export type Node = import('mdast').Root | import('mdast').Content
/**
 * Configuration (optional).
 */
export type Options = {
  /**
   * Whether to use `alt` for `image`s.
   */
  includeImageAlt?: boolean | null | undefined
  /**
   * Whether to use `value` of HTML.
   */
  includeHtml?: boolean | null | undefined
}