|
137 | 137 | * An entry on some character which is unsafe in certain contexts.
|
138 | 138 | * @property {string} character
|
139 | 139 | * The single character.
|
140 |
| - * @property {string | Array<string> | undefined} [inConstruct] |
| 140 | + * @property {string | Array<string> | null | undefined} [inConstruct] |
141 | 141 | * Constructs where this is bad.
|
142 |
| - * @property {string | Array<string> | undefined} [notInConstruct] |
| 142 | + * @property {string | Array<string> | null | undefined} [notInConstruct] |
143 | 143 | * Constructs where this is fine.
|
144 |
| - * @property {string | undefined} [after] |
| 144 | + * @property {string | null | undefined} [after] |
145 | 145 | * Conditional character before.
|
146 |
| - * @property {string | undefined} [before] |
| 146 | + * @property {string | null | undefined} [before] |
147 | 147 | * Conditional character after (can’t be used together with `atBreak`).
|
148 |
| - * @property {boolean | undefined} [atBreak] |
| 148 | + * @property {boolean | null | undefined} [atBreak] |
149 | 149 | * Conditionally, at a break (can’t be used together with `before`).
|
150 |
| - * @property {RegExp | undefined} [_compiled] |
| 150 | + * @property {RegExp | null | undefined} [_compiled] |
151 | 151 | * The unsafe pattern (this whole object) compiled as a regex.
|
152 | 152 | *
|
153 | 153 | * This is internal and must not be defined.
|
|
156 | 156 | /**
|
157 | 157 | * @typedef Options
|
158 | 158 | * Configuration (optional).
|
159 |
| - * @property {'-' | '*' | '+' | undefined} [bullet='*'] |
| 159 | + * @property {'-' | '*' | '+' | null | undefined} [bullet='*'] |
160 | 160 | * Marker to use for bullets of items in unordered lists.
|
161 |
| - * @property {'-' | '*' | '+' | undefined} [bulletOther] |
| 161 | + * @property {'-' | '*' | '+' | null | undefined} [bulletOther] |
162 | 162 | * Marker to use in certain cases where the primary bullet doesn’t work.
|
163 | 163 | *
|
164 | 164 | * There are three cases where the primary bullet can’t be used:
|
|
181 | 181 | * To solve for both, we instead inject an empty comment between the two
|
182 | 182 | * lists: `* a\n<!---->\n* b`, but if `bulletOther` is given explicitly,
|
183 | 183 | * it will be used instead
|
184 |
| - * @property {'.' | ')' | undefined} [bulletOrdered='.'] |
| 184 | + * @property {'.' | ')' | null | undefined} [bulletOrdered='.'] |
185 | 185 | * Marker to use for bullets of items in ordered lists.
|
186 |
| - * @property {'.' | ')' | undefined} [bulletOrderedOther] |
| 186 | + * @property {'.' | ')' | null | undefined} [bulletOrderedOther] |
187 | 187 | * Marker to use in certain cases where the primary bullet for ordered items
|
188 | 188 | * doesn’t work.
|
189 | 189 | *
|
|
195 | 195 | * To solve for both, we instead inject an empty comment between the two
|
196 | 196 | * lists: `1. a\n<!---->\n1. b`, but if `bulletOrderedOther` is given
|
197 | 197 | * explicitly, it will be used instead
|
198 |
| - * @property {boolean | undefined} [closeAtx=false] |
| 198 | + * @property {boolean | null | undefined} [closeAtx=false] |
199 | 199 | * Whether to add the same number of number signs (`#`) at the end of an ATX
|
200 | 200 | * heading as the opening sequence.
|
201 |
| - * @property {'_' | '*' | undefined} [emphasis='*'] |
| 201 | + * @property {'_' | '*' | null | undefined} [emphasis='*'] |
202 | 202 | * Marker to use for emphasis.
|
203 |
| - * @property {'~' | '`' | undefined} [fence='`'] |
| 203 | + * @property {'~' | '`' | null | undefined} [fence='`'] |
204 | 204 | * Marker to use for fenced code.
|
205 |
| - * @property {boolean | undefined} [fences=false] |
| 205 | + * @property {boolean | null | undefined} [fences=false] |
206 | 206 | * Whether to use fenced code always.
|
207 | 207 | *
|
208 | 208 | * The default is to use fenced code if there is a language defined, if the
|
209 | 209 | * code is empty, or if it starts or ends in blank lines.
|
210 |
| - * @property {boolean | undefined} [incrementListMarker=true] |
| 210 | + * @property {boolean | null | undefined} [incrementListMarker=true] |
211 | 211 | * Whether to increment the counter of ordered lists items.
|
212 |
| - * @property {'tab' | 'one' | 'mixed' | undefined} [listItemIndent='tab'] |
| 212 | + * @property {'tab' | 'one' | 'mixed' | null | undefined} [listItemIndent='tab'] |
213 | 213 | * How to indent the content of list items.
|
214 | 214 | *
|
215 | 215 | * Either with the size of the bullet plus one space (when `'one'`), a tab
|
216 | 216 | * stop (`'tab'`), or depending on the item and its parent list (`'mixed'`,
|
217 | 217 | * uses `'one'` if the item and list are tight and `'tab'` otherwise).
|
218 |
| - * @property {'"' | "'" | undefined} [quote='"'] |
| 218 | + * @property {'"' | "'" | null | undefined} [quote='"'] |
219 | 219 | * Marker to use for titles.
|
220 |
| - * @property {boolean | undefined} [resourceLink=false] |
| 220 | + * @property {boolean | null | undefined} [resourceLink=false] |
221 | 221 | * Whether to always use resource links.
|
222 | 222 | *
|
223 | 223 | * The default is to use autolinks (`<https://example.com>`) when possible
|
224 | 224 | * and resource links (`[text](url)`) otherwise.
|
225 |
| - * @property {'-' | '_' | '*' | undefined} [rule='*'] |
| 225 | + * @property {'-' | '_' | '*' | null | undefined} [rule='*'] |
226 | 226 | * Marker to use for thematic breaks.
|
227 |
| - * @property {number | undefined} [ruleRepetition=3] |
| 227 | + * @property {number | null | undefined} [ruleRepetition=3] |
228 | 228 | * Number of markers to use for thematic breaks.
|
229 |
| - * @property {boolean | undefined} [ruleSpaces=false] |
| 229 | + * @property {boolean | null | undefined} [ruleSpaces=false] |
230 | 230 | * Whether to add spaces between markers in thematic breaks.
|
231 |
| - * @property {boolean | undefined} [setext=false] |
| 231 | + * @property {boolean | null | undefined} [setext=false] |
232 | 232 | * Whether to use setext headings when possible.
|
233 | 233 | *
|
234 | 234 | * The default is to always use ATX headings (`# heading`) instead of setext
|
235 | 235 | * headings (`heading\n=======`).
|
236 | 236 | * Setext headings can’t be used for empty headings or headings with a rank
|
237 | 237 | * of three or more.
|
238 |
| - * @property {'_' | '*' | undefined} [strong='*'] |
| 238 | + * @property {'_' | '*' | null | undefined} [strong='*'] |
239 | 239 | * Marker to use for strong.
|
240 |
| - * @property {boolean | undefined} [tightDefinitions=false] |
| 240 | + * @property {boolean | null | undefined} [tightDefinitions=false] |
241 | 241 | * Whether to join definitions without a blank line.
|
242 | 242 | *
|
243 | 243 | * The default is to add blank lines between any flow (“block”) construct.
|
|
250 | 250 | * }
|
251 | 251 | * }
|
252 | 252 | * ```
|
253 |
| - * @property {Handlers | undefined} [handlers={}] |
| 253 | + * @property {Handlers | null | undefined} [handlers={}] |
254 | 254 | * Object mapping node types to custom handlers.
|
255 | 255 | *
|
256 | 256 | * Useful for syntax extensions.
|
257 | 257 | * This option is a bit advanced.
|
258 | 258 | * It’s recommended to look at the code in `lib/handle/` in
|
259 | 259 | * `mdast-util-to-markdown` for examples.
|
260 |
| - * @property {Array<Join> | undefined} [join=[]] |
| 260 | + * @property {Array<Join> | null | undefined} [join=[]] |
261 | 261 | * List of functions used to determine what to place between two flow nodes.
|
262 |
| - * @property {Array<Unsafe> | undefined} [unsafe=[]] |
| 262 | + * @property {Array<Unsafe> | null | undefined} [unsafe=[]] |
263 | 263 | * List of extra patterns to escape.
|
264 | 264 | *
|
265 | 265 | * Useful for syntax extensions.
|
266 | 266 | * This option is quite advanced.
|
267 | 267 | * It’s recommended to look at the code in `lib/unsafe.js` in
|
268 | 268 | * `mdast-util-to-markdown` for examples.
|
269 |
| - * @property {Array<Options> | undefined} [extensions=[]] |
| 269 | + * @property {Array<Options> | null | undefined} [extensions=[]] |
270 | 270 | * List of extensions to include.
|
271 | 271 | *
|
272 | 272 | * Each `ToMarkdownExtension` is an object with the same interface as
|
|
0 commit comments