imprensa 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +51 -0
  3. package/default.css +239 -0
  4. package/dist/client-runtime-D7MhMWCo.d.mts +45 -0
  5. package/dist/components/doc.d.mts +2 -0
  6. package/dist/components/doc.mjs +2 -0
  7. package/dist/components/icons.d.mts +23 -0
  8. package/dist/components/icons.mjs +40 -0
  9. package/dist/components/index.d.mts +33 -0
  10. package/dist/components/index.mjs +253 -0
  11. package/dist/core/client-runtime.d.mts +2 -0
  12. package/dist/core/client-runtime.mjs +121 -0
  13. package/dist/core/prerender-core.d.mts +2 -0
  14. package/dist/core/prerender-core.mjs +2 -0
  15. package/dist/core/runtime.d.mts +3 -0
  16. package/dist/core/runtime.mjs +3 -0
  17. package/dist/core/shiki-build.d.mts +9 -0
  18. package/dist/core/shiki-build.mjs +34 -0
  19. package/dist/doc-pager-D-YhwEQN.d.mts +27 -0
  20. package/dist/doc-toolbar-DUQS2gnK.mjs +460 -0
  21. package/dist/docs/config.d.mts +13 -0
  22. package/dist/docs/config.mjs +10 -0
  23. package/dist/docs/landing-shiki.d.mts +7 -0
  24. package/dist/docs/landing-shiki.mjs +7 -0
  25. package/dist/docs/mdx.d.mts +79 -0
  26. package/dist/docs/mdx.mjs +293 -0
  27. package/dist/docs/rehype.d.mts +25 -0
  28. package/dist/docs/rehype.mjs +2 -0
  29. package/dist/frontmatter-DVneGjCO.mjs +16 -0
  30. package/dist/global-search-Dfv8DYN3.mjs +310 -0
  31. package/dist/index.d.mts +41 -0
  32. package/dist/index.mjs +668 -0
  33. package/dist/prerender-core-D4Li--RS.mjs +172 -0
  34. package/dist/prerender-core-DBi9ntWW.d.mts +48 -0
  35. package/dist/rehype-BWpGaBql.mjs +182 -0
  36. package/dist/search-store-DDGHRAKl.mjs +64 -0
  37. package/dist/shiki-gFey7C-z.d.mts +3289 -0
  38. package/dist/sidebar-layout-DsEhSkJS.mjs +43 -0
  39. package/dist/socials-BIszPk-A.d.mts +8 -0
  40. package/docs/architecture.md +26 -0
  41. package/docs/integration-notes.md +6 -0
  42. package/index.d.ts +49 -0
  43. package/package.json +128 -0
  44. package/tsconfig.json +28 -0
