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