44 */
55
66/**
7- * @typedef {Literal & {type: 'raw'} } Raw
8- * To do: improved `Raw` type?
9- *
10- * @typedef {'"' | "'" } Quote
11- * XML quotes for attribute values.
12- *
137 * @typedef Options
148 * Configuration.
159 * @property {boolean | null | undefined } [allowDangerousXml=false]
16- * Allow `raw` nodes and insert them as raw XML.
10+ * Allow `raw` nodes and insert them as raw XML (default: `false`) .
1711 *
1812 * When `false`, `Raw` nodes are encoded.
1913 *
2014 * > ⚠️ **Danger**: only set this if you completely trust the content.
2115 * @property {boolean | null | undefined } [closeEmptyElements=false]
2216 * Close elements without any content with slash (`/`) on the opening tag
23- * instead of an end tag: `<circle />` instead of `<circle></circle>`.
17+ * instead of an end tag: `<circle />` instead of `<circle></circle>`
18+ * (default: `false`).
2419 *
2520 * See `tightClose` to control whether a space is used before the slash.
2621 * @property {Quote | null | undefined } [quote='"']
27- * Preferred quote to use.
22+ * Preferred quote to use (default: `'"'`) .
2823 * @property {boolean | null | undefined } [quoteSmart=false]
29- * Use the other quote if that results in less bytes.
24+ * Use the other quote if that results in less bytes (default: `false`) .
3025 * @property {boolean | null | undefined } [tightClose=false]
3126 * Do not use an extra space when closing self-closing elements: `<circle/>`
32- * instead of `<circle />`.
27+ * instead of `<circle />` (default: `false`) .
3328 *
3429 * > 👉 **Note**: only used if `closeEmptyElements: true`.
3530 *
31+ * @typedef {'"' | "'" } Quote
32+ * XML quotes for attribute values.
33+ *
34+ * @typedef {Literal & {type: 'raw'} } Raw
35+ * To do: improved `Raw` type?
36+ *
37+ *
3638 * @typedef State
3739 * Info passed around about the current state.
3840 * @property {Options } options
@@ -47,7 +49,7 @@ import {one} from './one.js'
4749 * @param {Array<Nodes> | Nodes } tree
4850 * xast node(s) to serialize.
4951 * @param {Options | null | undefined } [options]
50- * Configuration.
52+ * Configuration (optional) .
5153 * @returns {string }
5254 * Serialized XML.
5355 */
0 commit comments