@@ -0,0 +1,3289 @@
1
+ //#region ../../node_modules/.bun/@types+unist@3.0.3/node_modules/@types/unist/index.d.ts
2
+ // ## Interfaces
3
+ /**
4
+ * Info associated with nodes by the ecosystem.
5
+ *
6
+ * This space is guaranteed to never be specified by unist or specifications
7
+ * implementing unist.
8
+ * But you can use it in utilities and plugins to store data.
9
+ *
10
+ * This type can be augmented to register custom data.
11
+ * For example:
12
+ *
13
+ * ```ts
14
+ * declare module 'unist' {
15
+ * interface Data {
16
+ * // `someNode.data.myId` is typed as `number | undefined`
17
+ * myId?: number | undefined
18
+ * }
19
+ * }
20
+ * ```
21
+ */
22
+ interface Data$3 {}
23
+ /**
24
+ * One place in a source file.
25
+ */
26
+ interface Point {
27
+ /**
28
+ * Line in a source file (1-indexed integer).
29
+ */
30
+ line: number;
31
+ /**
32
+ * Column in a source file (1-indexed integer).
33
+ */
34
+ column: number;
35
+ /**
36
+ * Character in a source file (0-indexed integer).
37
+ */
38
+ offset?: number | undefined;
39
+ }
40
+ /**
41
+ * Position of a node in a source document.
42
+ *
43
+ * A position is a range between two points.
44
+ */
45
+ interface Position {
46
+ /**
47
+ * Place of the first character of the parsed source region.
48
+ */
49
+ start: Point;
50
+ /**
51
+ * Place of the first character after the parsed source region.
52
+ */
53
+ end: Point;
54
+ }
55
+ /**
56
+ * Abstract unist node.
57
+ *
58
+ * The syntactic unit in unist syntax trees are called nodes.
59
+ *
60
+ * This interface is supposed to be extended.
61
+ * If you can use {@link Literal} or {@link Parent}, you should.
62
+ * But for example in markdown, a `thematicBreak` (`***`), is neither literal
63
+ * nor parent, but still a node.
64
+ */
65
+ interface Node$1 {
66
+ /**
67
+ * Node type.
68
+ */
69
+ type: string;
70
+ /**
71
+ * Info from the ecosystem.
72
+ */
73
+ data?: Data$3 | undefined;
74
+ /**
75
+ * Position of a node in a source document.
76
+ *
77
+ * Nodes that are generated (not in the original source document) must not
78
+ * have a position.
79
+ */
80
+ position?: Position | undefined;
81
+ }
82
+ //#endregion
83
+ //#region ../../node_modules/.bun/vfile-message@4.0.3/node_modules/vfile-message/lib/index.d.ts
84
+ /**
85
+ * Message.
86
+ */
87
+ declare class VFileMessage extends Error {
88
+ /**
89
+ * Create a message for `reason`.
90
+ *
91
+ * > 🪦 **Note**: also has obsolete signatures.
92
+ *
93
+ * @overload
94
+ * @param {string} reason
95
+ * @param {Options | null | undefined} [options]
96
+ * @returns
97
+ *
98
+ * @overload
99
+ * @param {string} reason
100
+ * @param {Node | NodeLike | null | undefined} parent
101
+ * @param {string | null | undefined} [origin]
102
+ * @returns
103
+ *
104
+ * @overload
105
+ * @param {string} reason
106
+ * @param {Point | Position | null | undefined} place
107
+ * @param {string | null | undefined} [origin]
108
+ * @returns
109
+ *
110
+ * @overload
111
+ * @param {string} reason
112
+ * @param {string | null | undefined} [origin]
113
+ * @returns
114
+ *
115
+ * @overload
116
+ * @param {Error | VFileMessage} cause
117
+ * @param {Node | NodeLike | null | undefined} parent
118
+ * @param {string | null | undefined} [origin]
119
+ * @returns
120
+ *
121
+ * @overload
122
+ * @param {Error | VFileMessage} cause
123
+ * @param {Point | Position | null | undefined} place
124
+ * @param {string | null | undefined} [origin]
125
+ * @returns
126
+ *
127
+ * @overload
128
+ * @param {Error | VFileMessage} cause
129
+ * @param {string | null | undefined} [origin]
130
+ * @returns
131
+ *
132
+ * @param {Error | VFileMessage | string} causeOrReason
133
+ * Reason for message, should use markdown.
134
+ * @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
135
+ * Configuration (optional).
136
+ * @param {string | null | undefined} [origin]
137
+ * Place in code where the message originates (example:
138
+ * `'my-package:my-rule'` or `'my-rule'`).
139
+ * @returns
140
+ * Instance of `VFileMessage`.
141
+ */
142
+ constructor(reason: string, options?: Options$2 | null | undefined);
143
+ /**
144
+ * Create a message for `reason`.
145
+ *
146
+ * > 🪦 **Note**: also has obsolete signatures.
147
+ *
148
+ * @overload
149
+ * @param {string} reason
150
+ * @param {Options | null | undefined} [options]
151
+ * @returns
152
+ *
153
+ * @overload
154
+ * @param {string} reason
155
+ * @param {Node | NodeLike | null | undefined} parent
156
+ * @param {string | null | undefined} [origin]
157
+ * @returns
158
+ *
159
+ * @overload
160
+ * @param {string} reason
161
+ * @param {Point | Position | null | undefined} place
162
+ * @param {string | null | undefined} [origin]
163
+ * @returns
164
+ *
165
+ * @overload
166
+ * @param {string} reason
167
+ * @param {string | null | undefined} [origin]
168
+ * @returns
169
+ *
170
+ * @overload
171
+ * @param {Error | VFileMessage} cause
172
+ * @param {Node | NodeLike | null | undefined} parent
173
+ * @param {string | null | undefined} [origin]
174
+ * @returns
175
+ *
176
+ * @overload
177
+ * @param {Error | VFileMessage} cause
178
+ * @param {Point | Position | null | undefined} place
179
+ * @param {string | null | undefined} [origin]
180
+ * @returns
181
+ *
182
+ * @overload
183
+ * @param {Error | VFileMessage} cause
184
+ * @param {string | null | undefined} [origin]
185
+ * @returns
186
+ *
187
+ * @param {Error | VFileMessage | string} causeOrReason
188
+ * Reason for message, should use markdown.
189
+ * @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
190
+ * Configuration (optional).
191
+ * @param {string | null | undefined} [origin]
192
+ * Place in code where the message originates (example:
193
+ * `'my-package:my-rule'` or `'my-rule'`).
194
+ * @returns
195
+ * Instance of `VFileMessage`.
196
+ */
197
+ constructor(reason: string, parent: Node$1 | NodeLike$1 | null | undefined, origin?: string | null | undefined);
198
+ /**
199
+ * Create a message for `reason`.
200
+ *
201
+ * > 🪦 **Note**: also has obsolete signatures.
202
+ *
203
+ * @overload
204
+ * @param {string} reason
205
+ * @param {Options | null | undefined} [options]
206
+ * @returns
207
+ *
208
+ * @overload
209
+ * @param {string} reason
210
+ * @param {Node | NodeLike | null | undefined} parent
211
+ * @param {string | null | undefined} [origin]
212
+ * @returns
213
+ *
214
+ * @overload
215
+ * @param {string} reason
216
+ * @param {Point | Position | null | undefined} place
217
+ * @param {string | null | undefined} [origin]
218
+ * @returns
219
+ *
220
+ * @overload
221
+ * @param {string} reason
222
+ * @param {string | null | undefined} [origin]
223
+ * @returns
224
+ *
225
+ * @overload
226
+ * @param {Error | VFileMessage} cause
227
+ * @param {Node | NodeLike | null | undefined} parent
228
+ * @param {string | null | undefined} [origin]
229
+ * @returns
230
+ *
231
+ * @overload
232
+ * @param {Error | VFileMessage} cause
233
+ * @param {Point | Position | null | undefined} place
234
+ * @param {string | null | undefined} [origin]
235
+ * @returns
236
+ *
237
+ * @overload
238
+ * @param {Error | VFileMessage} cause
239
+ * @param {string | null | undefined} [origin]
240
+ * @returns
241
+ *
242
+ * @param {Error | VFileMessage | string} causeOrReason
243
+ * Reason for message, should use markdown.
244
+ * @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
245
+ * Configuration (optional).
246
+ * @param {string | null | undefined} [origin]
247
+ * Place in code where the message originates (example:
248
+ * `'my-package:my-rule'` or `'my-rule'`).
249
+ * @returns
250
+ * Instance of `VFileMessage`.
251
+ */
252
+ constructor(reason: string, place: Point | Position | null | undefined, origin?: string | null | undefined);
253
+ /**
254
+ * Create a message for `reason`.
255
+ *
256
+ * > 🪦 **Note**: also has obsolete signatures.
257
+ *
258
+ * @overload
259
+ * @param {string} reason
260
+ * @param {Options | null | undefined} [options]
261
+ * @returns
262
+ *
263
+ * @overload
264
+ * @param {string} reason
265
+ * @param {Node | NodeLike | null | undefined} parent
266
+ * @param {string | null | undefined} [origin]
267
+ * @returns
268
+ *
269
+ * @overload
270
+ * @param {string} reason
271
+ * @param {Point | Position | null | undefined} place
272
+ * @param {string | null | undefined} [origin]
273
+ * @returns
274
+ *
275
+ * @overload
276
+ * @param {string} reason
277
+ * @param {string | null | undefined} [origin]
278
+ * @returns
279
+ *
280
+ * @overload
281
+ * @param {Error | VFileMessage} cause
282
+ * @param {Node | NodeLike | null | undefined} parent
283
+ * @param {string | null | undefined} [origin]
284
+ * @returns
285
+ *
286
+ * @overload
287
+ * @param {Error | VFileMessage} cause
288
+ * @param {Point | Position | null | undefined} place
289
+ * @param {string | null | undefined} [origin]
290
+ * @returns
291
+ *
292
+ * @overload
293
+ * @param {Error | VFileMessage} cause
294
+ * @param {string | null | undefined} [origin]
295
+ * @returns
296
+ *
297
+ * @param {Error | VFileMessage | string} causeOrReason
298
+ * Reason for message, should use markdown.
299
+ * @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
300
+ * Configuration (optional).
301
+ * @param {string | null | undefined} [origin]
302
+ * Place in code where the message originates (example:
303
+ * `'my-package:my-rule'` or `'my-rule'`).
304
+ * @returns
305
+ * Instance of `VFileMessage`.
306
+ */
307
+ constructor(reason: string, origin?: string | null | undefined);
308
+ /**
309
+ * Create a message for `reason`.
310
+ *
311
+ * > 🪦 **Note**: also has obsolete signatures.
312
+ *
313
+ * @overload
314
+ * @param {string} reason
315
+ * @param {Options | null | undefined} [options]
316
+ * @returns
317
+ *
318
+ * @overload
319
+ * @param {string} reason
320
+ * @param {Node | NodeLike | null | undefined} parent
321
+ * @param {string | null | undefined} [origin]
322
+ * @returns
323
+ *
324
+ * @overload
325
+ * @param {string} reason
326
+ * @param {Point | Position | null | undefined} place
327
+ * @param {string | null | undefined} [origin]
328
+ * @returns
329
+ *
330
+ * @overload
331
+ * @param {string} reason
332
+ * @param {string | null | undefined} [origin]
333
+ * @returns
334
+ *
335
+ * @overload
336
+ * @param {Error | VFileMessage} cause
337
+ * @param {Node | NodeLike | null | undefined} parent
338
+ * @param {string | null | undefined} [origin]
339
+ * @returns
340
+ *
341
+ * @overload
342
+ * @param {Error | VFileMessage} cause
343
+ * @param {Point | Position | null | undefined} place
344
+ * @param {string | null | undefined} [origin]
345
+ * @returns
346
+ *
347
+ * @overload
348
+ * @param {Error | VFileMessage} cause
349
+ * @param {string | null | undefined} [origin]
350
+ * @returns
351
+ *
352
+ * @param {Error | VFileMessage | string} causeOrReason
353
+ * Reason for message, should use markdown.
354
+ * @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
355
+ * Configuration (optional).
356
+ * @param {string | null | undefined} [origin]
357
+ * Place in code where the message originates (example:
358
+ * `'my-package:my-rule'` or `'my-rule'`).
359
+ * @returns
360
+ * Instance of `VFileMessage`.
361
+ */
362
+ constructor(cause: Error | VFileMessage, parent: Node$1 | NodeLike$1 | null | undefined, origin?: string | null | undefined);
363
+ /**
364
+ * Create a message for `reason`.
365
+ *
366
+ * > 🪦 **Note**: also has obsolete signatures.
367
+ *
368
+ * @overload
369
+ * @param {string} reason
370
+ * @param {Options | null | undefined} [options]
371
+ * @returns
372
+ *
373
+ * @overload
374
+ * @param {string} reason
375
+ * @param {Node | NodeLike | null | undefined} parent
376
+ * @param {string | null | undefined} [origin]
377
+ * @returns
378
+ *
379
+ * @overload
380
+ * @param {string} reason
381
+ * @param {Point | Position | null | undefined} place
382
+ * @param {string | null | undefined} [origin]
383
+ * @returns
384
+ *
385
+ * @overload
386
+ * @param {string} reason
387
+ * @param {string | null | undefined} [origin]
388
+ * @returns
389
+ *
390
+ * @overload
391
+ * @param {Error | VFileMessage} cause
392
+ * @param {Node | NodeLike | null | undefined} parent
393
+ * @param {string | null | undefined} [origin]
394
+ * @returns
395
+ *
396
+ * @overload
397
+ * @param {Error | VFileMessage} cause
398
+ * @param {Point | Position | null | undefined} place
399
+ * @param {string | null | undefined} [origin]
400
+ * @returns
401
+ *
402
+ * @overload
403
+ * @param {Error | VFileMessage} cause
404
+ * @param {string | null | undefined} [origin]
405
+ * @returns
406
+ *
407
+ * @param {Error | VFileMessage | string} causeOrReason
408
+ * Reason for message, should use markdown.
409
+ * @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
410
+ * Configuration (optional).
411
+ * @param {string | null | undefined} [origin]
412
+ * Place in code where the message originates (example:
413
+ * `'my-package:my-rule'` or `'my-rule'`).
414
+ * @returns
415
+ * Instance of `VFileMessage`.
416
+ */
417
+ constructor(cause: Error | VFileMessage, place: Point | Position | null | undefined, origin?: string | null | undefined);
418
+ /**
419
+ * Create a message for `reason`.
420
+ *
421
+ * > 🪦 **Note**: also has obsolete signatures.
422
+ *
423
+ * @overload
424
+ * @param {string} reason
425
+ * @param {Options | null | undefined} [options]
426
+ * @returns
427
+ *
428
+ * @overload
429
+ * @param {string} reason
430
+ * @param {Node | NodeLike | null | undefined} parent
431
+ * @param {string | null | undefined} [origin]
432
+ * @returns
433
+ *
434
+ * @overload
435
+ * @param {string} reason
436
+ * @param {Point | Position | null | undefined} place
437
+ * @param {string | null | undefined} [origin]
438
+ * @returns
439
+ *
440
+ * @overload
441
+ * @param {string} reason
442
+ * @param {string | null | undefined} [origin]
443
+ * @returns
444
+ *
445
+ * @overload
446
+ * @param {Error | VFileMessage} cause
447
+ * @param {Node | NodeLike | null | undefined} parent
448
+ * @param {string | null | undefined} [origin]
449
+ * @returns
450
+ *
451
+ * @overload
452
+ * @param {Error | VFileMessage} cause
453
+ * @param {Point | Position | null | undefined} place
454
+ * @param {string | null | undefined} [origin]
455
+ * @returns
456
+ *
457
+ * @overload
458
+ * @param {Error | VFileMessage} cause
459
+ * @param {string | null | undefined} [origin]
460
+ * @returns
461
+ *
462
+ * @param {Error | VFileMessage | string} causeOrReason
463
+ * Reason for message, should use markdown.
464
+ * @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
465
+ * Configuration (optional).
466
+ * @param {string | null | undefined} [origin]
467
+ * Place in code where the message originates (example:
468
+ * `'my-package:my-rule'` or `'my-rule'`).
469
+ * @returns
470
+ * Instance of `VFileMessage`.
471
+ */
472
+ constructor(cause: Error | VFileMessage, origin?: string | null | undefined);
473
+ /**
474
+ * Stack of ancestor nodes surrounding the message.
475
+ *
476
+ * @type {Array<Node> | undefined}
477
+ */
478
+ ancestors: Array<Node$1> | undefined;
479
+ /**
480
+ * Starting column of message.
481
+ *
482
+ * @type {number | undefined}
483
+ */
484
+ column: number | undefined;
485
+ /**
486
+ * State of problem.
487
+ *
488
+ * * `true` — error, file not usable
489
+ * * `false` — warning, change may be needed
490
+ * * `undefined` — change likely not needed
491
+ *
492
+ * @type {boolean | null | undefined}
493
+ */
494
+ fatal: boolean | null | undefined;
495
+ /**
496
+ * Path of a file (used throughout the `VFile` ecosystem).
497
+ *
498
+ * @type {string | undefined}
499
+ */
500
+ file: string | undefined;
501
+ /**
502
+ * Starting line of error.
503
+ *
504
+ * @type {number | undefined}
505
+ */
506
+ line: number | undefined;
507
+ /**
508
+ * Place of message.
509
+ *
510
+ * @type {Point | Position | undefined}
511
+ */
512
+ place: Point | Position | undefined;
513
+ /**
514
+ * Reason for message, should use markdown.
515
+ *
516
+ * @type {string}
517
+ */
518
+ reason: string;
519
+ /**
520
+ * Category of message (example: `'my-rule'`).
521
+ *
522
+ * @type {string | undefined}
523
+ */
524
+ ruleId: string | undefined;
525
+ /**
526
+ * Namespace of message (example: `'my-package'`).
527
+ *
528
+ * @type {string | undefined}
529
+ */
530
+ source: string | undefined;
531
+ /**
532
+ * Specify the source value that’s being reported, which is deemed
533
+ * incorrect.
534
+ *
535
+ * @type {string | undefined}
536
+ */
537
+ actual: string | undefined;
538
+ /**
539
+ * Suggest acceptable values that can be used instead of `actual`.
540
+ *
541
+ * @type {Array<string> | undefined}
542
+ */
543
+ expected: Array<string> | undefined;
544
+ /**
545
+ * Long form description of the message (you should use markdown).
546
+ *
547
+ * @type {string | undefined}
548
+ */
549
+ note: string | undefined;
550
+ /**
551
+ * Link to docs for the message.
552
+ *
553
+ * > 👉 **Note**: this must be an absolute URL that can be passed as `x`
554
+ * > to `new URL(x)`.
555
+ *
556
+ * @type {string | undefined}
557
+ */
558
+ url: string | undefined;
559
+ }
560
+ type NodeLike$1 = object & {
561
+ type: string;
562
+ position?: Position | undefined;
563
+ };
564
+ /**
565
+ * Configuration.
566
+ */
567
+ type Options$2 = {
568
+ /**
569
+ * Stack of (inclusive) ancestor nodes surrounding the message (optional).
570
+ */
571
+ ancestors?: Array<Node$1> | null | undefined;
572
+ /**
573
+ * Original error cause of the message (optional).
574
+ */
575
+ cause?: Error | null | undefined;
576
+ /**
577
+ * Place of message (optional).
578
+ */
579
+ place?: Point | Position | null | undefined;
580
+ /**
581
+ * Category of message (optional, example: `'my-rule'`).
582
+ */
583
+ ruleId?: string | null | undefined;
584
+ /**
585
+ * Namespace of who sent the message (optional, example: `'my-package'`).
586
+ */
587
+ source?: string | null | undefined;
588
+ };
589
+ //#endregion
590
+ //#region ../../node_modules/.bun/vfile-message@4.0.3/node_modules/vfile-message/index.d.ts
591
+ type Options$1 = Options$2;
592
+ //#endregion
593
+ //#region ../../node_modules/.bun/vfile@6.0.3/node_modules/vfile/lib/index.d.ts
594
+ declare class VFile {
595
+ /**
596
+ * Create a new virtual file.
597
+ *
598
+ * `options` is treated as:
599
+ *
600
+ * * `string` or `Uint8Array` — `{value: options}`
601
+ * * `URL` — `{path: options}`
602
+ * * `VFile` — shallow copies its data over to the new file
603
+ * * `object` — all fields are shallow copied over to the new file
604
+ *
605
+ * Path related fields are set in the following order (least specific to
606
+ * most specific): `history`, `path`, `basename`, `stem`, `extname`,
607
+ * `dirname`.
608
+ *
609
+ * You cannot set `dirname` or `extname` without setting either `history`,
610
+ * `path`, `basename`, or `stem` too.
611
+ *
612
+ * @param {Compatible | null | undefined} [value]
613
+ * File value.
614
+ * @returns
615
+ * New instance.
616
+ */
617
+ constructor(value?: Compatible$1 | null | undefined);
618
+ /**
619
+ * Base of `path` (default: `process.cwd()` or `'/'` in browsers).
620
+ *
621
+ * @type {string}
622
+ */
623
+ cwd: string;
624
+ /**
625
+ * Place to store custom info (default: `{}`).
626
+ *
627
+ * It’s OK to store custom data directly on the file but moving it to
628
+ * `data` is recommended.
629
+ *
630
+ * @type {Data}
631
+ */
632
+ data: Data$2;
633
+ /**
634
+ * List of file paths the file moved between.
635
+ *
636
+ * The first is the original path and the last is the current path.
637
+ *
638
+ * @type {Array<string>}
639
+ */
640
+ history: Array<string>;
641
+ /**
642
+ * List of messages associated with the file.
643
+ *
644
+ * @type {Array<VFileMessage>}
645
+ */
646
+ messages: Array<VFileMessage>;
647
+ /**
648
+ * Raw value.
649
+ *
650
+ * @type {Value}
651
+ */
652
+ value: Value$1;
653
+ /**
654
+ * Source map.
655
+ *
656
+ * This type is equivalent to the `RawSourceMap` type from the `source-map`
657
+ * module.
658
+ *
659
+ * @type {Map | null | undefined}
660
+ */
661
+ map: Map | null | undefined;
662
+ /**
663
+ * Custom, non-string, compiled, representation.
664
+ *
665
+ * This is used by unified to store non-string results.
666
+ * One example is when turning markdown into React nodes.
667
+ *
668
+ * @type {unknown}
669
+ */
670
+ result: unknown;
671
+ /**
672
+ * Whether a file was saved to disk.
673
+ *
674
+ * This is used by vfile reporters.
675
+ *
676
+ * @type {boolean}
677
+ */
678
+ stored: boolean;
679
+ /**
680
+ * Set basename (including extname) (`'index.min.js'`).
681
+ *
682
+ * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
683
+ * on windows).
684
+ * Cannot be nullified (use `file.path = file.dirname` instead).
685
+ *
686
+ * @param {string} basename
687
+ * Basename.
688
+ * @returns {undefined}
689
+ * Nothing.
690
+ */
691
+ set basename(basename: string);
692
+ /**
693
+ * Get the basename (including extname) (example: `'index.min.js'`).
694
+ *
695
+ * @returns {string | undefined}
696
+ * Basename.
697
+ */
698
+ get basename(): string | undefined;
699
+ /**
700
+ * Set the full path (example: `'~/index.min.js'`).
701
+ *
702
+ * Cannot be nullified.
703
+ * You can set a file URL (a `URL` object with a `file:` protocol) which will
704
+ * be turned into a path with `url.fileURLToPath`.
705
+ *
706
+ * @param {URL | string} path
707
+ * Path.
708
+ * @returns {undefined}
709
+ * Nothing.
710
+ */
711
+ set path(path: string | URL);
712
+ /**
713
+ * Get the full path (example: `'~/index.min.js'`).
714
+ *
715
+ * @returns {string}
716
+ * Path.
717
+ */
718
+ get path(): string;
719
+ /**
720
+ * Set the parent path (example: `'~'`).
721
+ *
722
+ * Cannot be set if there’s no `path` yet.
723
+ *
724
+ * @param {string | undefined} dirname
725
+ * Dirname.
726
+ * @returns {undefined}
727
+ * Nothing.
728
+ */
729
+ set dirname(dirname: string | undefined);
730
+ /**
731
+ * Get the parent path (example: `'~'`).
732
+ *
733
+ * @returns {string | undefined}
734
+ * Dirname.
735
+ */
736
+ get dirname(): string | undefined;
737
+ /**
738
+ * Set the extname (including dot) (example: `'.js'`).
739
+ *
740
+ * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
741
+ * on windows).
742
+ * Cannot be set if there’s no `path` yet.
743
+ *
744
+ * @param {string | undefined} extname
745
+ * Extname.
746
+ * @returns {undefined}
747
+ * Nothing.
748
+ */
749
+ set extname(extname: string | undefined);
750
+ /**
751
+ * Get the extname (including dot) (example: `'.js'`).
752
+ *
753
+ * @returns {string | undefined}
754
+ * Extname.
755
+ */
756
+ get extname(): string | undefined;
757
+ /**
758
+ * Set the stem (basename w/o extname) (example: `'index.min'`).
759
+ *
760
+ * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
761
+ * on windows).
762
+ * Cannot be nullified (use `file.path = file.dirname` instead).
763
+ *
764
+ * @param {string} stem
765
+ * Stem.
766
+ * @returns {undefined}
767
+ * Nothing.
768
+ */
769
+ set stem(stem: string);
770
+ /**
771
+ * Get the stem (basename w/o extname) (example: `'index.min'`).
772
+ *
773
+ * @returns {string | undefined}
774
+ * Stem.
775
+ */
776
+ get stem(): string | undefined;
777
+ /**
778
+ * Create a fatal message for `reason` associated with the file.
779
+ *
780
+ * The `fatal` field of the message is set to `true` (error; file not usable)
781
+ * and the `file` field is set to the current file path.
782
+ * The message is added to the `messages` field on `file`.
783
+ *
784
+ * > 🪦 **Note**: also has obsolete signatures.
785
+ *
786
+ * @overload
787
+ * @param {string} reason
788
+ * @param {MessageOptions | null | undefined} [options]
789
+ * @returns {never}
790
+ *
791
+ * @overload
792
+ * @param {string} reason
793
+ * @param {Node | NodeLike | null | undefined} parent
794
+ * @param {string | null | undefined} [origin]
795
+ * @returns {never}
796
+ *
797
+ * @overload
798
+ * @param {string} reason
799
+ * @param {Point | Position | null | undefined} place
800
+ * @param {string | null | undefined} [origin]
801
+ * @returns {never}
802
+ *
803
+ * @overload
804
+ * @param {string} reason
805
+ * @param {string | null | undefined} [origin]
806
+ * @returns {never}
807
+ *
808
+ * @overload
809
+ * @param {Error | VFileMessage} cause
810
+ * @param {Node | NodeLike | null | undefined} parent
811
+ * @param {string | null | undefined} [origin]
812
+ * @returns {never}
813
+ *
814
+ * @overload
815
+ * @param {Error | VFileMessage} cause
816
+ * @param {Point | Position | null | undefined} place
817
+ * @param {string | null | undefined} [origin]
818
+ * @returns {never}
819
+ *
820
+ * @overload
821
+ * @param {Error | VFileMessage} cause
822
+ * @param {string | null | undefined} [origin]
823
+ * @returns {never}
824
+ *
825
+ * @param {Error | VFileMessage | string} causeOrReason
826
+ * Reason for message, should use markdown.
827
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
828
+ * Configuration (optional).
829
+ * @param {string | null | undefined} [origin]
830
+ * Place in code where the message originates (example:
831
+ * `'my-package:my-rule'` or `'my-rule'`).
832
+ * @returns {never}
833
+ * Never.
834
+ * @throws {VFileMessage}
835
+ * Message.
836
+ */
837
+ fail(reason: string, options?: Options$1 | null | undefined): never;
838
+ /**
839
+ * Create a fatal message for `reason` associated with the file.
840
+ *
841
+ * The `fatal` field of the message is set to `true` (error; file not usable)
842
+ * and the `file` field is set to the current file path.
843
+ * The message is added to the `messages` field on `file`.
844
+ *
845
+ * > 🪦 **Note**: also has obsolete signatures.
846
+ *
847
+ * @overload
848
+ * @param {string} reason
849
+ * @param {MessageOptions | null | undefined} [options]
850
+ * @returns {never}
851
+ *
852
+ * @overload
853
+ * @param {string} reason
854
+ * @param {Node | NodeLike | null | undefined} parent
855
+ * @param {string | null | undefined} [origin]
856
+ * @returns {never}
857
+ *
858
+ * @overload
859
+ * @param {string} reason
860
+ * @param {Point | Position | null | undefined} place
861
+ * @param {string | null | undefined} [origin]
862
+ * @returns {never}
863
+ *
864
+ * @overload
865
+ * @param {string} reason
866
+ * @param {string | null | undefined} [origin]
867
+ * @returns {never}
868
+ *
869
+ * @overload
870
+ * @param {Error | VFileMessage} cause
871
+ * @param {Node | NodeLike | null | undefined} parent
872
+ * @param {string | null | undefined} [origin]
873
+ * @returns {never}
874
+ *
875
+ * @overload
876
+ * @param {Error | VFileMessage} cause
877
+ * @param {Point | Position | null | undefined} place
878
+ * @param {string | null | undefined} [origin]
879
+ * @returns {never}
880
+ *
881
+ * @overload
882
+ * @param {Error | VFileMessage} cause
883
+ * @param {string | null | undefined} [origin]
884
+ * @returns {never}
885
+ *
886
+ * @param {Error | VFileMessage | string} causeOrReason
887
+ * Reason for message, should use markdown.
888
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
889
+ * Configuration (optional).
890
+ * @param {string | null | undefined} [origin]
891
+ * Place in code where the message originates (example:
892
+ * `'my-package:my-rule'` or `'my-rule'`).
893
+ * @returns {never}
894
+ * Never.
895
+ * @throws {VFileMessage}
896
+ * Message.
897
+ */
898
+ fail(reason: string, parent: Node$1 | NodeLike | null | undefined, origin?: string | null | undefined): never;
899
+ /**
900
+ * Create a fatal message for `reason` associated with the file.
901
+ *
902
+ * The `fatal` field of the message is set to `true` (error; file not usable)
903
+ * and the `file` field is set to the current file path.
904
+ * The message is added to the `messages` field on `file`.
905
+ *
906
+ * > 🪦 **Note**: also has obsolete signatures.
907
+ *
908
+ * @overload
909
+ * @param {string} reason
910
+ * @param {MessageOptions | null | undefined} [options]
911
+ * @returns {never}
912
+ *
913
+ * @overload
914
+ * @param {string} reason
915
+ * @param {Node | NodeLike | null | undefined} parent
916
+ * @param {string | null | undefined} [origin]
917
+ * @returns {never}
918
+ *
919
+ * @overload
920
+ * @param {string} reason
921
+ * @param {Point | Position | null | undefined} place
922
+ * @param {string | null | undefined} [origin]
923
+ * @returns {never}
924
+ *
925
+ * @overload
926
+ * @param {string} reason
927
+ * @param {string | null | undefined} [origin]
928
+ * @returns {never}
929
+ *
930
+ * @overload
931
+ * @param {Error | VFileMessage} cause
932
+ * @param {Node | NodeLike | null | undefined} parent
933
+ * @param {string | null | undefined} [origin]
934
+ * @returns {never}
935
+ *
936
+ * @overload
937
+ * @param {Error | VFileMessage} cause
938
+ * @param {Point | Position | null | undefined} place
939
+ * @param {string | null | undefined} [origin]
940
+ * @returns {never}
941
+ *
942
+ * @overload
943
+ * @param {Error | VFileMessage} cause
944
+ * @param {string | null | undefined} [origin]
945
+ * @returns {never}
946
+ *
947
+ * @param {Error | VFileMessage | string} causeOrReason
948
+ * Reason for message, should use markdown.
949
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
950
+ * Configuration (optional).
951
+ * @param {string | null | undefined} [origin]
952
+ * Place in code where the message originates (example:
953
+ * `'my-package:my-rule'` or `'my-rule'`).
954
+ * @returns {never}
955
+ * Never.
956
+ * @throws {VFileMessage}
957
+ * Message.
958
+ */
959
+ fail(reason: string, place: Point | Position | null | undefined, origin?: string | null | undefined): never;
960
+ /**
961
+ * Create a fatal message for `reason` associated with the file.
962
+ *
963
+ * The `fatal` field of the message is set to `true` (error; file not usable)
964
+ * and the `file` field is set to the current file path.
965
+ * The message is added to the `messages` field on `file`.
966
+ *
967
+ * > 🪦 **Note**: also has obsolete signatures.
968
+ *
969
+ * @overload
970
+ * @param {string} reason
971
+ * @param {MessageOptions | null | undefined} [options]
972
+ * @returns {never}
973
+ *
974
+ * @overload
975
+ * @param {string} reason
976
+ * @param {Node | NodeLike | null | undefined} parent
977
+ * @param {string | null | undefined} [origin]
978
+ * @returns {never}
979
+ *
980
+ * @overload
981
+ * @param {string} reason
982
+ * @param {Point | Position | null | undefined} place
983
+ * @param {string | null | undefined} [origin]
984
+ * @returns {never}
985
+ *
986
+ * @overload
987
+ * @param {string} reason
988
+ * @param {string | null | undefined} [origin]
989
+ * @returns {never}
990
+ *
991
+ * @overload
992
+ * @param {Error | VFileMessage} cause
993
+ * @param {Node | NodeLike | null | undefined} parent
994
+ * @param {string | null | undefined} [origin]
995
+ * @returns {never}
996
+ *
997
+ * @overload
998
+ * @param {Error | VFileMessage} cause
999
+ * @param {Point | Position | null | undefined} place
1000
+ * @param {string | null | undefined} [origin]
1001
+ * @returns {never}
1002
+ *
1003
+ * @overload
1004
+ * @param {Error | VFileMessage} cause
1005
+ * @param {string | null | undefined} [origin]
1006
+ * @returns {never}
1007
+ *
1008
+ * @param {Error | VFileMessage | string} causeOrReason
1009
+ * Reason for message, should use markdown.
1010
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1011
+ * Configuration (optional).
1012
+ * @param {string | null | undefined} [origin]
1013
+ * Place in code where the message originates (example:
1014
+ * `'my-package:my-rule'` or `'my-rule'`).
1015
+ * @returns {never}
1016
+ * Never.
1017
+ * @throws {VFileMessage}
1018
+ * Message.
1019
+ */
1020
+ fail(reason: string, origin?: string | null | undefined): never;
1021
+ /**
1022
+ * Create a fatal message for `reason` associated with the file.
1023
+ *
1024
+ * The `fatal` field of the message is set to `true` (error; file not usable)
1025
+ * and the `file` field is set to the current file path.
1026
+ * The message is added to the `messages` field on `file`.
1027
+ *
1028
+ * > 🪦 **Note**: also has obsolete signatures.
1029
+ *
1030
+ * @overload
1031
+ * @param {string} reason
1032
+ * @param {MessageOptions | null | undefined} [options]
1033
+ * @returns {never}
1034
+ *
1035
+ * @overload
1036
+ * @param {string} reason
1037
+ * @param {Node | NodeLike | null | undefined} parent
1038
+ * @param {string | null | undefined} [origin]
1039
+ * @returns {never}
1040
+ *
1041
+ * @overload
1042
+ * @param {string} reason
1043
+ * @param {Point | Position | null | undefined} place
1044
+ * @param {string | null | undefined} [origin]
1045
+ * @returns {never}
1046
+ *
1047
+ * @overload
1048
+ * @param {string} reason
1049
+ * @param {string | null | undefined} [origin]
1050
+ * @returns {never}
1051
+ *
1052
+ * @overload
1053
+ * @param {Error | VFileMessage} cause
1054
+ * @param {Node | NodeLike | null | undefined} parent
1055
+ * @param {string | null | undefined} [origin]
1056
+ * @returns {never}
1057
+ *
1058
+ * @overload
1059
+ * @param {Error | VFileMessage} cause
1060
+ * @param {Point | Position | null | undefined} place
1061
+ * @param {string | null | undefined} [origin]
1062
+ * @returns {never}
1063
+ *
1064
+ * @overload
1065
+ * @param {Error | VFileMessage} cause
1066
+ * @param {string | null | undefined} [origin]
1067
+ * @returns {never}
1068
+ *
1069
+ * @param {Error | VFileMessage | string} causeOrReason
1070
+ * Reason for message, should use markdown.
1071
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1072
+ * Configuration (optional).
1073
+ * @param {string | null | undefined} [origin]
1074
+ * Place in code where the message originates (example:
1075
+ * `'my-package:my-rule'` or `'my-rule'`).
1076
+ * @returns {never}
1077
+ * Never.
1078
+ * @throws {VFileMessage}
1079
+ * Message.
1080
+ */
1081
+ fail(cause: Error | VFileMessage, parent: Node$1 | NodeLike | null | undefined, origin?: string | null | undefined): never;
1082
+ /**
1083
+ * Create a fatal message for `reason` associated with the file.
1084
+ *
1085
+ * The `fatal` field of the message is set to `true` (error; file not usable)
1086
+ * and the `file` field is set to the current file path.
1087
+ * The message is added to the `messages` field on `file`.
1088
+ *
1089
+ * > 🪦 **Note**: also has obsolete signatures.
1090
+ *
1091
+ * @overload
1092
+ * @param {string} reason
1093
+ * @param {MessageOptions | null | undefined} [options]
1094
+ * @returns {never}
1095
+ *
1096
+ * @overload
1097
+ * @param {string} reason
1098
+ * @param {Node | NodeLike | null | undefined} parent
1099
+ * @param {string | null | undefined} [origin]
1100
+ * @returns {never}
1101
+ *
1102
+ * @overload
1103
+ * @param {string} reason
1104
+ * @param {Point | Position | null | undefined} place
1105
+ * @param {string | null | undefined} [origin]
1106
+ * @returns {never}
1107
+ *
1108
+ * @overload
1109
+ * @param {string} reason
1110
+ * @param {string | null | undefined} [origin]
1111
+ * @returns {never}
1112
+ *
1113
+ * @overload
1114
+ * @param {Error | VFileMessage} cause
1115
+ * @param {Node | NodeLike | null | undefined} parent
1116
+ * @param {string | null | undefined} [origin]
1117
+ * @returns {never}
1118
+ *
1119
+ * @overload
1120
+ * @param {Error | VFileMessage} cause
1121
+ * @param {Point | Position | null | undefined} place
1122
+ * @param {string | null | undefined} [origin]
1123
+ * @returns {never}
1124
+ *
1125
+ * @overload
1126
+ * @param {Error | VFileMessage} cause
1127
+ * @param {string | null | undefined} [origin]
1128
+ * @returns {never}
1129
+ *
1130
+ * @param {Error | VFileMessage | string} causeOrReason
1131
+ * Reason for message, should use markdown.
1132
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1133
+ * Configuration (optional).
1134
+ * @param {string | null | undefined} [origin]
1135
+ * Place in code where the message originates (example:
1136
+ * `'my-package:my-rule'` or `'my-rule'`).
1137
+ * @returns {never}
1138
+ * Never.
1139
+ * @throws {VFileMessage}
1140
+ * Message.
1141
+ */
1142
+ fail(cause: Error | VFileMessage, place: Point | Position | null | undefined, origin?: string | null | undefined): never;
1143
+ /**
1144
+ * Create a fatal message for `reason` associated with the file.
1145
+ *
1146
+ * The `fatal` field of the message is set to `true` (error; file not usable)
1147
+ * and the `file` field is set to the current file path.
1148
+ * The message is added to the `messages` field on `file`.
1149
+ *
1150
+ * > 🪦 **Note**: also has obsolete signatures.
1151
+ *
1152
+ * @overload
1153
+ * @param {string} reason
1154
+ * @param {MessageOptions | null | undefined} [options]
1155
+ * @returns {never}
1156
+ *
1157
+ * @overload
1158
+ * @param {string} reason
1159
+ * @param {Node | NodeLike | null | undefined} parent
1160
+ * @param {string | null | undefined} [origin]
1161
+ * @returns {never}
1162
+ *
1163
+ * @overload
1164
+ * @param {string} reason
1165
+ * @param {Point | Position | null | undefined} place
1166
+ * @param {string | null | undefined} [origin]
1167
+ * @returns {never}
1168
+ *
1169
+ * @overload
1170
+ * @param {string} reason
1171
+ * @param {string | null | undefined} [origin]
1172
+ * @returns {never}
1173
+ *
1174
+ * @overload
1175
+ * @param {Error | VFileMessage} cause
1176
+ * @param {Node | NodeLike | null | undefined} parent
1177
+ * @param {string | null | undefined} [origin]
1178
+ * @returns {never}
1179
+ *
1180
+ * @overload
1181
+ * @param {Error | VFileMessage} cause
1182
+ * @param {Point | Position | null | undefined} place
1183
+ * @param {string | null | undefined} [origin]
1184
+ * @returns {never}
1185
+ *
1186
+ * @overload
1187
+ * @param {Error | VFileMessage} cause
1188
+ * @param {string | null | undefined} [origin]
1189
+ * @returns {never}
1190
+ *
1191
+ * @param {Error | VFileMessage | string} causeOrReason
1192
+ * Reason for message, should use markdown.
1193
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1194
+ * Configuration (optional).
1195
+ * @param {string | null | undefined} [origin]
1196
+ * Place in code where the message originates (example:
1197
+ * `'my-package:my-rule'` or `'my-rule'`).
1198
+ * @returns {never}
1199
+ * Never.
1200
+ * @throws {VFileMessage}
1201
+ * Message.
1202
+ */
1203
+ fail(cause: Error | VFileMessage, origin?: string | null | undefined): never;
1204
+ /**
1205
+ * Create an info message for `reason` associated with the file.
1206
+ *
1207
+ * The `fatal` field of the message is set to `undefined` (info; change
1208
+ * likely not needed) and the `file` field is set to the current file path.
1209
+ * The message is added to the `messages` field on `file`.
1210
+ *
1211
+ * > 🪦 **Note**: also has obsolete signatures.
1212
+ *
1213
+ * @overload
1214
+ * @param {string} reason
1215
+ * @param {MessageOptions | null | undefined} [options]
1216
+ * @returns {VFileMessage}
1217
+ *
1218
+ * @overload
1219
+ * @param {string} reason
1220
+ * @param {Node | NodeLike | null | undefined} parent
1221
+ * @param {string | null | undefined} [origin]
1222
+ * @returns {VFileMessage}
1223
+ *
1224
+ * @overload
1225
+ * @param {string} reason
1226
+ * @param {Point | Position | null | undefined} place
1227
+ * @param {string | null | undefined} [origin]
1228
+ * @returns {VFileMessage}
1229
+ *
1230
+ * @overload
1231
+ * @param {string} reason
1232
+ * @param {string | null | undefined} [origin]
1233
+ * @returns {VFileMessage}
1234
+ *
1235
+ * @overload
1236
+ * @param {Error | VFileMessage} cause
1237
+ * @param {Node | NodeLike | null | undefined} parent
1238
+ * @param {string | null | undefined} [origin]
1239
+ * @returns {VFileMessage}
1240
+ *
1241
+ * @overload
1242
+ * @param {Error | VFileMessage} cause
1243
+ * @param {Point | Position | null | undefined} place
1244
+ * @param {string | null | undefined} [origin]
1245
+ * @returns {VFileMessage}
1246
+ *
1247
+ * @overload
1248
+ * @param {Error | VFileMessage} cause
1249
+ * @param {string | null | undefined} [origin]
1250
+ * @returns {VFileMessage}
1251
+ *
1252
+ * @param {Error | VFileMessage | string} causeOrReason
1253
+ * Reason for message, should use markdown.
1254
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1255
+ * Configuration (optional).
1256
+ * @param {string | null | undefined} [origin]
1257
+ * Place in code where the message originates (example:
1258
+ * `'my-package:my-rule'` or `'my-rule'`).
1259
+ * @returns {VFileMessage}
1260
+ * Message.
1261
+ */
1262
+ info(reason: string, options?: Options$1 | null | undefined): VFileMessage;
1263
+ /**
1264
+ * Create an info message for `reason` associated with the file.
1265
+ *
1266
+ * The `fatal` field of the message is set to `undefined` (info; change
1267
+ * likely not needed) and the `file` field is set to the current file path.
1268
+ * The message is added to the `messages` field on `file`.
1269
+ *
1270
+ * > 🪦 **Note**: also has obsolete signatures.
1271
+ *
1272
+ * @overload
1273
+ * @param {string} reason
1274
+ * @param {MessageOptions | null | undefined} [options]
1275
+ * @returns {VFileMessage}
1276
+ *
1277
+ * @overload
1278
+ * @param {string} reason
1279
+ * @param {Node | NodeLike | null | undefined} parent
1280
+ * @param {string | null | undefined} [origin]
1281
+ * @returns {VFileMessage}
1282
+ *
1283
+ * @overload
1284
+ * @param {string} reason
1285
+ * @param {Point | Position | null | undefined} place
1286
+ * @param {string | null | undefined} [origin]
1287
+ * @returns {VFileMessage}
1288
+ *
1289
+ * @overload
1290
+ * @param {string} reason
1291
+ * @param {string | null | undefined} [origin]
1292
+ * @returns {VFileMessage}
1293
+ *
1294
+ * @overload
1295
+ * @param {Error | VFileMessage} cause
1296
+ * @param {Node | NodeLike | null | undefined} parent
1297
+ * @param {string | null | undefined} [origin]
1298
+ * @returns {VFileMessage}
1299
+ *
1300
+ * @overload
1301
+ * @param {Error | VFileMessage} cause
1302
+ * @param {Point | Position | null | undefined} place
1303
+ * @param {string | null | undefined} [origin]
1304
+ * @returns {VFileMessage}
1305
+ *
1306
+ * @overload
1307
+ * @param {Error | VFileMessage} cause
1308
+ * @param {string | null | undefined} [origin]
1309
+ * @returns {VFileMessage}
1310
+ *
1311
+ * @param {Error | VFileMessage | string} causeOrReason
1312
+ * Reason for message, should use markdown.
1313
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1314
+ * Configuration (optional).
1315
+ * @param {string | null | undefined} [origin]
1316
+ * Place in code where the message originates (example:
1317
+ * `'my-package:my-rule'` or `'my-rule'`).
1318
+ * @returns {VFileMessage}
1319
+ * Message.
1320
+ */
1321
+ info(reason: string, parent: Node$1 | NodeLike | null | undefined, origin?: string | null | undefined): VFileMessage;
1322
+ /**
1323
+ * Create an info message for `reason` associated with the file.
1324
+ *
1325
+ * The `fatal` field of the message is set to `undefined` (info; change
1326
+ * likely not needed) and the `file` field is set to the current file path.
1327
+ * The message is added to the `messages` field on `file`.
1328
+ *
1329
+ * > 🪦 **Note**: also has obsolete signatures.
1330
+ *
1331
+ * @overload
1332
+ * @param {string} reason
1333
+ * @param {MessageOptions | null | undefined} [options]
1334
+ * @returns {VFileMessage}
1335
+ *
1336
+ * @overload
1337
+ * @param {string} reason
1338
+ * @param {Node | NodeLike | null | undefined} parent
1339
+ * @param {string | null | undefined} [origin]
1340
+ * @returns {VFileMessage}
1341
+ *
1342
+ * @overload
1343
+ * @param {string} reason
1344
+ * @param {Point | Position | null | undefined} place
1345
+ * @param {string | null | undefined} [origin]
1346
+ * @returns {VFileMessage}
1347
+ *
1348
+ * @overload
1349
+ * @param {string} reason
1350
+ * @param {string | null | undefined} [origin]
1351
+ * @returns {VFileMessage}
1352
+ *
1353
+ * @overload
1354
+ * @param {Error | VFileMessage} cause
1355
+ * @param {Node | NodeLike | null | undefined} parent
1356
+ * @param {string | null | undefined} [origin]
1357
+ * @returns {VFileMessage}
1358
+ *
1359
+ * @overload
1360
+ * @param {Error | VFileMessage} cause
1361
+ * @param {Point | Position | null | undefined} place
1362
+ * @param {string | null | undefined} [origin]
1363
+ * @returns {VFileMessage}
1364
+ *
1365
+ * @overload
1366
+ * @param {Error | VFileMessage} cause
1367
+ * @param {string | null | undefined} [origin]
1368
+ * @returns {VFileMessage}
1369
+ *
1370
+ * @param {Error | VFileMessage | string} causeOrReason
1371
+ * Reason for message, should use markdown.
1372
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1373
+ * Configuration (optional).
1374
+ * @param {string | null | undefined} [origin]
1375
+ * Place in code where the message originates (example:
1376
+ * `'my-package:my-rule'` or `'my-rule'`).
1377
+ * @returns {VFileMessage}
1378
+ * Message.
1379
+ */
1380
+ info(reason: string, place: Point | Position | null | undefined, origin?: string | null | undefined): VFileMessage;
1381
+ /**
1382
+ * Create an info message for `reason` associated with the file.
1383
+ *
1384
+ * The `fatal` field of the message is set to `undefined` (info; change
1385
+ * likely not needed) and the `file` field is set to the current file path.
1386
+ * The message is added to the `messages` field on `file`.
1387
+ *
1388
+ * > 🪦 **Note**: also has obsolete signatures.
1389
+ *
1390
+ * @overload
1391
+ * @param {string} reason
1392
+ * @param {MessageOptions | null | undefined} [options]
1393
+ * @returns {VFileMessage}
1394
+ *
1395
+ * @overload
1396
+ * @param {string} reason
1397
+ * @param {Node | NodeLike | null | undefined} parent
1398
+ * @param {string | null | undefined} [origin]
1399
+ * @returns {VFileMessage}
1400
+ *
1401
+ * @overload
1402
+ * @param {string} reason
1403
+ * @param {Point | Position | null | undefined} place
1404
+ * @param {string | null | undefined} [origin]
1405
+ * @returns {VFileMessage}
1406
+ *
1407
+ * @overload
1408
+ * @param {string} reason
1409
+ * @param {string | null | undefined} [origin]
1410
+ * @returns {VFileMessage}
1411
+ *
1412
+ * @overload
1413
+ * @param {Error | VFileMessage} cause
1414
+ * @param {Node | NodeLike | null | undefined} parent
1415
+ * @param {string | null | undefined} [origin]
1416
+ * @returns {VFileMessage}
1417
+ *
1418
+ * @overload
1419
+ * @param {Error | VFileMessage} cause
1420
+ * @param {Point | Position | null | undefined} place
1421
+ * @param {string | null | undefined} [origin]
1422
+ * @returns {VFileMessage}
1423
+ *
1424
+ * @overload
1425
+ * @param {Error | VFileMessage} cause
1426
+ * @param {string | null | undefined} [origin]
1427
+ * @returns {VFileMessage}
1428
+ *
1429
+ * @param {Error | VFileMessage | string} causeOrReason
1430
+ * Reason for message, should use markdown.
1431
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1432
+ * Configuration (optional).
1433
+ * @param {string | null | undefined} [origin]
1434
+ * Place in code where the message originates (example:
1435
+ * `'my-package:my-rule'` or `'my-rule'`).
1436
+ * @returns {VFileMessage}
1437
+ * Message.
1438
+ */
1439
+ info(reason: string, origin?: string | null | undefined): VFileMessage;
1440
+ /**
1441
+ * Create an info message for `reason` associated with the file.
1442
+ *
1443
+ * The `fatal` field of the message is set to `undefined` (info; change
1444
+ * likely not needed) and the `file` field is set to the current file path.
1445
+ * The message is added to the `messages` field on `file`.
1446
+ *
1447
+ * > 🪦 **Note**: also has obsolete signatures.
1448
+ *
1449
+ * @overload
1450
+ * @param {string} reason
1451
+ * @param {MessageOptions | null | undefined} [options]
1452
+ * @returns {VFileMessage}
1453
+ *
1454
+ * @overload
1455
+ * @param {string} reason
1456
+ * @param {Node | NodeLike | null | undefined} parent
1457
+ * @param {string | null | undefined} [origin]
1458
+ * @returns {VFileMessage}
1459
+ *
1460
+ * @overload
1461
+ * @param {string} reason
1462
+ * @param {Point | Position | null | undefined} place
1463
+ * @param {string | null | undefined} [origin]
1464
+ * @returns {VFileMessage}
1465
+ *
1466
+ * @overload
1467
+ * @param {string} reason
1468
+ * @param {string | null | undefined} [origin]
1469
+ * @returns {VFileMessage}
1470
+ *
1471
+ * @overload
1472
+ * @param {Error | VFileMessage} cause
1473
+ * @param {Node | NodeLike | null | undefined} parent
1474
+ * @param {string | null | undefined} [origin]
1475
+ * @returns {VFileMessage}
1476
+ *
1477
+ * @overload
1478
+ * @param {Error | VFileMessage} cause
1479
+ * @param {Point | Position | null | undefined} place
1480
+ * @param {string | null | undefined} [origin]
1481
+ * @returns {VFileMessage}
1482
+ *
1483
+ * @overload
1484
+ * @param {Error | VFileMessage} cause
1485
+ * @param {string | null | undefined} [origin]
1486
+ * @returns {VFileMessage}
1487
+ *
1488
+ * @param {Error | VFileMessage | string} causeOrReason
1489
+ * Reason for message, should use markdown.
1490
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1491
+ * Configuration (optional).
1492
+ * @param {string | null | undefined} [origin]
1493
+ * Place in code where the message originates (example:
1494
+ * `'my-package:my-rule'` or `'my-rule'`).
1495
+ * @returns {VFileMessage}
1496
+ * Message.
1497
+ */
1498
+ info(cause: Error | VFileMessage, parent: Node$1 | NodeLike | null | undefined, origin?: string | null | undefined): VFileMessage;
1499
+ /**
1500
+ * Create an info message for `reason` associated with the file.
1501
+ *
1502
+ * The `fatal` field of the message is set to `undefined` (info; change
1503
+ * likely not needed) and the `file` field is set to the current file path.
1504
+ * The message is added to the `messages` field on `file`.
1505
+ *
1506
+ * > 🪦 **Note**: also has obsolete signatures.
1507
+ *
1508
+ * @overload
1509
+ * @param {string} reason
1510
+ * @param {MessageOptions | null | undefined} [options]
1511
+ * @returns {VFileMessage}
1512
+ *
1513
+ * @overload
1514
+ * @param {string} reason
1515
+ * @param {Node | NodeLike | null | undefined} parent
1516
+ * @param {string | null | undefined} [origin]
1517
+ * @returns {VFileMessage}
1518
+ *
1519
+ * @overload
1520
+ * @param {string} reason
1521
+ * @param {Point | Position | null | undefined} place
1522
+ * @param {string | null | undefined} [origin]
1523
+ * @returns {VFileMessage}
1524
+ *
1525
+ * @overload
1526
+ * @param {string} reason
1527
+ * @param {string | null | undefined} [origin]
1528
+ * @returns {VFileMessage}
1529
+ *
1530
+ * @overload
1531
+ * @param {Error | VFileMessage} cause
1532
+ * @param {Node | NodeLike | null | undefined} parent
1533
+ * @param {string | null | undefined} [origin]
1534
+ * @returns {VFileMessage}
1535
+ *
1536
+ * @overload
1537
+ * @param {Error | VFileMessage} cause
1538
+ * @param {Point | Position | null | undefined} place
1539
+ * @param {string | null | undefined} [origin]
1540
+ * @returns {VFileMessage}
1541
+ *
1542
+ * @overload
1543
+ * @param {Error | VFileMessage} cause
1544
+ * @param {string | null | undefined} [origin]
1545
+ * @returns {VFileMessage}
1546
+ *
1547
+ * @param {Error | VFileMessage | string} causeOrReason
1548
+ * Reason for message, should use markdown.
1549
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1550
+ * Configuration (optional).
1551
+ * @param {string | null | undefined} [origin]
1552
+ * Place in code where the message originates (example:
1553
+ * `'my-package:my-rule'` or `'my-rule'`).
1554
+ * @returns {VFileMessage}
1555
+ * Message.
1556
+ */
1557
+ info(cause: Error | VFileMessage, place: Point | Position | null | undefined, origin?: string | null | undefined): VFileMessage;
1558
+ /**
1559
+ * Create an info message for `reason` associated with the file.
1560
+ *
1561
+ * The `fatal` field of the message is set to `undefined` (info; change
1562
+ * likely not needed) and the `file` field is set to the current file path.
1563
+ * The message is added to the `messages` field on `file`.
1564
+ *
1565
+ * > 🪦 **Note**: also has obsolete signatures.
1566
+ *
1567
+ * @overload
1568
+ * @param {string} reason
1569
+ * @param {MessageOptions | null | undefined} [options]
1570
+ * @returns {VFileMessage}
1571
+ *
1572
+ * @overload
1573
+ * @param {string} reason
1574
+ * @param {Node | NodeLike | null | undefined} parent
1575
+ * @param {string | null | undefined} [origin]
1576
+ * @returns {VFileMessage}
1577
+ *
1578
+ * @overload
1579
+ * @param {string} reason
1580
+ * @param {Point | Position | null | undefined} place
1581
+ * @param {string | null | undefined} [origin]
1582
+ * @returns {VFileMessage}
1583
+ *
1584
+ * @overload
1585
+ * @param {string} reason
1586
+ * @param {string | null | undefined} [origin]
1587
+ * @returns {VFileMessage}
1588
+ *
1589
+ * @overload
1590
+ * @param {Error | VFileMessage} cause
1591
+ * @param {Node | NodeLike | null | undefined} parent
1592
+ * @param {string | null | undefined} [origin]
1593
+ * @returns {VFileMessage}
1594
+ *
1595
+ * @overload
1596
+ * @param {Error | VFileMessage} cause
1597
+ * @param {Point | Position | null | undefined} place
1598
+ * @param {string | null | undefined} [origin]
1599
+ * @returns {VFileMessage}
1600
+ *
1601
+ * @overload
1602
+ * @param {Error | VFileMessage} cause
1603
+ * @param {string | null | undefined} [origin]
1604
+ * @returns {VFileMessage}
1605
+ *
1606
+ * @param {Error | VFileMessage | string} causeOrReason
1607
+ * Reason for message, should use markdown.
1608
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1609
+ * Configuration (optional).
1610
+ * @param {string | null | undefined} [origin]
1611
+ * Place in code where the message originates (example:
1612
+ * `'my-package:my-rule'` or `'my-rule'`).
1613
+ * @returns {VFileMessage}
1614
+ * Message.
1615
+ */
1616
+ info(cause: Error | VFileMessage, origin?: string | null | undefined): VFileMessage;
1617
+ /**
1618
+ * Create a message for `reason` associated with the file.
1619
+ *
1620
+ * The `fatal` field of the message is set to `false` (warning; change may be
1621
+ * needed) and the `file` field is set to the current file path.
1622
+ * The message is added to the `messages` field on `file`.
1623
+ *
1624
+ * > 🪦 **Note**: also has obsolete signatures.
1625
+ *
1626
+ * @overload
1627
+ * @param {string} reason
1628
+ * @param {MessageOptions | null | undefined} [options]
1629
+ * @returns {VFileMessage}
1630
+ *
1631
+ * @overload
1632
+ * @param {string} reason
1633
+ * @param {Node | NodeLike | null | undefined} parent
1634
+ * @param {string | null | undefined} [origin]
1635
+ * @returns {VFileMessage}
1636
+ *
1637
+ * @overload
1638
+ * @param {string} reason
1639
+ * @param {Point | Position | null | undefined} place
1640
+ * @param {string | null | undefined} [origin]
1641
+ * @returns {VFileMessage}
1642
+ *
1643
+ * @overload
1644
+ * @param {string} reason
1645
+ * @param {string | null | undefined} [origin]
1646
+ * @returns {VFileMessage}
1647
+ *
1648
+ * @overload
1649
+ * @param {Error | VFileMessage} cause
1650
+ * @param {Node | NodeLike | null | undefined} parent
1651
+ * @param {string | null | undefined} [origin]
1652
+ * @returns {VFileMessage}
1653
+ *
1654
+ * @overload
1655
+ * @param {Error | VFileMessage} cause
1656
+ * @param {Point | Position | null | undefined} place
1657
+ * @param {string | null | undefined} [origin]
1658
+ * @returns {VFileMessage}
1659
+ *
1660
+ * @overload
1661
+ * @param {Error | VFileMessage} cause
1662
+ * @param {string | null | undefined} [origin]
1663
+ * @returns {VFileMessage}
1664
+ *
1665
+ * @param {Error | VFileMessage | string} causeOrReason
1666
+ * Reason for message, should use markdown.
1667
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1668
+ * Configuration (optional).
1669
+ * @param {string | null | undefined} [origin]
1670
+ * Place in code where the message originates (example:
1671
+ * `'my-package:my-rule'` or `'my-rule'`).
1672
+ * @returns {VFileMessage}
1673
+ * Message.
1674
+ */
1675
+ message(reason: string, options?: Options$1 | null | undefined): VFileMessage;
1676
+ /**
1677
+ * Create a message for `reason` associated with the file.
1678
+ *
1679
+ * The `fatal` field of the message is set to `false` (warning; change may be
1680
+ * needed) and the `file` field is set to the current file path.
1681
+ * The message is added to the `messages` field on `file`.
1682
+ *
1683
+ * > 🪦 **Note**: also has obsolete signatures.
1684
+ *
1685
+ * @overload
1686
+ * @param {string} reason
1687
+ * @param {MessageOptions | null | undefined} [options]
1688
+ * @returns {VFileMessage}
1689
+ *
1690
+ * @overload
1691
+ * @param {string} reason
1692
+ * @param {Node | NodeLike | null | undefined} parent
1693
+ * @param {string | null | undefined} [origin]
1694
+ * @returns {VFileMessage}
1695
+ *
1696
+ * @overload
1697
+ * @param {string} reason
1698
+ * @param {Point | Position | null | undefined} place
1699
+ * @param {string | null | undefined} [origin]
1700
+ * @returns {VFileMessage}
1701
+ *
1702
+ * @overload
1703
+ * @param {string} reason
1704
+ * @param {string | null | undefined} [origin]
1705
+ * @returns {VFileMessage}
1706
+ *
1707
+ * @overload
1708
+ * @param {Error | VFileMessage} cause
1709
+ * @param {Node | NodeLike | null | undefined} parent
1710
+ * @param {string | null | undefined} [origin]
1711
+ * @returns {VFileMessage}
1712
+ *
1713
+ * @overload
1714
+ * @param {Error | VFileMessage} cause
1715
+ * @param {Point | Position | null | undefined} place
1716
+ * @param {string | null | undefined} [origin]
1717
+ * @returns {VFileMessage}
1718
+ *
1719
+ * @overload
1720
+ * @param {Error | VFileMessage} cause
1721
+ * @param {string | null | undefined} [origin]
1722
+ * @returns {VFileMessage}
1723
+ *
1724
+ * @param {Error | VFileMessage | string} causeOrReason
1725
+ * Reason for message, should use markdown.
1726
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1727
+ * Configuration (optional).
1728
+ * @param {string | null | undefined} [origin]
1729
+ * Place in code where the message originates (example:
1730
+ * `'my-package:my-rule'` or `'my-rule'`).
1731
+ * @returns {VFileMessage}
1732
+ * Message.
1733
+ */
1734
+ message(reason: string, parent: Node$1 | NodeLike | null | undefined, origin?: string | null | undefined): VFileMessage;
1735
+ /**
1736
+ * Create a message for `reason` associated with the file.
1737
+ *
1738
+ * The `fatal` field of the message is set to `false` (warning; change may be
1739
+ * needed) and the `file` field is set to the current file path.
1740
+ * The message is added to the `messages` field on `file`.
1741
+ *
1742
+ * > 🪦 **Note**: also has obsolete signatures.
1743
+ *
1744
+ * @overload
1745
+ * @param {string} reason
1746
+ * @param {MessageOptions | null | undefined} [options]
1747
+ * @returns {VFileMessage}
1748
+ *
1749
+ * @overload
1750
+ * @param {string} reason
1751
+ * @param {Node | NodeLike | null | undefined} parent
1752
+ * @param {string | null | undefined} [origin]
1753
+ * @returns {VFileMessage}
1754
+ *
1755
+ * @overload
1756
+ * @param {string} reason
1757
+ * @param {Point | Position | null | undefined} place
1758
+ * @param {string | null | undefined} [origin]
1759
+ * @returns {VFileMessage}
1760
+ *
1761
+ * @overload
1762
+ * @param {string} reason
1763
+ * @param {string | null | undefined} [origin]
1764
+ * @returns {VFileMessage}
1765
+ *
1766
+ * @overload
1767
+ * @param {Error | VFileMessage} cause
1768
+ * @param {Node | NodeLike | null | undefined} parent
1769
+ * @param {string | null | undefined} [origin]
1770
+ * @returns {VFileMessage}
1771
+ *
1772
+ * @overload
1773
+ * @param {Error | VFileMessage} cause
1774
+ * @param {Point | Position | null | undefined} place
1775
+ * @param {string | null | undefined} [origin]
1776
+ * @returns {VFileMessage}
1777
+ *
1778
+ * @overload
1779
+ * @param {Error | VFileMessage} cause
1780
+ * @param {string | null | undefined} [origin]
1781
+ * @returns {VFileMessage}
1782
+ *
1783
+ * @param {Error | VFileMessage | string} causeOrReason
1784
+ * Reason for message, should use markdown.
1785
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1786
+ * Configuration (optional).
1787
+ * @param {string | null | undefined} [origin]
1788
+ * Place in code where the message originates (example:
1789
+ * `'my-package:my-rule'` or `'my-rule'`).
1790
+ * @returns {VFileMessage}
1791
+ * Message.
1792
+ */
1793
+ message(reason: string, place: Point | Position | null | undefined, origin?: string | null | undefined): VFileMessage;
1794
+ /**
1795
+ * Create a message for `reason` associated with the file.
1796
+ *
1797
+ * The `fatal` field of the message is set to `false` (warning; change may be
1798
+ * needed) and the `file` field is set to the current file path.
1799
+ * The message is added to the `messages` field on `file`.
1800
+ *
1801
+ * > 🪦 **Note**: also has obsolete signatures.
1802
+ *
1803
+ * @overload
1804
+ * @param {string} reason
1805
+ * @param {MessageOptions | null | undefined} [options]
1806
+ * @returns {VFileMessage}
1807
+ *
1808
+ * @overload
1809
+ * @param {string} reason
1810
+ * @param {Node | NodeLike | null | undefined} parent
1811
+ * @param {string | null | undefined} [origin]
1812
+ * @returns {VFileMessage}
1813
+ *
1814
+ * @overload
1815
+ * @param {string} reason
1816
+ * @param {Point | Position | null | undefined} place
1817
+ * @param {string | null | undefined} [origin]
1818
+ * @returns {VFileMessage}
1819
+ *
1820
+ * @overload
1821
+ * @param {string} reason
1822
+ * @param {string | null | undefined} [origin]
1823
+ * @returns {VFileMessage}
1824
+ *
1825
+ * @overload
1826
+ * @param {Error | VFileMessage} cause
1827
+ * @param {Node | NodeLike | null | undefined} parent
1828
+ * @param {string | null | undefined} [origin]
1829
+ * @returns {VFileMessage}
1830
+ *
1831
+ * @overload
1832
+ * @param {Error | VFileMessage} cause
1833
+ * @param {Point | Position | null | undefined} place
1834
+ * @param {string | null | undefined} [origin]
1835
+ * @returns {VFileMessage}
1836
+ *
1837
+ * @overload
1838
+ * @param {Error | VFileMessage} cause
1839
+ * @param {string | null | undefined} [origin]
1840
+ * @returns {VFileMessage}
1841
+ *
1842
+ * @param {Error | VFileMessage | string} causeOrReason
1843
+ * Reason for message, should use markdown.
1844
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1845
+ * Configuration (optional).
1846
+ * @param {string | null | undefined} [origin]
1847
+ * Place in code where the message originates (example:
1848
+ * `'my-package:my-rule'` or `'my-rule'`).
1849
+ * @returns {VFileMessage}
1850
+ * Message.
1851
+ */
1852
+ message(reason: string, origin?: string | null | undefined): VFileMessage;
1853
+ /**
1854
+ * Create a message for `reason` associated with the file.
1855
+ *
1856
+ * The `fatal` field of the message is set to `false` (warning; change may be
1857
+ * needed) and the `file` field is set to the current file path.
1858
+ * The message is added to the `messages` field on `file`.
1859
+ *
1860
+ * > 🪦 **Note**: also has obsolete signatures.
1861
+ *
1862
+ * @overload
1863
+ * @param {string} reason
1864
+ * @param {MessageOptions | null | undefined} [options]
1865
+ * @returns {VFileMessage}
1866
+ *
1867
+ * @overload
1868
+ * @param {string} reason
1869
+ * @param {Node | NodeLike | null | undefined} parent
1870
+ * @param {string | null | undefined} [origin]
1871
+ * @returns {VFileMessage}
1872
+ *
1873
+ * @overload
1874
+ * @param {string} reason
1875
+ * @param {Point | Position | null | undefined} place
1876
+ * @param {string | null | undefined} [origin]
1877
+ * @returns {VFileMessage}
1878
+ *
1879
+ * @overload
1880
+ * @param {string} reason
1881
+ * @param {string | null | undefined} [origin]
1882
+ * @returns {VFileMessage}
1883
+ *
1884
+ * @overload
1885
+ * @param {Error | VFileMessage} cause
1886
+ * @param {Node | NodeLike | null | undefined} parent
1887
+ * @param {string | null | undefined} [origin]
1888
+ * @returns {VFileMessage}
1889
+ *
1890
+ * @overload
1891
+ * @param {Error | VFileMessage} cause
1892
+ * @param {Point | Position | null | undefined} place
1893
+ * @param {string | null | undefined} [origin]
1894
+ * @returns {VFileMessage}
1895
+ *
1896
+ * @overload
1897
+ * @param {Error | VFileMessage} cause
1898
+ * @param {string | null | undefined} [origin]
1899
+ * @returns {VFileMessage}
1900
+ *
1901
+ * @param {Error | VFileMessage | string} causeOrReason
1902
+ * Reason for message, should use markdown.
1903
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1904
+ * Configuration (optional).
1905
+ * @param {string | null | undefined} [origin]
1906
+ * Place in code where the message originates (example:
1907
+ * `'my-package:my-rule'` or `'my-rule'`).
1908
+ * @returns {VFileMessage}
1909
+ * Message.
1910
+ */
1911
+ message(cause: Error | VFileMessage, parent: Node$1 | NodeLike | null | undefined, origin?: string | null | undefined): VFileMessage;
1912
+ /**
1913
+ * Create a message for `reason` associated with the file.
1914
+ *
1915
+ * The `fatal` field of the message is set to `false` (warning; change may be
1916
+ * needed) and the `file` field is set to the current file path.
1917
+ * The message is added to the `messages` field on `file`.
1918
+ *
1919
+ * > 🪦 **Note**: also has obsolete signatures.
1920
+ *
1921
+ * @overload
1922
+ * @param {string} reason
1923
+ * @param {MessageOptions | null | undefined} [options]
1924
+ * @returns {VFileMessage}
1925
+ *
1926
+ * @overload
1927
+ * @param {string} reason
1928
+ * @param {Node | NodeLike | null | undefined} parent
1929
+ * @param {string | null | undefined} [origin]
1930
+ * @returns {VFileMessage}
1931
+ *
1932
+ * @overload
1933
+ * @param {string} reason
1934
+ * @param {Point | Position | null | undefined} place
1935
+ * @param {string | null | undefined} [origin]
1936
+ * @returns {VFileMessage}
1937
+ *
1938
+ * @overload
1939
+ * @param {string} reason
1940
+ * @param {string | null | undefined} [origin]
1941
+ * @returns {VFileMessage}
1942
+ *
1943
+ * @overload
1944
+ * @param {Error | VFileMessage} cause
1945
+ * @param {Node | NodeLike | null | undefined} parent
1946
+ * @param {string | null | undefined} [origin]
1947
+ * @returns {VFileMessage}
1948
+ *
1949
+ * @overload
1950
+ * @param {Error | VFileMessage} cause
1951
+ * @param {Point | Position | null | undefined} place
1952
+ * @param {string | null | undefined} [origin]
1953
+ * @returns {VFileMessage}
1954
+ *
1955
+ * @overload
1956
+ * @param {Error | VFileMessage} cause
1957
+ * @param {string | null | undefined} [origin]
1958
+ * @returns {VFileMessage}
1959
+ *
1960
+ * @param {Error | VFileMessage | string} causeOrReason
1961
+ * Reason for message, should use markdown.
1962
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1963
+ * Configuration (optional).
1964
+ * @param {string | null | undefined} [origin]
1965
+ * Place in code where the message originates (example:
1966
+ * `'my-package:my-rule'` or `'my-rule'`).
1967
+ * @returns {VFileMessage}
1968
+ * Message.
1969
+ */
1970
+ message(cause: Error | VFileMessage, place: Point | Position | null | undefined, origin?: string | null | undefined): VFileMessage;
1971
+ /**
1972
+ * Create a message for `reason` associated with the file.
1973
+ *
1974
+ * The `fatal` field of the message is set to `false` (warning; change may be
1975
+ * needed) and the `file` field is set to the current file path.
1976
+ * The message is added to the `messages` field on `file`.
1977
+ *
1978
+ * > 🪦 **Note**: also has obsolete signatures.
1979
+ *
1980
+ * @overload
1981
+ * @param {string} reason
1982
+ * @param {MessageOptions | null | undefined} [options]
1983
+ * @returns {VFileMessage}
1984
+ *
1985
+ * @overload
1986
+ * @param {string} reason
1987
+ * @param {Node | NodeLike | null | undefined} parent
1988
+ * @param {string | null | undefined} [origin]
1989
+ * @returns {VFileMessage}
1990
+ *
1991
+ * @overload
1992
+ * @param {string} reason
1993
+ * @param {Point | Position | null | undefined} place
1994
+ * @param {string | null | undefined} [origin]
1995
+ * @returns {VFileMessage}
1996
+ *
1997
+ * @overload
1998
+ * @param {string} reason
1999
+ * @param {string | null | undefined} [origin]
2000
+ * @returns {VFileMessage}
2001
+ *
2002
+ * @overload
2003
+ * @param {Error | VFileMessage} cause
2004
+ * @param {Node | NodeLike | null | undefined} parent
2005
+ * @param {string | null | undefined} [origin]
2006
+ * @returns {VFileMessage}
2007
+ *
2008
+ * @overload
2009
+ * @param {Error | VFileMessage} cause
2010
+ * @param {Point | Position | null | undefined} place
2011
+ * @param {string | null | undefined} [origin]
2012
+ * @returns {VFileMessage}
2013
+ *
2014
+ * @overload
2015
+ * @param {Error | VFileMessage} cause
2016
+ * @param {string | null | undefined} [origin]
2017
+ * @returns {VFileMessage}
2018
+ *
2019
+ * @param {Error | VFileMessage | string} causeOrReason
2020
+ * Reason for message, should use markdown.
2021
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
2022
+ * Configuration (optional).
2023
+ * @param {string | null | undefined} [origin]
2024
+ * Place in code where the message originates (example:
2025
+ * `'my-package:my-rule'` or `'my-rule'`).
2026
+ * @returns {VFileMessage}
2027
+ * Message.
2028
+ */
2029
+ message(cause: Error | VFileMessage, origin?: string | null | undefined): VFileMessage;
2030
+ /**
2031
+ * Serialize the file.
2032
+ *
2033
+ * > **Note**: which encodings are supported depends on the engine.
2034
+ * > For info on Node.js, see:
2035
+ * > <https://nodejs.org/api/util.html#whatwg-supported-encodings>.
2036
+ *
2037
+ * @param {string | null | undefined} [encoding='utf8']
2038
+ * Character encoding to understand `value` as when it’s a `Uint8Array`
2039
+ * (default: `'utf-8'`).
2040
+ * @returns {string}
2041
+ * Serialized file.
2042
+ */
2043
+ toString(encoding?: string | null | undefined): string;
2044
+ }
2045
+ type NodeLike = object & {
2046
+ type: string;
2047
+ position?: Position | undefined;
2048
+ };
2049
+ //#endregion
2050
+ //#region ../../node_modules/.bun/vfile@6.0.3/node_modules/vfile/index.d.ts
2051
+ // See: <https://github.com/sindresorhus/type-fest/blob/main/source/empty-object.d.ts>
2052
+ declare const emptyObjectSymbol$1: unique symbol; // To do: next major: remove.
2053
+ /**
2054
+ * Things that can be passed to the constructor.
2055
+ */
2056
+ type Compatible$1 = Options | URL | VFile | Value$1;
2057
+ /**
2058
+ * Raw source map.
2059
+ *
2060
+ * See:
2061
+ * <https://github.com/mozilla/source-map/blob/60adcb0/source-map.d.ts#L15-L23>.
2062
+ */
2063
+ interface Map {
2064
+ /**
2065
+ * The generated file this source map is associated with.
2066
+ */
2067
+ file: string;
2068
+ /**
2069
+ * A string of base64 VLQs which contain the actual mappings.
2070
+ */
2071
+ mappings: string;
2072
+ /**
2073
+ * An array of identifiers which can be referenced by individual mappings.
2074
+ */
2075
+ names: Array<string>;
2076
+ /**
2077
+ * An array of contents of the original source files.
2078
+ */
2079
+ sourcesContent?: Array<string> | undefined;
2080
+ /**
2081
+ * The URL root from which all sources are relative.
2082
+ */
2083
+ sourceRoot?: string | undefined;
2084
+ /**
2085
+ * An array of URLs to the original source files.
2086
+ */
2087
+ sources: Array<string>;
2088
+ /**
2089
+ * Which version of the source map spec this map is following.
2090
+ */
2091
+ version: number;
2092
+ }
2093
+ /**
2094
+ * This map registers the type of the `data` key of a `VFile`.
2095
+ *
2096
+ * This type can be augmented to register custom `data` types.
2097
+ *
2098
+ * @example
2099
+ * declare module 'vfile' {
2100
+ * interface DataMap {
2101
+ * // `file.data.name` is typed as `string`
2102
+ * name: string
2103
+ * }
2104
+ * }
2105
+ */
2106
+ interface DataMap {
2107
+ [emptyObjectSymbol$1]?: never;
2108
+ }
2109
+ /**
2110
+ * Custom info.
2111
+ *
2112
+ * Known attributes can be added to {@linkcode DataMap}
2113
+ */
2114
+ type Data$2 = Record<string, unknown> & Partial<DataMap>;
2115
+ /**
2116
+ * Configuration.
2117
+ */
2118
+ interface Options {
2119
+ /**
2120
+ * Arbitrary fields that will be shallow copied over to the new file.
2121
+ */
2122
+ [key: string]: unknown;
2123
+ /**
2124
+ * Set `basename` (name).
2125
+ */
2126
+ basename?: string | null | undefined;
2127
+ /**
2128
+ * Set `cwd` (working directory).
2129
+ */
2130
+ cwd?: string | null | undefined;
2131
+ /**
2132
+ * Set `data` (associated info).
2133
+ */
2134
+ data?: Data$2 | null | undefined;
2135
+ /**
2136
+ * Set `dirname` (path w/o basename).
2137
+ */
2138
+ dirname?: string | null | undefined;
2139
+ /**
2140
+ * Set `extname` (extension with dot).
2141
+ */
2142
+ extname?: string | null | undefined;
2143
+ /**
2144
+ * Set `history` (paths the file moved between).
2145
+ */
2146
+ history?: Array<string> | null | undefined;
2147
+ /**
2148
+ * Set `path` (current path).
2149
+ */
2150
+ path?: URL | string | null | undefined;
2151
+ /**
2152
+ * Set `stem` (name without extension).
2153
+ */
2154
+ stem?: string | null | undefined;
2155
+ /**
2156
+ * Set `value` (the contents of the file).
2157
+ */
2158
+ value?: Value$1 | null | undefined;
2159
+ }
2160
+ /**
2161
+ * Contents of the file.
2162
+ *
2163
+ * Can either be text or a `Uint8Array` structure.
2164
+ */
2165
+ type Value$1 = Uint8Array | string;
2166
+ //#endregion
2167
+ //#region ../../node_modules/.bun/trough@2.2.0/node_modules/trough/lib/index.d.ts
2168
+ /**
2169
+ * Ware.
2170
+ */
2171
+ type Middleware = (...input: Array<any>) => any;
2172
+ /**
2173
+ * Pipeline.
2174
+ */
2175
+ type Pipeline$2 = {
2176
+ /**
2177
+ * Run the pipeline.
2178
+ */
2179
+ run: Run;
2180
+ /**
2181
+ * Add middleware.
2182
+ */
2183
+ use: Use;
2184
+ };
2185
+ /**
2186
+ * Call all middleware.
2187
+ *
2188
+ * Calls `done` on completion with either an error or the output of the
2189
+ * last middleware.
2190
+ *
2191
+ * > 👉 **Note**: as the length of input defines whether async functions get a
2192
+ * > `next` function,
2193
+ * > it’s recommended to keep `input` at one value normally.
2194
+ */
2195
+ type Run = (...input: Array<any>) => void;
2196
+ /**
2197
+ * Add middleware.
2198
+ */
2199
+ type Use = (fn: Middleware) => Pipeline$2;
2200
+ //#endregion
2201
+ //#region ../../node_modules/.bun/trough@2.2.0/node_modules/trough/index.d.ts
2202
+ type Pipeline$1 = Pipeline$2;
2203
+ //#endregion
2204
+ //#region ../../node_modules/.bun/unified@11.0.5/node_modules/unified/lib/callable-instance.d.ts
2205
+ declare const CallableInstance: new <Parameters extends unknown[], Result>(property: string | symbol) => (...parameters: Parameters) => Result;
2206
+ //#endregion
2207
+ //#region ../../node_modules/.bun/unified@11.0.5/node_modules/unified/lib/index.d.ts
2208
+ /**
2209
+ * @template {Node | undefined} [ParseTree=undefined]
2210
+ * Output of `parse` (optional).
2211
+ * @template {Node | undefined} [HeadTree=undefined]
2212
+ * Input for `run` (optional).
2213
+ * @template {Node | undefined} [TailTree=undefined]
2214
+ * Output for `run` (optional).
2215
+ * @template {Node | undefined} [CompileTree=undefined]
2216
+ * Input of `stringify` (optional).
2217
+ * @template {CompileResults | undefined} [CompileResult=undefined]
2218
+ * Output of `stringify` (optional).
2219
+ * @extends {CallableInstance<[], Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>>}
2220
+ */
2221
+ declare class Processor<ParseTree extends Node$1 | undefined = undefined, HeadTree extends Node$1 | undefined = undefined, TailTree extends Node$1 | undefined = undefined, CompileTree extends Node$1 | undefined = undefined, CompileResult extends CompileResults | undefined = undefined> extends CallableInstance<[], Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>> {
2222
+ /**
2223
+ * Create a processor.
2224
+ */
2225
+ constructor();
2226
+ /**
2227
+ * Compiler to use (deprecated).
2228
+ *
2229
+ * @deprecated
2230
+ * Use `compiler` instead.
2231
+ * @type {(
2232
+ * Compiler<
2233
+ * CompileTree extends undefined ? Node : CompileTree,
2234
+ * CompileResult extends undefined ? CompileResults : CompileResult
2235
+ * > |
2236
+ * undefined
2237
+ * )}
2238
+ */
2239
+ Compiler: (Compiler<CompileTree extends undefined ? Node : CompileTree, CompileResult extends undefined ? CompileResults : CompileResult> | undefined);
2240
+ /**
2241
+ * Parser to use (deprecated).
2242
+ *
2243
+ * @deprecated
2244
+ * Use `parser` instead.
2245
+ * @type {(
2246
+ * Parser<ParseTree extends undefined ? Node : ParseTree> |
2247
+ * undefined
2248
+ * )}
2249
+ */
2250
+ Parser: (Parser<ParseTree extends undefined ? Node : ParseTree> | undefined);
2251
+ /**
2252
+ * Internal list of configured plugins.
2253
+ *
2254
+ * @deprecated
2255
+ * This is a private internal property and should not be used.
2256
+ * @type {Array<PluginTuple<Array<unknown>>>}
2257
+ */
2258
+ attachers: Array<[plugin: Plugin<unknown[], undefined, undefined>, ...parameters: unknown[]]>;
2259
+ /**
2260
+ * Compiler to use.
2261
+ *
2262
+ * @type {(
2263
+ * Compiler<
2264
+ * CompileTree extends undefined ? Node : CompileTree,
2265
+ * CompileResult extends undefined ? CompileResults : CompileResult
2266
+ * > |
2267
+ * undefined
2268
+ * )}
2269
+ */
2270
+ compiler: (Compiler<CompileTree extends undefined ? Node : CompileTree, CompileResult extends undefined ? CompileResults : CompileResult> | undefined);
2271
+ /**
2272
+ * Internal state to track where we are while freezing.
2273
+ *
2274
+ * @deprecated
2275
+ * This is a private internal property and should not be used.
2276
+ * @type {number}
2277
+ */
2278
+ freezeIndex: number;
2279
+ /**
2280
+ * Internal state to track whether we’re frozen.
2281
+ *
2282
+ * @deprecated
2283
+ * This is a private internal property and should not be used.
2284
+ * @type {boolean | undefined}
2285
+ */
2286
+ frozen: boolean | undefined;
2287
+ /**
2288
+ * Internal state.
2289
+ *
2290
+ * @deprecated
2291
+ * This is a private internal property and should not be used.
2292
+ * @type {Data}
2293
+ */
2294
+ namespace: Data$1;
2295
+ /**
2296
+ * Parser to use.
2297
+ *
2298
+ * @type {(
2299
+ * Parser<ParseTree extends undefined ? Node : ParseTree> |
2300
+ * undefined
2301
+ * )}
2302
+ */
2303
+ parser: (Parser<ParseTree extends undefined ? Node : ParseTree> | undefined);
2304
+ /**
2305
+ * Internal list of configured transformers.
2306
+ *
2307
+ * @deprecated
2308
+ * This is a private internal property and should not be used.
2309
+ * @type {Pipeline}
2310
+ */
2311
+ transformers: Pipeline;
2312
+ /**
2313
+ * Copy a processor.
2314
+ *
2315
+ * @deprecated
2316
+ * This is a private internal method and should not be used.
2317
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
2318
+ * New *unfrozen* processor ({@linkcode Processor}) that is
2319
+ * configured to work the same as its ancestor.
2320
+ * When the descendant processor is configured in the future it does not
2321
+ * affect the ancestral processor.
2322
+ */
2323
+ copy(): Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>;
2324
+ /**
2325
+ * Configure the processor with info available to all plugins.
2326
+ * Information is stored in an object.
2327
+ *
2328
+ * Typically, options can be given to a specific plugin, but sometimes it
2329
+ * makes sense to have information shared with several plugins.
2330
+ * For example, a list of HTML elements that are self-closing, which is
2331
+ * needed during all phases.
2332
+ *
2333
+ * > **Note**: setting information cannot occur on *frozen* processors.
2334
+ * > Call the processor first to create a new unfrozen processor.
2335
+ *
2336
+ * > **Note**: to register custom data in TypeScript, augment the
2337
+ * > {@linkcode Data} interface.
2338
+ *
2339
+ * @example
2340
+ * This example show how to get and set info:
2341
+ *
2342
+ * ```js
2343
+ * import {unified} from 'unified'
2344
+ *
2345
+ * const processor = unified().data('alpha', 'bravo')
2346
+ *
2347
+ * processor.data('alpha') // => 'bravo'
2348
+ *
2349
+ * processor.data() // => {alpha: 'bravo'}
2350
+ *
2351
+ * processor.data({charlie: 'delta'})
2352
+ *
2353
+ * processor.data() // => {charlie: 'delta'}
2354
+ * ```
2355
+ *
2356
+ * @template {keyof Data} Key
2357
+ *
2358
+ * @overload
2359
+ * @returns {Data}
2360
+ *
2361
+ * @overload
2362
+ * @param {Data} dataset
2363
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
2364
+ *
2365
+ * @overload
2366
+ * @param {Key} key
2367
+ * @returns {Data[Key]}
2368
+ *
2369
+ * @overload
2370
+ * @param {Key} key
2371
+ * @param {Data[Key]} value
2372
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
2373
+ *
2374
+ * @param {Data | Key} [key]
2375
+ * Key to get or set, or entire dataset to set, or nothing to get the
2376
+ * entire dataset (optional).
2377
+ * @param {Data[Key]} [value]
2378
+ * Value to set (optional).
2379
+ * @returns {unknown}
2380
+ * The current processor when setting, the value at `key` when getting, or
2381
+ * the entire dataset when getting without key.
2382
+ */
2383
+ data<Key extends keyof Data>(): Data$1;
2384
+ /**
2385
+ * Configure the processor with info available to all plugins.
2386
+ * Information is stored in an object.
2387
+ *
2388
+ * Typically, options can be given to a specific plugin, but sometimes it
2389
+ * makes sense to have information shared with several plugins.
2390
+ * For example, a list of HTML elements that are self-closing, which is
2391
+ * needed during all phases.
2392
+ *
2393
+ * > **Note**: setting information cannot occur on *frozen* processors.
2394
+ * > Call the processor first to create a new unfrozen processor.
2395
+ *
2396
+ * > **Note**: to register custom data in TypeScript, augment the
2397
+ * > {@linkcode Data} interface.
2398
+ *
2399
+ * @example
2400
+ * This example show how to get and set info:
2401
+ *
2402
+ * ```js
2403
+ * import {unified} from 'unified'
2404
+ *
2405
+ * const processor = unified().data('alpha', 'bravo')
2406
+ *
2407
+ * processor.data('alpha') // => 'bravo'
2408
+ *
2409
+ * processor.data() // => {alpha: 'bravo'}
2410
+ *
2411
+ * processor.data({charlie: 'delta'})
2412
+ *
2413
+ * processor.data() // => {charlie: 'delta'}
2414
+ * ```
2415
+ *
2416
+ * @template {keyof Data} Key
2417
+ *
2418
+ * @overload
2419
+ * @returns {Data}
2420
+ *
2421
+ * @overload
2422
+ * @param {Data} dataset
2423
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
2424
+ *
2425
+ * @overload
2426
+ * @param {Key} key
2427
+ * @returns {Data[Key]}
2428
+ *
2429
+ * @overload
2430
+ * @param {Key} key
2431
+ * @param {Data[Key]} value
2432
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
2433
+ *
2434
+ * @param {Data | Key} [key]
2435
+ * Key to get or set, or entire dataset to set, or nothing to get the
2436
+ * entire dataset (optional).
2437
+ * @param {Data[Key]} [value]
2438
+ * Value to set (optional).
2439
+ * @returns {unknown}
2440
+ * The current processor when setting, the value at `key` when getting, or
2441
+ * the entire dataset when getting without key.
2442
+ */
2443
+ data<Key extends keyof Data>(dataset: Data$1): Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>;
2444
+ /**
2445
+ * Configure the processor with info available to all plugins.
2446
+ * Information is stored in an object.
2447
+ *
2448
+ * Typically, options can be given to a specific plugin, but sometimes it
2449
+ * makes sense to have information shared with several plugins.
2450
+ * For example, a list of HTML elements that are self-closing, which is
2451
+ * needed during all phases.
2452
+ *
2453
+ * > **Note**: setting information cannot occur on *frozen* processors.
2454
+ * > Call the processor first to create a new unfrozen processor.
2455
+ *
2456
+ * > **Note**: to register custom data in TypeScript, augment the
2457
+ * > {@linkcode Data} interface.
2458
+ *
2459
+ * @example
2460
+ * This example show how to get and set info:
2461
+ *
2462
+ * ```js
2463
+ * import {unified} from 'unified'
2464
+ *
2465
+ * const processor = unified().data('alpha', 'bravo')
2466
+ *
2467
+ * processor.data('alpha') // => 'bravo'
2468
+ *
2469
+ * processor.data() // => {alpha: 'bravo'}
2470
+ *
2471
+ * processor.data({charlie: 'delta'})
2472
+ *
2473
+ * processor.data() // => {charlie: 'delta'}
2474
+ * ```
2475
+ *
2476
+ * @template {keyof Data} Key
2477
+ *
2478
+ * @overload
2479
+ * @returns {Data}
2480
+ *
2481
+ * @overload
2482
+ * @param {Data} dataset
2483
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
2484
+ *
2485
+ * @overload
2486
+ * @param {Key} key
2487
+ * @returns {Data[Key]}
2488
+ *
2489
+ * @overload
2490
+ * @param {Key} key
2491
+ * @param {Data[Key]} value
2492
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
2493
+ *
2494
+ * @param {Data | Key} [key]
2495
+ * Key to get or set, or entire dataset to set, or nothing to get the
2496
+ * entire dataset (optional).
2497
+ * @param {Data[Key]} [value]
2498
+ * Value to set (optional).
2499
+ * @returns {unknown}
2500
+ * The current processor when setting, the value at `key` when getting, or
2501
+ * the entire dataset when getting without key.
2502
+ */
2503
+ data<Key extends keyof Data>(key: Key): Data[Key];
2504
+ /**
2505
+ * Configure the processor with info available to all plugins.
2506
+ * Information is stored in an object.
2507
+ *
2508
+ * Typically, options can be given to a specific plugin, but sometimes it
2509
+ * makes sense to have information shared with several plugins.
2510
+ * For example, a list of HTML elements that are self-closing, which is
2511
+ * needed during all phases.
2512
+ *
2513
+ * > **Note**: setting information cannot occur on *frozen* processors.
2514
+ * > Call the processor first to create a new unfrozen processor.
2515
+ *
2516
+ * > **Note**: to register custom data in TypeScript, augment the
2517
+ * > {@linkcode Data} interface.
2518
+ *
2519
+ * @example
2520
+ * This example show how to get and set info:
2521
+ *
2522
+ * ```js
2523
+ * import {unified} from 'unified'
2524
+ *
2525
+ * const processor = unified().data('alpha', 'bravo')
2526
+ *
2527
+ * processor.data('alpha') // => 'bravo'
2528
+ *
2529
+ * processor.data() // => {alpha: 'bravo'}
2530
+ *
2531
+ * processor.data({charlie: 'delta'})
2532
+ *
2533
+ * processor.data() // => {charlie: 'delta'}
2534
+ * ```
2535
+ *
2536
+ * @template {keyof Data} Key
2537
+ *
2538
+ * @overload
2539
+ * @returns {Data}
2540
+ *
2541
+ * @overload
2542
+ * @param {Data} dataset
2543
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
2544
+ *
2545
+ * @overload
2546
+ * @param {Key} key
2547
+ * @returns {Data[Key]}
2548
+ *
2549
+ * @overload
2550
+ * @param {Key} key
2551
+ * @param {Data[Key]} value
2552
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
2553
+ *
2554
+ * @param {Data | Key} [key]
2555
+ * Key to get or set, or entire dataset to set, or nothing to get the
2556
+ * entire dataset (optional).
2557
+ * @param {Data[Key]} [value]
2558
+ * Value to set (optional).
2559
+ * @returns {unknown}
2560
+ * The current processor when setting, the value at `key` when getting, or
2561
+ * the entire dataset when getting without key.
2562
+ */
2563
+ data<Key extends keyof Data>(key: Key, value: Data[Key]): Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>;
2564
+ /**
2565
+ * Freeze a processor.
2566
+ *
2567
+ * Frozen processors are meant to be extended and not to be configured
2568
+ * directly.
2569
+ *
2570
+ * When a processor is frozen it cannot be unfrozen.
2571
+ * New processors working the same way can be created by calling the
2572
+ * processor.
2573
+ *
2574
+ * It’s possible to freeze processors explicitly by calling `.freeze()`.
2575
+ * Processors freeze automatically when `.parse()`, `.run()`, `.runSync()`,
2576
+ * `.stringify()`, `.process()`, or `.processSync()` are called.
2577
+ *
2578
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
2579
+ * The current processor.
2580
+ */
2581
+ freeze(): Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>;
2582
+ /**
2583
+ * Parse text to a syntax tree.
2584
+ *
2585
+ * > **Note**: `parse` freezes the processor if not already *frozen*.
2586
+ *
2587
+ * > **Note**: `parse` performs the parse phase, not the run phase or other
2588
+ * > phases.
2589
+ *
2590
+ * @param {Compatible | undefined} [file]
2591
+ * file to parse (optional); typically `string` or `VFile`; any value
2592
+ * accepted as `x` in `new VFile(x)`.
2593
+ * @returns {ParseTree extends undefined ? Node : ParseTree}
2594
+ * Syntax tree representing `file`.
2595
+ */
2596
+ parse(file?: Compatible | undefined): ParseTree extends undefined ? Node : ParseTree;
2597
+ /**
2598
+ * Process the given file as configured on the processor.
2599
+ *
2600
+ * > **Note**: `process` freezes the processor if not already *frozen*.
2601
+ *
2602
+ * > **Note**: `process` performs the parse, run, and stringify phases.
2603
+ *
2604
+ * @overload
2605
+ * @param {Compatible | undefined} file
2606
+ * @param {ProcessCallback<VFileWithOutput<CompileResult>>} done
2607
+ * @returns {undefined}
2608
+ *
2609
+ * @overload
2610
+ * @param {Compatible | undefined} [file]
2611
+ * @returns {Promise<VFileWithOutput<CompileResult>>}
2612
+ *
2613
+ * @param {Compatible | undefined} [file]
2614
+ * File (optional); typically `string` or `VFile`]; any value accepted as
2615
+ * `x` in `new VFile(x)`.
2616
+ * @param {ProcessCallback<VFileWithOutput<CompileResult>> | undefined} [done]
2617
+ * Callback (optional).
2618
+ * @returns {Promise<VFile> | undefined}
2619
+ * Nothing if `done` is given.
2620
+ * Otherwise a promise, rejected with a fatal error or resolved with the
2621
+ * processed file.
2622
+ *
2623
+ * The parsed, transformed, and compiled value is available at
2624
+ * `file.value` (see note).
2625
+ *
2626
+ * > **Note**: unified typically compiles by serializing: most
2627
+ * > compilers return `string` (or `Uint8Array`).
2628
+ * > Some compilers, such as the one configured with
2629
+ * > [`rehype-react`][rehype-react], return other values (in this case, a
2630
+ * > React tree).
2631
+ * > If you’re using a compiler that doesn’t serialize, expect different
2632
+ * > result values.
2633
+ * >
2634
+ * > To register custom results in TypeScript, add them to
2635
+ * > {@linkcode CompileResultMap}.
2636
+ *
2637
+ * [rehype-react]: https://github.com/rehypejs/rehype-react
2638
+ */
2639
+ process(file: Compatible | undefined, done: ProcessCallback<VFileWithOutput<CompileResult>>): undefined;
2640
+ /**
2641
+ * Process the given file as configured on the processor.
2642
+ *
2643
+ * > **Note**: `process` freezes the processor if not already *frozen*.
2644
+ *
2645
+ * > **Note**: `process` performs the parse, run, and stringify phases.
2646
+ *
2647
+ * @overload
2648
+ * @param {Compatible | undefined} file
2649
+ * @param {ProcessCallback<VFileWithOutput<CompileResult>>} done
2650
+ * @returns {undefined}
2651
+ *
2652
+ * @overload
2653
+ * @param {Compatible | undefined} [file]
2654
+ * @returns {Promise<VFileWithOutput<CompileResult>>}
2655
+ *
2656
+ * @param {Compatible | undefined} [file]
2657
+ * File (optional); typically `string` or `VFile`]; any value accepted as
2658
+ * `x` in `new VFile(x)`.
2659
+ * @param {ProcessCallback<VFileWithOutput<CompileResult>> | undefined} [done]
2660
+ * Callback (optional).
2661
+ * @returns {Promise<VFile> | undefined}
2662
+ * Nothing if `done` is given.
2663
+ * Otherwise a promise, rejected with a fatal error or resolved with the
2664
+ * processed file.
2665
+ *
2666
+ * The parsed, transformed, and compiled value is available at
2667
+ * `file.value` (see note).
2668
+ *
2669
+ * > **Note**: unified typically compiles by serializing: most
2670
+ * > compilers return `string` (or `Uint8Array`).
2671
+ * > Some compilers, such as the one configured with
2672
+ * > [`rehype-react`][rehype-react], return other values (in this case, a
2673
+ * > React tree).
2674
+ * > If you’re using a compiler that doesn’t serialize, expect different
2675
+ * > result values.
2676
+ * >
2677
+ * > To register custom results in TypeScript, add them to
2678
+ * > {@linkcode CompileResultMap}.
2679
+ *
2680
+ * [rehype-react]: https://github.com/rehypejs/rehype-react
2681
+ */
2682
+ process(file?: Compatible | undefined): Promise<VFileWithOutput<CompileResult>>;
2683
+ /**
2684
+ * Process the given file as configured on the processor.
2685
+ *
2686
+ * An error is thrown if asynchronous transforms are configured.
2687
+ *
2688
+ * > **Note**: `processSync` freezes the processor if not already *frozen*.
2689
+ *
2690
+ * > **Note**: `processSync` performs the parse, run, and stringify phases.
2691
+ *
2692
+ * @param {Compatible | undefined} [file]
2693
+ * File (optional); typically `string` or `VFile`; any value accepted as
2694
+ * `x` in `new VFile(x)`.
2695
+ * @returns {VFileWithOutput<CompileResult>}
2696
+ * The processed file.
2697
+ *
2698
+ * The parsed, transformed, and compiled value is available at
2699
+ * `file.value` (see note).
2700
+ *
2701
+ * > **Note**: unified typically compiles by serializing: most
2702
+ * > compilers return `string` (or `Uint8Array`).
2703
+ * > Some compilers, such as the one configured with
2704
+ * > [`rehype-react`][rehype-react], return other values (in this case, a
2705
+ * > React tree).
2706
+ * > If you’re using a compiler that doesn’t serialize, expect different
2707
+ * > result values.
2708
+ * >
2709
+ * > To register custom results in TypeScript, add them to
2710
+ * > {@linkcode CompileResultMap}.
2711
+ *
2712
+ * [rehype-react]: https://github.com/rehypejs/rehype-react
2713
+ */
2714
+ processSync(file?: Compatible | undefined): VFileWithOutput<CompileResult>;
2715
+ /**
2716
+ * Run *transformers* on a syntax tree.
2717
+ *
2718
+ * > **Note**: `run` freezes the processor if not already *frozen*.
2719
+ *
2720
+ * > **Note**: `run` performs the run phase, not other phases.
2721
+ *
2722
+ * @overload
2723
+ * @param {HeadTree extends undefined ? Node : HeadTree} tree
2724
+ * @param {RunCallback<TailTree extends undefined ? Node : TailTree>} done
2725
+ * @returns {undefined}
2726
+ *
2727
+ * @overload
2728
+ * @param {HeadTree extends undefined ? Node : HeadTree} tree
2729
+ * @param {Compatible | undefined} file
2730
+ * @param {RunCallback<TailTree extends undefined ? Node : TailTree>} done
2731
+ * @returns {undefined}
2732
+ *
2733
+ * @overload
2734
+ * @param {HeadTree extends undefined ? Node : HeadTree} tree
2735
+ * @param {Compatible | undefined} [file]
2736
+ * @returns {Promise<TailTree extends undefined ? Node : TailTree>}
2737
+ *
2738
+ * @param {HeadTree extends undefined ? Node : HeadTree} tree
2739
+ * Tree to transform and inspect.
2740
+ * @param {(
2741
+ * RunCallback<TailTree extends undefined ? Node : TailTree> |
2742
+ * Compatible
2743
+ * )} [file]
2744
+ * File associated with `node` (optional); any value accepted as `x` in
2745
+ * `new VFile(x)`.
2746
+ * @param {RunCallback<TailTree extends undefined ? Node : TailTree>} [done]
2747
+ * Callback (optional).
2748
+ * @returns {Promise<TailTree extends undefined ? Node : TailTree> | undefined}
2749
+ * Nothing if `done` is given.
2750
+ * Otherwise, a promise rejected with a fatal error or resolved with the
2751
+ * transformed tree.
2752
+ */
2753
+ run(tree: HeadTree extends undefined ? Node : HeadTree, done: RunCallback<TailTree extends undefined ? Node : TailTree>): undefined;
2754
+ /**
2755
+ * Run *transformers* on a syntax tree.
2756
+ *
2757
+ * > **Note**: `run` freezes the processor if not already *frozen*.
2758
+ *
2759
+ * > **Note**: `run` performs the run phase, not other phases.
2760
+ *
2761
+ * @overload
2762
+ * @param {HeadTree extends undefined ? Node : HeadTree} tree
2763
+ * @param {RunCallback<TailTree extends undefined ? Node : TailTree>} done
2764
+ * @returns {undefined}
2765
+ *
2766
+ * @overload
2767
+ * @param {HeadTree extends undefined ? Node : HeadTree} tree
2768
+ * @param {Compatible | undefined} file
2769
+ * @param {RunCallback<TailTree extends undefined ? Node : TailTree>} done
2770
+ * @returns {undefined}
2771
+ *
2772
+ * @overload
2773
+ * @param {HeadTree extends undefined ? Node : HeadTree} tree
2774
+ * @param {Compatible | undefined} [file]
2775
+ * @returns {Promise<TailTree extends undefined ? Node : TailTree>}
2776
+ *
2777
+ * @param {HeadTree extends undefined ? Node : HeadTree} tree
2778
+ * Tree to transform and inspect.
2779
+ * @param {(
2780
+ * RunCallback<TailTree extends undefined ? Node : TailTree> |
2781
+ * Compatible
2782
+ * )} [file]
2783
+ * File associated with `node` (optional); any value accepted as `x` in
2784
+ * `new VFile(x)`.
2785
+ * @param {RunCallback<TailTree extends undefined ? Node : TailTree>} [done]
2786
+ * Callback (optional).
2787
+ * @returns {Promise<TailTree extends undefined ? Node : TailTree> | undefined}
2788
+ * Nothing if `done` is given.
2789
+ * Otherwise, a promise rejected with a fatal error or resolved with the
2790
+ * transformed tree.
2791
+ */
2792
+ run(tree: HeadTree extends undefined ? Node : HeadTree, file: Compatible | undefined, done: RunCallback<TailTree extends undefined ? Node : TailTree>): undefined;
2793
+ /**
2794
+ * Run *transformers* on a syntax tree.
2795
+ *
2796
+ * > **Note**: `run` freezes the processor if not already *frozen*.
2797
+ *
2798
+ * > **Note**: `run` performs the run phase, not other phases.
2799
+ *
2800
+ * @overload
2801
+ * @param {HeadTree extends undefined ? Node : HeadTree} tree
2802
+ * @param {RunCallback<TailTree extends undefined ? Node : TailTree>} done
2803
+ * @returns {undefined}
2804
+ *
2805
+ * @overload
2806
+ * @param {HeadTree extends undefined ? Node : HeadTree} tree
2807
+ * @param {Compatible | undefined} file
2808
+ * @param {RunCallback<TailTree extends undefined ? Node : TailTree>} done
2809
+ * @returns {undefined}
2810
+ *
2811
+ * @overload
2812
+ * @param {HeadTree extends undefined ? Node : HeadTree} tree
2813
+ * @param {Compatible | undefined} [file]
2814
+ * @returns {Promise<TailTree extends undefined ? Node : TailTree>}
2815
+ *
2816
+ * @param {HeadTree extends undefined ? Node : HeadTree} tree
2817
+ * Tree to transform and inspect.
2818
+ * @param {(
2819
+ * RunCallback<TailTree extends undefined ? Node : TailTree> |
2820
+ * Compatible
2821
+ * )} [file]
2822
+ * File associated with `node` (optional); any value accepted as `x` in
2823
+ * `new VFile(x)`.
2824
+ * @param {RunCallback<TailTree extends undefined ? Node : TailTree>} [done]
2825
+ * Callback (optional).
2826
+ * @returns {Promise<TailTree extends undefined ? Node : TailTree> | undefined}
2827
+ * Nothing if `done` is given.
2828
+ * Otherwise, a promise rejected with a fatal error or resolved with the
2829
+ * transformed tree.
2830
+ */
2831
+ run(tree: HeadTree extends undefined ? Node : HeadTree, file?: Compatible | undefined): Promise<TailTree extends undefined ? Node : TailTree>;
2832
+ /**
2833
+ * Run *transformers* on a syntax tree.
2834
+ *
2835
+ * An error is thrown if asynchronous transforms are configured.
2836
+ *
2837
+ * > **Note**: `runSync` freezes the processor if not already *frozen*.
2838
+ *
2839
+ * > **Note**: `runSync` performs the run phase, not other phases.
2840
+ *
2841
+ * @param {HeadTree extends undefined ? Node : HeadTree} tree
2842
+ * Tree to transform and inspect.
2843
+ * @param {Compatible | undefined} [file]
2844
+ * File associated with `node` (optional); any value accepted as `x` in
2845
+ * `new VFile(x)`.
2846
+ * @returns {TailTree extends undefined ? Node : TailTree}
2847
+ * Transformed tree.
2848
+ */
2849
+ runSync(tree: HeadTree extends undefined ? Node : HeadTree, file?: Compatible | undefined): TailTree extends undefined ? Node : TailTree;
2850
+ /**
2851
+ * Compile a syntax tree.
2852
+ *
2853
+ * > **Note**: `stringify` freezes the processor if not already *frozen*.
2854
+ *
2855
+ * > **Note**: `stringify` performs the stringify phase, not the run phase
2856
+ * > or other phases.
2857
+ *
2858
+ * @param {CompileTree extends undefined ? Node : CompileTree} tree
2859
+ * Tree to compile.
2860
+ * @param {Compatible | undefined} [file]
2861
+ * File associated with `node` (optional); any value accepted as `x` in
2862
+ * `new VFile(x)`.
2863
+ * @returns {CompileResult extends undefined ? Value : CompileResult}
2864
+ * Textual representation of the tree (see note).
2865
+ *
2866
+ * > **Note**: unified typically compiles by serializing: most compilers
2867
+ * > return `string` (or `Uint8Array`).
2868
+ * > Some compilers, such as the one configured with
2869
+ * > [`rehype-react`][rehype-react], return other values (in this case, a
2870
+ * > React tree).
2871
+ * > If you’re using a compiler that doesn’t serialize, expect different
2872
+ * > result values.
2873
+ * >
2874
+ * > To register custom results in TypeScript, add them to
2875
+ * > {@linkcode CompileResultMap}.
2876
+ *
2877
+ * [rehype-react]: https://github.com/rehypejs/rehype-react
2878
+ */
2879
+ stringify(tree: CompileTree extends undefined ? Node : CompileTree, file?: Compatible | undefined): CompileResult extends undefined ? Value : CompileResult;
2880
+ /**
2881
+ * Configure the processor to use a plugin, a list of usable values, or a
2882
+ * preset.
2883
+ *
2884
+ * If the processor is already using a plugin, the previous plugin
2885
+ * configuration is changed based on the options that are passed in.
2886
+ * In other words, the plugin is not added a second time.
2887
+ *
2888
+ * > **Note**: `use` cannot be called on *frozen* processors.
2889
+ * > Call the processor first to create a new unfrozen processor.
2890
+ *
2891
+ * @example
2892
+ * There are many ways to pass plugins to `.use()`.
2893
+ * This example gives an overview:
2894
+ *
2895
+ * ```js
2896
+ * import {unified} from 'unified'
2897
+ *
2898
+ * unified()
2899
+ * // Plugin with options:
2900
+ * .use(pluginA, {x: true, y: true})
2901
+ * // Passing the same plugin again merges configuration (to `{x: true, y: false, z: true}`):
2902
+ * .use(pluginA, {y: false, z: true})
2903
+ * // Plugins:
2904
+ * .use([pluginB, pluginC])
2905
+ * // Two plugins, the second with options:
2906
+ * .use([pluginD, [pluginE, {}]])
2907
+ * // Preset with plugins and settings:
2908
+ * .use({plugins: [pluginF, [pluginG, {}]], settings: {position: false}})
2909
+ * // Settings only:
2910
+ * .use({settings: {position: false}})
2911
+ * ```
2912
+ *
2913
+ * @template {Array<unknown>} [Parameters=[]]
2914
+ * @template {Node | string | undefined} [Input=undefined]
2915
+ * @template [Output=Input]
2916
+ *
2917
+ * @overload
2918
+ * @param {Preset | null | undefined} [preset]
2919
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
2920
+ *
2921
+ * @overload
2922
+ * @param {PluggableList} list
2923
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
2924
+ *
2925
+ * @overload
2926
+ * @param {Plugin<Parameters, Input, Output>} plugin
2927
+ * @param {...(Parameters | [boolean])} parameters
2928
+ * @returns {UsePlugin<ParseTree, HeadTree, TailTree, CompileTree, CompileResult, Input, Output>}
2929
+ *
2930
+ * @param {PluggableList | Plugin | Preset | null | undefined} value
2931
+ * Usable value.
2932
+ * @param {...unknown} parameters
2933
+ * Parameters, when a plugin is given as a usable value.
2934
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
2935
+ * Current processor.
2936
+ */
2937
+ use<Parameters_1 extends unknown[] = [], Input extends string | Node$1 | undefined = undefined, Output = Input>(preset?: Preset | null | undefined): Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>;
2938
+ /**
2939
+ * Configure the processor to use a plugin, a list of usable values, or a
2940
+ * preset.
2941
+ *
2942
+ * If the processor is already using a plugin, the previous plugin
2943
+ * configuration is changed based on the options that are passed in.
2944
+ * In other words, the plugin is not added a second time.
2945
+ *
2946
+ * > **Note**: `use` cannot be called on *frozen* processors.
2947
+ * > Call the processor first to create a new unfrozen processor.
2948
+ *
2949
+ * @example
2950
+ * There are many ways to pass plugins to `.use()`.
2951
+ * This example gives an overview:
2952
+ *
2953
+ * ```js
2954
+ * import {unified} from 'unified'
2955
+ *
2956
+ * unified()
2957
+ * // Plugin with options:
2958
+ * .use(pluginA, {x: true, y: true})
2959
+ * // Passing the same plugin again merges configuration (to `{x: true, y: false, z: true}`):
2960
+ * .use(pluginA, {y: false, z: true})
2961
+ * // Plugins:
2962
+ * .use([pluginB, pluginC])
2963
+ * // Two plugins, the second with options:
2964
+ * .use([pluginD, [pluginE, {}]])
2965
+ * // Preset with plugins and settings:
2966
+ * .use({plugins: [pluginF, [pluginG, {}]], settings: {position: false}})
2967
+ * // Settings only:
2968
+ * .use({settings: {position: false}})
2969
+ * ```
2970
+ *
2971
+ * @template {Array<unknown>} [Parameters=[]]
2972
+ * @template {Node | string | undefined} [Input=undefined]
2973
+ * @template [Output=Input]
2974
+ *
2975
+ * @overload
2976
+ * @param {Preset | null | undefined} [preset]
2977
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
2978
+ *
2979
+ * @overload
2980
+ * @param {PluggableList} list
2981
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
2982
+ *
2983
+ * @overload
2984
+ * @param {Plugin<Parameters, Input, Output>} plugin
2985
+ * @param {...(Parameters | [boolean])} parameters
2986
+ * @returns {UsePlugin<ParseTree, HeadTree, TailTree, CompileTree, CompileResult, Input, Output>}
2987
+ *
2988
+ * @param {PluggableList | Plugin | Preset | null | undefined} value
2989
+ * Usable value.
2990
+ * @param {...unknown} parameters
2991
+ * Parameters, when a plugin is given as a usable value.
2992
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
2993
+ * Current processor.
2994
+ */
2995
+ use<Parameters_1 extends unknown[] = [], Input extends string | Node$1 | undefined = undefined, Output = Input>(list: PluggableList): Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>;
2996
+ /**
2997
+ * Configure the processor to use a plugin, a list of usable values, or a
2998
+ * preset.
2999
+ *
3000
+ * If the processor is already using a plugin, the previous plugin
3001
+ * configuration is changed based on the options that are passed in.
3002
+ * In other words, the plugin is not added a second time.
3003
+ *
3004
+ * > **Note**: `use` cannot be called on *frozen* processors.
3005
+ * > Call the processor first to create a new unfrozen processor.
3006
+ *
3007
+ * @example
3008
+ * There are many ways to pass plugins to `.use()`.
3009
+ * This example gives an overview:
3010
+ *
3011
+ * ```js
3012
+ * import {unified} from 'unified'
3013
+ *
3014
+ * unified()
3015
+ * // Plugin with options:
3016
+ * .use(pluginA, {x: true, y: true})
3017
+ * // Passing the same plugin again merges configuration (to `{x: true, y: false, z: true}`):
3018
+ * .use(pluginA, {y: false, z: true})
3019
+ * // Plugins:
3020
+ * .use([pluginB, pluginC])
3021
+ * // Two plugins, the second with options:
3022
+ * .use([pluginD, [pluginE, {}]])
3023
+ * // Preset with plugins and settings:
3024
+ * .use({plugins: [pluginF, [pluginG, {}]], settings: {position: false}})
3025
+ * // Settings only:
3026
+ * .use({settings: {position: false}})
3027
+ * ```
3028
+ *
3029
+ * @template {Array<unknown>} [Parameters=[]]
3030
+ * @template {Node | string | undefined} [Input=undefined]
3031
+ * @template [Output=Input]
3032
+ *
3033
+ * @overload
3034
+ * @param {Preset | null | undefined} [preset]
3035
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
3036
+ *
3037
+ * @overload
3038
+ * @param {PluggableList} list
3039
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
3040
+ *
3041
+ * @overload
3042
+ * @param {Plugin<Parameters, Input, Output>} plugin
3043
+ * @param {...(Parameters | [boolean])} parameters
3044
+ * @returns {UsePlugin<ParseTree, HeadTree, TailTree, CompileTree, CompileResult, Input, Output>}
3045
+ *
3046
+ * @param {PluggableList | Plugin | Preset | null | undefined} value
3047
+ * Usable value.
3048
+ * @param {...unknown} parameters
3049
+ * Parameters, when a plugin is given as a usable value.
3050
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
3051
+ * Current processor.
3052
+ */
3053
+ use<Parameters_1 extends unknown[] = [], Input extends string | Node$1 | undefined = undefined, Output = Input>(plugin: Plugin<Parameters_1, Input, Output>, ...parameters: Parameters_1 | [boolean]): UsePlugin<ParseTree, HeadTree, TailTree, CompileTree, CompileResult, Input, Output>;
3054
+ }
3055
+ type Pipeline = Pipeline$1;
3056
+ type Node = Node$1;
3057
+ type Compatible = Compatible$1;
3058
+ type Value = Value$1;
3059
+ type CompileResultMap$1 = CompileResultMap;
3060
+ type Data$1 = Data;
3061
+ type Settings$1 = Settings;
3062
+ /**
3063
+ * Acceptable results from compilers.
3064
+ *
3065
+ * To register custom results, add them to
3066
+ * {@linkcode CompileResultMap }.
3067
+ */
3068
+ type CompileResults = CompileResultMap$1[keyof CompileResultMap$1];
3069
+ /**
3070
+ * A **compiler** handles the compiling of a syntax tree to something else
3071
+ * (in most cases, text) (TypeScript type).
3072
+ *
3073
+ * It is used in the stringify phase and called with a {@linkcode Node }
3074
+ * and {@linkcode VFile } representation of the document to compile.
3075
+ * It should return the textual representation of the given tree (typically
3076
+ * `string`).
3077
+ *
3078
+ * > **Note**: unified typically compiles by serializing: most compilers
3079
+ * > return `string` (or `Uint8Array`).
3080
+ * > Some compilers, such as the one configured with
3081
+ * > [`rehype-react`][rehype-react], return other values (in this case, a
3082
+ * > React tree).
3083
+ * > If you’re using a compiler that doesn’t serialize, expect different
3084
+ * > result values.
3085
+ * >
3086
+ * > To register custom results in TypeScript, add them to
3087
+ * > {@linkcode CompileResultMap }.
3088
+ *
3089
+ * [rehype-react]: https://github.com/rehypejs/rehype-react
3090
+ */
3091
+ type Compiler<Tree extends Node$1 = Node$1, Result extends CompileResults = CompileResults> = (tree: Tree, file: VFile) => Result;
3092
+ /**
3093
+ * A **parser** handles the parsing of text to a syntax tree.
3094
+ *
3095
+ * It is used in the parse phase and is called with a `string` and
3096
+ * {@linkcode VFile } of the document to parse.
3097
+ * It must return the syntax tree representation of the given file
3098
+ * ({@linkcode Node }).
3099
+ */
3100
+ type Parser<Tree extends Node$1 = Node$1> = (document: string, file: VFile) => Tree;
3101
+ /**
3102
+ * Union of the different ways to add plugins and settings.
3103
+ */
3104
+ type Pluggable = (Plugin<Array<any>, any, any> | PluginTuple<Array<any>, any, any> | Preset);
3105
+ /**
3106
+ * List of plugins and presets.
3107
+ */
3108
+ type PluggableList = Array<Pluggable>;
3109
+ /**
3110
+ * Single plugin.
3111
+ *
3112
+ * Plugins configure the processors they are applied on in the following
3113
+ * ways:
3114
+ *
3115
+ * * they change the processor, such as the parser, the compiler, or by
3116
+ * configuring data
3117
+ * * they specify how to handle trees and files
3118
+ *
3119
+ * In practice, they are functions that can receive options and configure the
3120
+ * processor (`this`).
3121
+ *
3122
+ * > **Note**: plugins are called when the processor is *frozen*, not when
3123
+ * > they are applied.
3124
+ */
3125
+ type Plugin<PluginParameters extends unknown[] = [], Input extends string | Node$1 | undefined = Node$1, Output = Input> = ((this: Processor, ...parameters: PluginParameters) => Input extends string ? Output extends Node | undefined ? undefined | void : never : Output extends CompileResults ? Input extends Node | undefined ? undefined | void : never : Transformer<Input extends Node ? Input : Node, Output extends Node ? Output : Node> | undefined | void);
3126
+ /**
3127
+ * Tuple of a plugin and its configuration.
3128
+ *
3129
+ * The first item is a plugin, the rest are its parameters.
3130
+ */
3131
+ type PluginTuple<TupleParameters extends unknown[] = [], Input extends string | Node$1 | undefined = undefined, Output = undefined> = ([plugin: Plugin<TupleParameters, Input, Output>, ...parameters: TupleParameters]);
3132
+ /**
3133
+ * Sharable configuration.
3134
+ *
3135
+ * They can contain plugins and settings.
3136
+ */
3137
+ type Preset = {
3138
+ /**
3139
+ * List of plugins and presets (optional).
3140
+ */
3141
+ plugins?: PluggableList | undefined;
3142
+ /**
3143
+ * Shared settings for parsers and compilers (optional).
3144
+ */
3145
+ settings?: Settings$1 | undefined;
3146
+ };
3147
+ /**
3148
+ * Callback called when the process is done.
3149
+ *
3150
+ * Called with either an error or a result.
3151
+ */
3152
+ type ProcessCallback<File extends VFile = VFile> = (error?: Error | undefined, file?: File | undefined) => undefined;
3153
+ /**
3154
+ * Callback called when transformers are done.
3155
+ *
3156
+ * Called with either an error or results.
3157
+ */
3158
+ type RunCallback<Tree extends Node$1 = Node$1> = (error?: Error | undefined, tree?: Tree | undefined, file?: VFile | undefined) => undefined;
3159
+ /**
3160
+ * Callback passed to transforms.
3161
+ *
3162
+ * If the signature of a `transformer` accepts a third argument, the
3163
+ * transformer may perform asynchronous operations, and must call it.
3164
+ */
3165
+ type TransformCallback<Output extends Node$1 = Node$1> = (error?: Error | undefined, tree?: Output | undefined, file?: VFile | undefined) => undefined;
3166
+ /**
3167
+ * Transformers handle syntax trees and files.
3168
+ *
3169
+ * They are functions that are called each time a syntax tree and file are
3170
+ * passed through the run phase.
3171
+ * When an error occurs in them (either because it’s thrown, returned,
3172
+ * rejected, or passed to `next`), the process stops.
3173
+ *
3174
+ * The run phase is handled by [`trough`][trough], see its documentation for
3175
+ * the exact semantics of these functions.
3176
+ *
3177
+ * > **Note**: you should likely ignore `next`: don’t accept it.
3178
+ * > it supports callback-style async work.
3179
+ * > But promises are likely easier to reason about.
3180
+ *
3181
+ * [trough]: https://github.com/wooorm/trough#function-fninput-next
3182
+ */
3183
+ type Transformer<Input extends Node$1 = Node$1, Output extends Node$1 = Input> = (tree: Input, file: VFile, next: TransformCallback<Output>) => (Promise<Output | undefined | void> | Promise<never> | // For some reason this is needed separately.
3184
+ Output | Error | undefined | void);
3185
+ /**
3186
+ * Create a processor based on the input/output of a {@link Plugin plugin}.
3187
+ */
3188
+ type UsePlugin<ParseTree extends Node$1 | undefined, HeadTree extends Node$1 | undefined, TailTree extends Node$1 | undefined, CompileTree extends Node$1 | undefined, CompileResult extends CompileResults | undefined, Input extends string | Node$1 | undefined, Output> = (Input extends string ? Output extends Node | undefined ? Processor<Output extends undefined ? ParseTree : Output, HeadTree, TailTree, CompileTree, CompileResult> : Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult> : Output extends CompileResults ? Input extends Node | undefined ? Processor<ParseTree, HeadTree, TailTree, Input extends undefined ? CompileTree : Input, Output extends undefined ? CompileResult : Output> : Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult> : Input extends Node | undefined ? Output extends Node | undefined ? Processor<ParseTree, HeadTree extends undefined ? Input : HeadTree, Output extends undefined ? TailTree : Output, CompileTree, CompileResult> : Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult> : Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>);
3189
+ /**
3190
+ * Type to generate a {@linkcode VFile } corresponding to a compiler result.
3191
+ *
3192
+ * If a result that is not acceptable on a `VFile` is used, that will
3193
+ * be stored on the `result` field of {@linkcode VFile }.
3194
+ */
3195
+ type VFileWithOutput<Result extends CompileResults | undefined> = (Result extends Value | undefined ? VFile : VFile & {
3196
+ result: Result;
3197
+ });
3198
+ //#endregion
3199
+ //#region ../../node_modules/.bun/unified@11.0.5/node_modules/unified/index.d.ts
3200
+ // See: <https://github.com/sindresorhus/type-fest/blob/main/source/empty-object.d.ts>
3201
+ declare const emptyObjectSymbol: unique symbol;
3202
+ /**
3203
+ * Interface of known results from compilers.
3204
+ *
3205
+ * Normally, compilers result in text ({@linkcode Value} of `vfile`).
3206
+ * When you compile to something else, such as a React node (as in,
3207
+ * `rehype-react`), you can augment this interface to include that type.
3208
+ *
3209
+ * ```ts
3210
+ * import type {ReactNode} from 'somewhere'
3211
+ *
3212
+ * declare module 'unified' {
3213
+ * interface CompileResultMap {
3214
+ * // Register a new result (value is used, key should match it).
3215
+ * ReactNode: ReactNode
3216
+ * }
3217
+ * }
3218
+ *
3219
+ * export {} // You may not need this, but it makes sure the file is a module.
3220
+ * ```
3221
+ *
3222
+ * Use {@linkcode CompileResults} to access the values.
3223
+ */
3224
+ interface CompileResultMap {
3225
+ // Note: if `Value` from `VFile` is changed, this should too.
3226
+ Uint8Array: Uint8Array;
3227
+ string: string;
3228
+ }
3229
+ /**
3230
+ * Interface of known data that can be supported by all plugins.
3231
+ *
3232
+ * Typically, options can be given to a specific plugin, but sometimes it makes
3233
+ * sense to have information shared with several plugins.
3234
+ * For example, a list of HTML elements that are self-closing, which is needed
3235
+ * during all phases.
3236
+ *
3237
+ * To type this, do something like:
3238
+ *
3239
+ * ```ts
3240
+ * declare module 'unified' {
3241
+ * interface Data {
3242
+ * htmlVoidElements?: Array<string> | undefined
3243
+ * }
3244
+ * }
3245
+ *
3246
+ * export {} // You may not need this, but it makes sure the file is a module.
3247
+ * ```
3248
+ */
3249
+ interface Data {
3250
+ settings?: Settings | undefined;
3251
+ }
3252
+ /**
3253
+ * Interface of known extra options, that can be supported by parser and
3254
+ * compilers.
3255
+ *
3256
+ * This exists so that users can use packages such as `remark`, which configure
3257
+ * both parsers and compilers (in this case `remark-parse` and
3258
+ * `remark-stringify`), and still provide options for them.
3259
+ *
3260
+ * When you make parsers or compilers, that could be packaged up together,
3261
+ * you should support `this.data('settings')` as input and merge it with
3262
+ * explicitly passed `options`.
3263
+ * Then, to type it, using `remark-stringify` as an example, do something like:
3264
+ *
3265
+ * ```ts
3266
+ * declare module 'unified' {
3267
+ * interface Settings {
3268
+ * bullet: '*' | '+' | '-'
3269
+ * // …
3270
+ * }
3271
+ * }
3272
+ *
3273
+ * export {} // You may not need this, but it makes sure the file is a module.
3274
+ * ```
3275
+ */
3276
+ interface Settings {
3277
+ [emptyObjectSymbol]?: never;
3278
+ }
3279
+ //#endregion
3280
+ //#region src/core/shiki.d.ts
3281
+ type ImprensaShikiOptions = false | ({
3282
+ themes?: Record<string, string>; /** Shiki grammars — only these are loaded at build and in the browser highlighter. */
3283
+ langs?: string[]; /** Set `false` to disable the browser `imprensa/shiki` bundle. Default: true. */
3284
+ clientShiki?: boolean;
3285
+ twoslash?: boolean;
3286
+ transformers?: PluggableList;
3287
+ } & Record<string, string | number | boolean | string[] | Record<string, string> | PluggableList | undefined>);
3288
+ //#endregion
3289
+ export { ImprensaShikiOptions as t };