@@ -12,7 +12,7 @@ declare namespace hastUtilToHtml {
12
12
*
13
13
* @defaultValue 'html'
14
14
*/
15
- space : 'html' | 'svg'
15
+ space ? : 'html' | 'svg'
16
16
17
17
/**
18
18
* Configuration for `stringify-entities`.
@@ -21,9 +21,10 @@ declare namespace hastUtilToHtml {
21
21
*
22
22
* @defaultValue {}
23
23
*/
24
- entities : Partial <
25
- /* eslint-disable-next-line @typescript-eslint/ban-types */
26
- Omit < StringifyEntitiesOptions , 'escapeOnly' | 'attribute' | 'subset' >
24
+ /* eslint-disable-next-line @typescript-eslint/ban-types */
25
+ entities ?: Omit <
26
+ StringifyEntitiesOptions ,
27
+ 'escapeOnly' | 'attribute' | 'subset'
27
28
>
28
29
29
30
/**
@@ -33,29 +34,29 @@ declare namespace hastUtilToHtml {
33
34
*
34
35
* @defaultValue `require('html-void-elements')`
35
36
*/
36
- voids : string [ ]
37
+ voids ? : string [ ]
37
38
38
39
/**
39
40
* Use a `<!DOCTYPE…` instead of `<!doctype…`.
40
41
* Useless except for XHTML.
41
42
*
42
43
* @defaultValue false
43
44
*/
44
- upperDoctype : boolean
45
+ upperDoctype ? : boolean
45
46
46
47
/**
47
48
* Preferred quote to use.
48
49
*
49
50
* @defaultValue '"'
50
51
*/
51
- quote : '"' | "'"
52
+ quote ? : '"' | "'"
52
53
53
54
/**
54
55
* Use the other quote if that results in less bytes.
55
56
*
56
57
* @defaultValue false
57
58
*/
58
- quoteSmart : boolean
59
+ quoteSmart ? : boolean
59
60
60
61
/**
61
62
* Leave attributes unquoted if that results in less bytes.
@@ -64,7 +65,7 @@ declare namespace hastUtilToHtml {
64
65
*
65
66
* @defaultValue false
66
67
*/
67
- preferUnquoted : boolean
68
+ preferUnquoted ? : boolean
68
69
69
70
/**
70
71
* Omit optional opening and closing tags.
@@ -75,7 +76,7 @@ declare namespace hastUtilToHtml {
75
76
*
76
77
* @defaultValue false
77
78
*/
78
- omitOptionalTags : boolean
79
+ omitOptionalTags ? : boolean
79
80
80
81
/**
81
82
* Collapse empty attributes: `class=""` is stringified as `class` instead.
@@ -85,7 +86,7 @@ declare namespace hastUtilToHtml {
85
86
*
86
87
* @defaultValue false
87
88
*/
88
- collapseEmptyAttributes : boolean
89
+ collapseEmptyAttributes ? : boolean
89
90
90
91
/**
91
92
* Close self-closing nodes with an extra slash (`/`): `<img />` instead of `<img>`.
@@ -95,7 +96,7 @@ declare namespace hastUtilToHtml {
95
96
*
96
97
* @defaultValue false
97
98
*/
98
- closeSelfClosing : boolean
99
+ closeSelfClosing ? : boolean
99
100
100
101
/**
101
102
* Close SVG elements without any content with slash (`/`) on the opening tag instead of an end tag: `<circle />` instead of `<circle></circle>`.
@@ -105,22 +106,22 @@ declare namespace hastUtilToHtml {
105
106
*
106
107
* @defaultValue false
107
108
*/
108
- closeEmptyElements : boolean
109
+ closeEmptyElements ? : boolean
109
110
110
111
/**
111
112
* Do not use an extra space when closing self-closing elements: `<img/>` instead of `<img />`.
112
113
* **Note**: Only used if `closeSelfClosing: true` or `closeEmptyElements: true`.
113
114
*
114
115
* @defaultValue false
115
116
*/
116
- tightSelfClosing : boolean
117
+ tightSelfClosing ? : boolean
117
118
118
119
/**
119
120
* Join known comma-separated attribute values with just a comma (`,`), instead of padding them on the right as well (`,·`, where `·` represents a space).
120
121
*
121
122
* @defaultValue false
122
123
*/
123
- tightCommaSeparatedLists : boolean
124
+ tightCommaSeparatedLists ? : boolean
124
125
125
126
/**
126
127
* Join attributes together, without white-space, if possible: `class="a b" title="c d"` is stringified as `class="a b"title="c d"` instead to save bytes.
@@ -130,15 +131,15 @@ declare namespace hastUtilToHtml {
130
131
*
131
132
* @defaultValue false
132
133
*/
133
- tightAttributes : boolean
134
+ tightAttributes ? : boolean
134
135
135
136
/**
136
137
* Drop unneeded spaces in doctypes: `<!doctypehtml>` instead of `<!doctype html>` to save bytes.
137
138
* **Note**: creates invalid (but working) markup.
138
139
*
139
140
* @defaultValue false
140
141
*/
141
- tightDoctype : boolean
142
+ tightDoctype ? : boolean
142
143
143
144
/**
144
145
* Do not encode characters which cause parse errors (even though they work), to save bytes.
@@ -148,15 +149,15 @@ declare namespace hastUtilToHtml {
148
149
*
149
150
* @defaultValue false
150
151
*/
151
- allowParseErrors : boolean
152
+ allowParseErrors ? : boolean
152
153
153
154
/**
154
155
* Do not encode some characters which cause XSS vulnerabilities in older browsers.
155
156
* **Note**: Only set this if you completely trust the content.
156
157
*
157
158
* @defaultValue false
158
159
*/
159
- allowDangerousCharacters : boolean
160
+ allowDangerousCharacters ? : boolean
160
161
161
162
/**
162
163
* Allow `raw` nodes and insert them as raw HTML.
@@ -165,7 +166,7 @@ declare namespace hastUtilToHtml {
165
166
*
166
167
* @defaultValue false
167
168
*/
168
- allowDangerousHtml : boolean
169
+ allowDangerousHtml ? : boolean
169
170
}
170
171
}
171
172
@@ -177,7 +178,7 @@ declare namespace hastUtilToHtml {
177
178
*/
178
179
declare function hastUtilToHtml (
179
180
tree : Node | Node [ ] ,
180
- options ?: Partial < hastUtilToHtml . HastUtilToHtmlOptions >
181
+ options ?: hastUtilToHtml . HastUtilToHtmlOptions
181
182
) : string
182
183
183
184
export = hastUtilToHtml
0 commit comments