@reslide-dev/mdx 0.0.1

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,4326 @@
1
+ //#region ../../node_modules/.pnpm/@types+unist@3.0.3/node_modules/@types/unist/index.d.ts
2
+ // ## Interfaces
3
+ /**
4
+ * Info associated with nodes by the ecosystem.
5
+ *
6
+ * This space is guaranteed to never be specified by unist or specifications
7
+ * implementing unist.
8
+ * But you can use it in utilities and plugins to store data.
9
+ *
10
+ * This type can be augmented to register custom data.
11
+ * For example:
12
+ *
13
+ * ```ts
14
+ * declare module 'unist' {
15
+ * interface Data {
16
+ * // `someNode.data.myId` is typed as `number | undefined`
17
+ * myId?: number | undefined
18
+ * }
19
+ * }
20
+ * ```
21
+ */
22
+ interface Data$4 {}
23
+ /**
24
+ * One place in a source file.
25
+ */
26
+ interface Point {
27
+ /**
28
+ * Line in a source file (1-indexed integer).
29
+ */
30
+ line: number;
31
+ /**
32
+ * Column in a source file (1-indexed integer).
33
+ */
34
+ column: number;
35
+ /**
36
+ * Character in a source file (0-indexed integer).
37
+ */
38
+ offset?: number | undefined;
39
+ }
40
+ /**
41
+ * Position of a node in a source document.
42
+ *
43
+ * A position is a range between two points.
44
+ */
45
+ interface Position {
46
+ /**
47
+ * Place of the first character of the parsed source region.
48
+ */
49
+ start: Point;
50
+ /**
51
+ * Place of the first character after the parsed source region.
52
+ */
53
+ end: Point;
54
+ }
55
+ /**
56
+ * Abstract unist node.
57
+ *
58
+ * The syntactic unit in unist syntax trees are called nodes.
59
+ *
60
+ * This interface is supposed to be extended.
61
+ * If you can use {@link Literal} or {@link Parent}, you should.
62
+ * But for example in markdown, a `thematicBreak` (`***`), is neither literal
63
+ * nor parent, but still a node.
64
+ */
65
+ interface Node$2 {
66
+ /**
67
+ * Node type.
68
+ */
69
+ type: string;
70
+ /**
71
+ * Info from the ecosystem.
72
+ */
73
+ data?: Data$4 | undefined;
74
+ /**
75
+ * Position of a node in a source document.
76
+ *
77
+ * Nodes that are generated (not in the original source document) must not
78
+ * have a position.
79
+ */
80
+ position?: Position | undefined;
81
+ }
82
+ //#endregion
83
+ //#region ../../node_modules/.pnpm/@types+mdast@4.0.4/node_modules/@types/mdast/index.d.ts
84
+ // ## Enumeration
85
+ /**
86
+ * How phrasing content is aligned
87
+ * ({@link https://drafts.csswg.org/css-text/ | [CSSTEXT]}).
88
+ *
89
+ * * `'left'`: See the
90
+ * {@link https://drafts.csswg.org/css-text/#valdef-text-align-left | left}
91
+ * value of the `text-align` CSS property
92
+ * * `'right'`: See the
93
+ * {@link https://drafts.csswg.org/css-text/#valdef-text-align-right | right}
94
+ * value of the `text-align` CSS property
95
+ * * `'center'`: See the
96
+ * {@link https://drafts.csswg.org/css-text/#valdef-text-align-center | center}
97
+ * value of the `text-align` CSS property
98
+ * * `null`: phrasing content is aligned as defined by the host environment
99
+ *
100
+ * Used in GFM tables.
101
+ */
102
+ type AlignType = "center" | "left" | "right" | null;
103
+ /**
104
+ * Explicitness of a reference.
105
+ *
106
+ * `'shortcut'`: the reference is implicit, its identifier inferred from its
107
+ * content
108
+ * `'collapsed'`: the reference is explicit, its identifier inferred from its
109
+ * content
110
+ * `'full'`: the reference is explicit, its identifier explicitly set
111
+ */
112
+ type ReferenceType = "shortcut" | "collapsed" | "full";
113
+ // ## Mixin
114
+ /**
115
+ * Node with a fallback.
116
+ */
117
+ interface Alternative {
118
+ /**
119
+ * Equivalent content for environments that cannot represent the node as
120
+ * intended.
121
+ */
122
+ alt?: string | null | undefined;
123
+ }
124
+ /**
125
+ * Internal relation from one node to another.
126
+ *
127
+ * Whether the value of `identifier` is expected to be a unique identifier or
128
+ * not depends on the type of node including the Association.
129
+ * An example of this is that they should be unique on {@link Definition},
130
+ * whereas multiple {@link LinkReference}s can be non-unique to be associated
131
+ * with one definition.
132
+ */
133
+ interface Association {
134
+ /**
135
+ * Relation of association.
136
+ *
137
+ * `identifier` is a source value: character escapes and character
138
+ * references are not parsed.
139
+ *
140
+ * It can match another node.
141
+ *
142
+ * Its value must be normalized.
143
+ * To normalize a value, collapse markdown whitespace (`[\t\n\r ]+`) to a space,
144
+ * trim the optional initial and/or final space, and perform Unicode-aware
145
+ * case-folding.
146
+ */
147
+ identifier: string;
148
+ /**
149
+ * Relation of association, in parsed form.
150
+ *
151
+ * `label` is a `string` value: it works just like `title` on {@link Link}
152
+ * or a `lang` on {@link Code}: character escapes and character references
153
+ * are parsed.
154
+ *
155
+ * It can match another node.
156
+ */
157
+ label?: string | null | undefined;
158
+ }
159
+ /**
160
+ * Marker that is associated to another node.
161
+ */
162
+ interface Reference extends Association {
163
+ /**
164
+ * Explicitness of the reference.
165
+ */
166
+ referenceType: ReferenceType;
167
+ }
168
+ /**
169
+ * Reference to resource.
170
+ */
171
+ interface Resource {
172
+ /**
173
+ * URL to the referenced resource.
174
+ */
175
+ url: string;
176
+ /**
177
+ * Advisory information for the resource, such as would be appropriate for
178
+ * a tooltip.
179
+ */
180
+ title?: string | null | undefined;
181
+ }
182
+ // ## Interfaces
183
+ /**
184
+ * Info associated with mdast nodes by the ecosystem.
185
+ *
186
+ * This space is guaranteed to never be specified by unist or mdast.
187
+ * But you can use it in utilities and plugins to store data.
188
+ *
189
+ * This type can be augmented to register custom data.
190
+ * For example:
191
+ *
192
+ * ```ts
193
+ * declare module 'mdast' {
194
+ * interface Data {
195
+ * // `someNode.data.myId` is typed as `number | undefined`
196
+ * myId?: number | undefined
197
+ * }
198
+ * }
199
+ * ```
200
+ */
201
+ interface Data$3 extends Data$4 {}
202
+ // ## Content maps
203
+ /**
204
+ * Union of registered mdast nodes that can occur where block content is
205
+ * expected.
206
+ *
207
+ * To register custom mdast nodes, add them to {@link BlockContentMap}.
208
+ * They will be automatically added here.
209
+ */
210
+ type BlockContent = BlockContentMap[keyof BlockContentMap];
211
+ /**
212
+ * Registry of all mdast nodes that can occur where {@link BlockContent} is
213
+ * expected.
214
+ *
215
+ * This interface can be augmented to register custom node types:
216
+ *
217
+ * ```ts
218
+ * declare module 'mdast' {
219
+ * interface BlockContentMap {
220
+ * // Allow using MDX ESM nodes defined by `remark-mdx`.
221
+ * mdxjsEsm: MdxjsEsm;
222
+ * }
223
+ * }
224
+ * ```
225
+ *
226
+ * For a union of all block content, see {@link RootContent}.
227
+ */
228
+ interface BlockContentMap {
229
+ blockquote: Blockquote;
230
+ code: Code;
231
+ heading: Heading;
232
+ html: Html;
233
+ list: List;
234
+ paragraph: Paragraph;
235
+ table: Table;
236
+ thematicBreak: ThematicBreak;
237
+ }
238
+ /**
239
+ * Union of registered mdast nodes that can occur where definition content is
240
+ * expected.
241
+ *
242
+ * To register custom mdast nodes, add them to {@link DefinitionContentMap}.
243
+ * They will be automatically added here.
244
+ */
245
+ type DefinitionContent = DefinitionContentMap[keyof DefinitionContentMap];
246
+ /**
247
+ * Registry of all mdast nodes that can occur where {@link DefinitionContent}
248
+ * is expected.
249
+ *
250
+ * This interface can be augmented to register custom node types:
251
+ *
252
+ * ```ts
253
+ * declare module 'mdast' {
254
+ * interface DefinitionContentMap {
255
+ * custom: Custom;
256
+ * }
257
+ * }
258
+ * ```
259
+ *
260
+ * For a union of all definition content, see {@link RootContent}.
261
+ */
262
+ interface DefinitionContentMap {
263
+ definition: Definition;
264
+ footnoteDefinition: FootnoteDefinition;
265
+ }
266
+ /**
267
+ * Union of registered mdast nodes that can occur where list content is
268
+ * expected.
269
+ *
270
+ * To register custom mdast nodes, add them to {@link ListContentMap}.
271
+ * They will be automatically added here.
272
+ */
273
+ type ListContent = ListContentMap[keyof ListContentMap];
274
+ /**
275
+ * Registry of all mdast nodes that can occur where {@link ListContent}
276
+ * is expected.
277
+ *
278
+ * This interface can be augmented to register custom node types:
279
+ *
280
+ * ```ts
281
+ * declare module 'mdast' {
282
+ * interface ListContentMap {
283
+ * custom: Custom;
284
+ * }
285
+ * }
286
+ * ```
287
+ *
288
+ * For a union of all list content, see {@link RootContent}.
289
+ */
290
+ interface ListContentMap {
291
+ listItem: ListItem;
292
+ }
293
+ /**
294
+ * Union of registered mdast nodes that can occur where phrasing content is
295
+ * expected.
296
+ *
297
+ * To register custom mdast nodes, add them to {@link PhrasingContentMap}.
298
+ * They will be automatically added here.
299
+ */
300
+ type PhrasingContent = PhrasingContentMap[keyof PhrasingContentMap];
301
+ /**
302
+ * Registry of all mdast nodes that can occur where {@link PhrasingContent}
303
+ * is expected.
304
+ *
305
+ * This interface can be augmented to register custom node types:
306
+ *
307
+ * ```ts
308
+ * declare module 'mdast' {
309
+ * interface PhrasingContentMap {
310
+ * // Allow using MDX JSX (text) nodes defined by `remark-mdx`.
311
+ * mdxJsxTextElement: MDXJSXTextElement;
312
+ * }
313
+ * }
314
+ * ```
315
+ *
316
+ * For a union of all phrasing content, see {@link RootContent}.
317
+ */
318
+ interface PhrasingContentMap {
319
+ break: Break;
320
+ delete: Delete;
321
+ emphasis: Emphasis;
322
+ footnoteReference: FootnoteReference;
323
+ html: Html;
324
+ image: Image;
325
+ imageReference: ImageReference;
326
+ inlineCode: InlineCode;
327
+ link: Link;
328
+ linkReference: LinkReference;
329
+ strong: Strong;
330
+ text: Text;
331
+ }
332
+ /**
333
+ * Union of registered mdast nodes that can occur in {@link Root}.
334
+ *
335
+ * To register custom mdast nodes, add them to {@link RootContentMap}.
336
+ * They will be automatically added here.
337
+ */
338
+ type RootContent = RootContentMap[keyof RootContentMap];
339
+ /**
340
+ * Registry of all mdast nodes that can occur as children of {@link Root}.
341
+ *
342
+ * > **Note**: {@link Root} does not need to be an entire document.
343
+ * > it can also be a fragment.
344
+ *
345
+ * This interface can be augmented to register custom node types:
346
+ *
347
+ * ```ts
348
+ * declare module 'mdast' {
349
+ * interface RootContentMap {
350
+ * // Allow using toml nodes defined by `remark-frontmatter`.
351
+ * toml: TOML;
352
+ * }
353
+ * }
354
+ * ```
355
+ *
356
+ * For a union of all {@link Root} children, see {@link RootContent}.
357
+ */
358
+ interface RootContentMap {
359
+ blockquote: Blockquote;
360
+ break: Break;
361
+ code: Code;
362
+ definition: Definition;
363
+ delete: Delete;
364
+ emphasis: Emphasis;
365
+ footnoteDefinition: FootnoteDefinition;
366
+ footnoteReference: FootnoteReference;
367
+ heading: Heading;
368
+ html: Html;
369
+ image: Image;
370
+ imageReference: ImageReference;
371
+ inlineCode: InlineCode;
372
+ link: Link;
373
+ linkReference: LinkReference;
374
+ list: List;
375
+ listItem: ListItem;
376
+ paragraph: Paragraph;
377
+ strong: Strong;
378
+ table: Table;
379
+ tableCell: TableCell;
380
+ tableRow: TableRow;
381
+ text: Text;
382
+ thematicBreak: ThematicBreak;
383
+ yaml: Yaml;
384
+ }
385
+ /**
386
+ * Union of registered mdast nodes that can occur where row content is
387
+ * expected.
388
+ *
389
+ * To register custom mdast nodes, add them to {@link RowContentMap}.
390
+ * They will be automatically added here.
391
+ */
392
+ type RowContent = RowContentMap[keyof RowContentMap];
393
+ /**
394
+ * Registry of all mdast nodes that can occur where {@link RowContent}
395
+ * is expected.
396
+ *
397
+ * This interface can be augmented to register custom node types:
398
+ *
399
+ * ```ts
400
+ * declare module 'mdast' {
401
+ * interface RowContentMap {
402
+ * custom: Custom;
403
+ * }
404
+ * }
405
+ * ```
406
+ *
407
+ * For a union of all row content, see {@link RootContent}.
408
+ */
409
+ interface RowContentMap {
410
+ tableCell: TableCell;
411
+ }
412
+ /**
413
+ * Union of registered mdast nodes that can occur where table content is
414
+ * expected.
415
+ *
416
+ * To register custom mdast nodes, add them to {@link TableContentMap}.
417
+ * They will be automatically added here.
418
+ */
419
+ type TableContent = TableContentMap[keyof TableContentMap];
420
+ /**
421
+ * Registry of all mdast nodes that can occur where {@link TableContent}
422
+ * is expected.
423
+ *
424
+ * This interface can be augmented to register custom node types:
425
+ *
426
+ * ```ts
427
+ * declare module 'mdast' {
428
+ * interface TableContentMap {
429
+ * custom: Custom;
430
+ * }
431
+ * }
432
+ * ```
433
+ *
434
+ * For a union of all table content, see {@link RootContent}.
435
+ */
436
+ interface TableContentMap {
437
+ tableRow: TableRow;
438
+ }
439
+ // ## Abstract nodes
440
+ /**
441
+ * Abstract mdast node that contains the smallest possible value.
442
+ *
443
+ * This interface is supposed to be extended if you make custom mdast nodes.
444
+ *
445
+ * For a union of all registered mdast literals, see {@link Literals}.
446
+ */
447
+ interface Literal extends Node$1 {
448
+ /**
449
+ * Plain-text value.
450
+ */
451
+ value: string;
452
+ }
453
+ /**
454
+ * Abstract mdast node.
455
+ *
456
+ * This interface is supposed to be extended.
457
+ * If you can use {@link Literal} or {@link Parent}, you should.
458
+ * But for example in markdown, a thematic break (`***`) is neither literal nor
459
+ * parent, but still a node.
460
+ *
461
+ * To register custom mdast nodes, add them to {@link RootContentMap} and other
462
+ * places where relevant (such as {@link ElementContentMap}).
463
+ *
464
+ * For a union of all registered mdast nodes, see {@link Nodes}.
465
+ */
466
+ interface Node$1 extends Node$2 {
467
+ /**
468
+ * Info from the ecosystem.
469
+ */
470
+ data?: Data$3 | undefined;
471
+ }
472
+ /**
473
+ * Abstract mdast node that contains other mdast nodes (*children*).
474
+ *
475
+ * This interface is supposed to be extended if you make custom mdast nodes.
476
+ *
477
+ * For a union of all registered mdast parents, see {@link Parents}.
478
+ */
479
+ interface Parent extends Node$1 {
480
+ /**
481
+ * List of children.
482
+ */
483
+ children: RootContent[];
484
+ }
485
+ // ## Concrete nodes
486
+ /**
487
+ * Markdown block quote.
488
+ */
489
+ interface Blockquote extends Parent {
490
+ /**
491
+ * Node type of mdast block quote.
492
+ */
493
+ type: "blockquote";
494
+ /**
495
+ * Children of block quote.
496
+ */
497
+ children: Array<BlockContent | DefinitionContent>;
498
+ /**
499
+ * Data associated with the mdast block quote.
500
+ */
501
+ data?: BlockquoteData | undefined;
502
+ }
503
+ /**
504
+ * Info associated with mdast block quote nodes by the ecosystem.
505
+ */
506
+ interface BlockquoteData extends Data$3 {}
507
+ /**
508
+ * Markdown break.
509
+ */
510
+ interface Break extends Node$1 {
511
+ /**
512
+ * Node type of mdast break.
513
+ */
514
+ type: "break";
515
+ /**
516
+ * Data associated with the mdast break.
517
+ */
518
+ data?: BreakData | undefined;
519
+ }
520
+ /**
521
+ * Info associated with mdast break nodes by the ecosystem.
522
+ */
523
+ interface BreakData extends Data$3 {}
524
+ /**
525
+ * Markdown code (flow) (block).
526
+ */
527
+ interface Code extends Literal {
528
+ /**
529
+ * Node type of mdast code (flow).
530
+ */
531
+ type: "code";
532
+ /**
533
+ * Language of computer code being marked up.
534
+ */
535
+ lang?: string | null | undefined;
536
+ /**
537
+ * Custom information relating to the node.
538
+ *
539
+ * If the lang field is present, a meta field can be present.
540
+ */
541
+ meta?: string | null | undefined;
542
+ /**
543
+ * Data associated with the mdast code (flow).
544
+ */
545
+ data?: CodeData | undefined;
546
+ }
547
+ /**
548
+ * Info associated with mdast code (flow) (block) nodes by the ecosystem.
549
+ */
550
+ interface CodeData extends Data$3 {}
551
+ /**
552
+ * Markdown definition.
553
+ */
554
+ interface Definition extends Node$1, Association, Resource {
555
+ /**
556
+ * Node type of mdast definition.
557
+ */
558
+ type: "definition";
559
+ /**
560
+ * Data associated with the mdast definition.
561
+ */
562
+ data?: DefinitionData | undefined;
563
+ }
564
+ /**
565
+ * Info associated with mdast definition nodes by the ecosystem.
566
+ */
567
+ interface DefinitionData extends Data$3 {}
568
+ /**
569
+ * Markdown GFM delete (strikethrough).
570
+ */
571
+ interface Delete extends Parent {
572
+ /**
573
+ * Node type of mdast GFM delete.
574
+ */
575
+ type: "delete";
576
+ /**
577
+ * Children of GFM delete.
578
+ */
579
+ children: PhrasingContent[];
580
+ /**
581
+ * Data associated with the mdast GFM delete.
582
+ */
583
+ data?: DeleteData | undefined;
584
+ }
585
+ /**
586
+ * Info associated with mdast GFM delete nodes by the ecosystem.
587
+ */
588
+ interface DeleteData extends Data$3 {}
589
+ /**
590
+ * Markdown emphasis.
591
+ */
592
+ interface Emphasis extends Parent {
593
+ /**
594
+ * Node type of mdast emphasis.
595
+ */
596
+ type: "emphasis";
597
+ /**
598
+ * Children of emphasis.
599
+ */
600
+ children: PhrasingContent[];
601
+ /**
602
+ * Data associated with the mdast emphasis.
603
+ */
604
+ data?: EmphasisData | undefined;
605
+ }
606
+ /**
607
+ * Info associated with mdast emphasis nodes by the ecosystem.
608
+ */
609
+ interface EmphasisData extends Data$3 {}
610
+ /**
611
+ * Markdown GFM footnote definition.
612
+ */
613
+ interface FootnoteDefinition extends Parent, Association {
614
+ /**
615
+ * Node type of mdast GFM footnote definition.
616
+ */
617
+ type: "footnoteDefinition";
618
+ /**
619
+ * Children of GFM footnote definition.
620
+ */
621
+ children: Array<BlockContent | DefinitionContent>;
622
+ /**
623
+ * Data associated with the mdast GFM footnote definition.
624
+ */
625
+ data?: FootnoteDefinitionData | undefined;
626
+ }
627
+ /**
628
+ * Info associated with mdast GFM footnote definition nodes by the ecosystem.
629
+ */
630
+ interface FootnoteDefinitionData extends Data$3 {}
631
+ /**
632
+ * Markdown GFM footnote reference.
633
+ */
634
+ interface FootnoteReference extends Association, Node$1 {
635
+ /**
636
+ * Node type of mdast GFM footnote reference.
637
+ */
638
+ type: "footnoteReference";
639
+ /**
640
+ * Data associated with the mdast GFM footnote reference.
641
+ */
642
+ data?: FootnoteReferenceData | undefined;
643
+ }
644
+ /**
645
+ * Info associated with mdast GFM footnote reference nodes by the ecosystem.
646
+ */
647
+ interface FootnoteReferenceData extends Data$3 {}
648
+ /**
649
+ * Markdown heading.
650
+ */
651
+ interface Heading extends Parent {
652
+ /**
653
+ * Node type of mdast heading.
654
+ */
655
+ type: "heading";
656
+ /**
657
+ * Heading rank.
658
+ *
659
+ * A value of `1` is said to be the highest rank and `6` the lowest.
660
+ */
661
+ depth: 1 | 2 | 3 | 4 | 5 | 6;
662
+ /**
663
+ * Children of heading.
664
+ */
665
+ children: PhrasingContent[];
666
+ /**
667
+ * Data associated with the mdast heading.
668
+ */
669
+ data?: HeadingData | undefined;
670
+ }
671
+ /**
672
+ * Info associated with mdast heading nodes by the ecosystem.
673
+ */
674
+ interface HeadingData extends Data$3 {}
675
+ /**
676
+ * Markdown HTML.
677
+ */
678
+ interface Html extends Literal {
679
+ /**
680
+ * Node type of mdast HTML.
681
+ */
682
+ type: "html";
683
+ /**
684
+ * Data associated with the mdast HTML.
685
+ */
686
+ data?: HtmlData | undefined;
687
+ }
688
+ /**
689
+ * Info associated with mdast HTML nodes by the ecosystem.
690
+ */
691
+ interface HtmlData extends Data$3 {}
692
+ /**
693
+ * Markdown image.
694
+ */
695
+ interface Image extends Alternative, Node$1, Resource {
696
+ /**
697
+ * Node type of mdast image.
698
+ */
699
+ type: "image";
700
+ /**
701
+ * Data associated with the mdast image.
702
+ */
703
+ data?: ImageData | undefined;
704
+ }
705
+ /**
706
+ * Info associated with mdast image nodes by the ecosystem.
707
+ */
708
+ interface ImageData extends Data$3 {}
709
+ /**
710
+ * Markdown image reference.
711
+ */
712
+ interface ImageReference extends Alternative, Node$1, Reference {
713
+ /**
714
+ * Node type of mdast image reference.
715
+ */
716
+ type: "imageReference";
717
+ /**
718
+ * Data associated with the mdast image reference.
719
+ */
720
+ data?: ImageReferenceData | undefined;
721
+ }
722
+ /**
723
+ * Info associated with mdast image reference nodes by the ecosystem.
724
+ */
725
+ interface ImageReferenceData extends Data$3 {}
726
+ /**
727
+ * Markdown code (text) (inline).
728
+ */
729
+ interface InlineCode extends Literal {
730
+ /**
731
+ * Node type of mdast code (text).
732
+ */
733
+ type: "inlineCode";
734
+ /**
735
+ * Data associated with the mdast code (text).
736
+ */
737
+ data?: InlineCodeData | undefined;
738
+ }
739
+ /**
740
+ * Info associated with mdast code (text) (inline) nodes by the ecosystem.
741
+ */
742
+ interface InlineCodeData extends Data$3 {}
743
+ /**
744
+ * Markdown link.
745
+ */
746
+ interface Link extends Parent, Resource {
747
+ /**
748
+ * Node type of mdast link.
749
+ */
750
+ type: "link";
751
+ /**
752
+ * Children of link.
753
+ */
754
+ children: PhrasingContent[];
755
+ /**
756
+ * Data associated with the mdast link.
757
+ */
758
+ data?: LinkData | undefined;
759
+ }
760
+ /**
761
+ * Info associated with mdast link nodes by the ecosystem.
762
+ */
763
+ interface LinkData extends Data$3 {}
764
+ /**
765
+ * Markdown link reference.
766
+ */
767
+ interface LinkReference extends Parent, Reference {
768
+ /**
769
+ * Node type of mdast link reference.
770
+ */
771
+ type: "linkReference";
772
+ /**
773
+ * Children of link reference.
774
+ */
775
+ children: PhrasingContent[];
776
+ /**
777
+ * Data associated with the mdast link reference.
778
+ */
779
+ data?: LinkReferenceData | undefined;
780
+ }
781
+ /**
782
+ * Info associated with mdast link reference nodes by the ecosystem.
783
+ */
784
+ interface LinkReferenceData extends Data$3 {}
785
+ /**
786
+ * Markdown list.
787
+ */
788
+ interface List extends Parent {
789
+ /**
790
+ * Node type of mdast list.
791
+ */
792
+ type: "list";
793
+ /**
794
+ * Whether the items have been intentionally ordered (when `true`), or that
795
+ * the order of items is not important (when `false` or not present).
796
+ */
797
+ ordered?: boolean | null | undefined;
798
+ /**
799
+ * The starting number of the list, when the `ordered` field is `true`.
800
+ */
801
+ start?: number | null | undefined;
802
+ /**
803
+ * Whether one or more of the children are separated with a blank line from
804
+ * its siblings (when `true`), or not (when `false` or not present).
805
+ */
806
+ spread?: boolean | null | undefined;
807
+ /**
808
+ * Children of list.
809
+ */
810
+ children: ListContent[];
811
+ /**
812
+ * Data associated with the mdast list.
813
+ */
814
+ data?: ListData | undefined;
815
+ }
816
+ /**
817
+ * Info associated with mdast list nodes by the ecosystem.
818
+ */
819
+ interface ListData extends Data$3 {}
820
+ /**
821
+ * Markdown list item.
822
+ */
823
+ interface ListItem extends Parent {
824
+ /**
825
+ * Node type of mdast list item.
826
+ */
827
+ type: "listItem";
828
+ /**
829
+ * Whether the item is a tasklist item (when `boolean`).
830
+ *
831
+ * When `true`, the item is complete.
832
+ * When `false`, the item is incomplete.
833
+ */
834
+ checked?: boolean | null | undefined;
835
+ /**
836
+ * Whether one or more of the children are separated with a blank line from
837
+ * its siblings (when `true`), or not (when `false` or not present).
838
+ */
839
+ spread?: boolean | null | undefined;
840
+ /**
841
+ * Children of list item.
842
+ */
843
+ children: Array<BlockContent | DefinitionContent>;
844
+ /**
845
+ * Data associated with the mdast list item.
846
+ */
847
+ data?: ListItemData | undefined;
848
+ }
849
+ /**
850
+ * Info associated with mdast list item nodes by the ecosystem.
851
+ */
852
+ interface ListItemData extends Data$3 {}
853
+ /**
854
+ * Markdown paragraph.
855
+ */
856
+ interface Paragraph extends Parent {
857
+ /**
858
+ * Node type of mdast paragraph.
859
+ */
860
+ type: "paragraph";
861
+ /**
862
+ * Children of paragraph.
863
+ */
864
+ children: PhrasingContent[];
865
+ /**
866
+ * Data associated with the mdast paragraph.
867
+ */
868
+ data?: ParagraphData | undefined;
869
+ }
870
+ /**
871
+ * Info associated with mdast paragraph nodes by the ecosystem.
872
+ */
873
+ interface ParagraphData extends Data$3 {}
874
+ /**
875
+ * Document fragment or a whole document.
876
+ *
877
+ * Should be used as the root of a tree and must not be used as a child.
878
+ */
879
+ interface Root extends Parent {
880
+ /**
881
+ * Node type of mdast root.
882
+ */
883
+ type: "root";
884
+ /**
885
+ * Data associated with the mdast root.
886
+ */
887
+ data?: RootData | undefined;
888
+ }
889
+ /**
890
+ * Info associated with mdast root nodes by the ecosystem.
891
+ */
892
+ interface RootData extends Data$3 {}
893
+ /**
894
+ * Markdown strong.
895
+ */
896
+ interface Strong extends Parent {
897
+ /**
898
+ * Node type of mdast strong.
899
+ */
900
+ type: "strong";
901
+ /**
902
+ * Children of strong.
903
+ */
904
+ children: PhrasingContent[];
905
+ /**
906
+ * Data associated with the mdast strong.
907
+ */
908
+ data?: StrongData | undefined;
909
+ }
910
+ /**
911
+ * Info associated with mdast strong nodes by the ecosystem.
912
+ */
913
+ interface StrongData extends Data$3 {}
914
+ /**
915
+ * Markdown GFM table.
916
+ */
917
+ interface Table extends Parent {
918
+ /**
919
+ * Node type of mdast GFM table.
920
+ */
921
+ type: "table";
922
+ /**
923
+ * How cells in columns are aligned.
924
+ */
925
+ align?: AlignType[] | null | undefined;
926
+ /**
927
+ * Children of GFM table.
928
+ */
929
+ children: TableContent[];
930
+ /**
931
+ * Data associated with the mdast GFM table.
932
+ */
933
+ data?: TableData | undefined;
934
+ }
935
+ /**
936
+ * Info associated with mdast GFM table nodes by the ecosystem.
937
+ */
938
+ interface TableData extends Data$3 {}
939
+ /**
940
+ * Markdown GFM table row.
941
+ */
942
+ interface TableRow extends Parent {
943
+ /**
944
+ * Node type of mdast GFM table row.
945
+ */
946
+ type: "tableRow";
947
+ /**
948
+ * Children of GFM table row.
949
+ */
950
+ children: RowContent[];
951
+ /**
952
+ * Data associated with the mdast GFM table row.
953
+ */
954
+ data?: TableRowData | undefined;
955
+ }
956
+ /**
957
+ * Info associated with mdast GFM table row nodes by the ecosystem.
958
+ */
959
+ interface TableRowData extends Data$3 {}
960
+ /**
961
+ * Markdown GFM table cell.
962
+ */
963
+ interface TableCell extends Parent {
964
+ /**
965
+ * Node type of mdast GFM table cell.
966
+ */
967
+ type: "tableCell";
968
+ /**
969
+ * Children of GFM table cell.
970
+ */
971
+ children: PhrasingContent[];
972
+ /**
973
+ * Data associated with the mdast GFM table cell.
974
+ */
975
+ data?: TableCellData | undefined;
976
+ }
977
+ /**
978
+ * Info associated with mdast GFM table cell nodes by the ecosystem.
979
+ */
980
+ interface TableCellData extends Data$3 {}
981
+ /**
982
+ * Markdown text.
983
+ */
984
+ interface Text extends Literal {
985
+ /**
986
+ * Node type of mdast text.
987
+ */
988
+ type: "text";
989
+ /**
990
+ * Data associated with the mdast text.
991
+ */
992
+ data?: TextData | undefined;
993
+ }
994
+ /**
995
+ * Info associated with mdast text nodes by the ecosystem.
996
+ */
997
+ interface TextData extends Data$3 {}
998
+ /**
999
+ * Markdown thematic break (horizontal rule).
1000
+ */
1001
+ interface ThematicBreak extends Node$1 {
1002
+ /**
1003
+ * Node type of mdast thematic break.
1004
+ */
1005
+ type: "thematicBreak";
1006
+ /**
1007
+ * Data associated with the mdast thematic break.
1008
+ */
1009
+ data?: ThematicBreakData | undefined;
1010
+ }
1011
+ /**
1012
+ * Info associated with mdast thematic break nodes by the ecosystem.
1013
+ */
1014
+ interface ThematicBreakData extends Data$3 {}
1015
+ /**
1016
+ * Markdown YAML.
1017
+ */
1018
+ interface Yaml extends Literal {
1019
+ /**
1020
+ * Node type of mdast YAML.
1021
+ */
1022
+ type: "yaml";
1023
+ /**
1024
+ * Data associated with the mdast YAML.
1025
+ */
1026
+ data?: YamlData | undefined;
1027
+ }
1028
+ /**
1029
+ * Info associated with mdast YAML nodes by the ecosystem.
1030
+ */
1031
+ interface YamlData extends Data$3 {}
1032
+ //#endregion
1033
+ //#region ../../node_modules/.pnpm/vfile-message@4.0.3/node_modules/vfile-message/lib/index.d.ts
1034
+ /**
1035
+ * Message.
1036
+ */
1037
+ declare class VFileMessage extends Error {
1038
+ /**
1039
+ * Create a message for `reason`.
1040
+ *
1041
+ * > 🪦 **Note**: also has obsolete signatures.
1042
+ *
1043
+ * @overload
1044
+ * @param {string} reason
1045
+ * @param {Options | null | undefined} [options]
1046
+ * @returns
1047
+ *
1048
+ * @overload
1049
+ * @param {string} reason
1050
+ * @param {Node | NodeLike | null | undefined} parent
1051
+ * @param {string | null | undefined} [origin]
1052
+ * @returns
1053
+ *
1054
+ * @overload
1055
+ * @param {string} reason
1056
+ * @param {Point | Position | null | undefined} place
1057
+ * @param {string | null | undefined} [origin]
1058
+ * @returns
1059
+ *
1060
+ * @overload
1061
+ * @param {string} reason
1062
+ * @param {string | null | undefined} [origin]
1063
+ * @returns
1064
+ *
1065
+ * @overload
1066
+ * @param {Error | VFileMessage} cause
1067
+ * @param {Node | NodeLike | null | undefined} parent
1068
+ * @param {string | null | undefined} [origin]
1069
+ * @returns
1070
+ *
1071
+ * @overload
1072
+ * @param {Error | VFileMessage} cause
1073
+ * @param {Point | Position | null | undefined} place
1074
+ * @param {string | null | undefined} [origin]
1075
+ * @returns
1076
+ *
1077
+ * @overload
1078
+ * @param {Error | VFileMessage} cause
1079
+ * @param {string | null | undefined} [origin]
1080
+ * @returns
1081
+ *
1082
+ * @param {Error | VFileMessage | string} causeOrReason
1083
+ * Reason for message, should use markdown.
1084
+ * @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1085
+ * Configuration (optional).
1086
+ * @param {string | null | undefined} [origin]
1087
+ * Place in code where the message originates (example:
1088
+ * `'my-package:my-rule'` or `'my-rule'`).
1089
+ * @returns
1090
+ * Instance of `VFileMessage`.
1091
+ */
1092
+ constructor(reason: string, options?: Options$2 | null | undefined);
1093
+ /**
1094
+ * Create a message for `reason`.
1095
+ *
1096
+ * > 🪦 **Note**: also has obsolete signatures.
1097
+ *
1098
+ * @overload
1099
+ * @param {string} reason
1100
+ * @param {Options | null | undefined} [options]
1101
+ * @returns
1102
+ *
1103
+ * @overload
1104
+ * @param {string} reason
1105
+ * @param {Node | NodeLike | null | undefined} parent
1106
+ * @param {string | null | undefined} [origin]
1107
+ * @returns
1108
+ *
1109
+ * @overload
1110
+ * @param {string} reason
1111
+ * @param {Point | Position | null | undefined} place
1112
+ * @param {string | null | undefined} [origin]
1113
+ * @returns
1114
+ *
1115
+ * @overload
1116
+ * @param {string} reason
1117
+ * @param {string | null | undefined} [origin]
1118
+ * @returns
1119
+ *
1120
+ * @overload
1121
+ * @param {Error | VFileMessage} cause
1122
+ * @param {Node | NodeLike | null | undefined} parent
1123
+ * @param {string | null | undefined} [origin]
1124
+ * @returns
1125
+ *
1126
+ * @overload
1127
+ * @param {Error | VFileMessage} cause
1128
+ * @param {Point | Position | null | undefined} place
1129
+ * @param {string | null | undefined} [origin]
1130
+ * @returns
1131
+ *
1132
+ * @overload
1133
+ * @param {Error | VFileMessage} cause
1134
+ * @param {string | null | undefined} [origin]
1135
+ * @returns
1136
+ *
1137
+ * @param {Error | VFileMessage | string} causeOrReason
1138
+ * Reason for message, should use markdown.
1139
+ * @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1140
+ * Configuration (optional).
1141
+ * @param {string | null | undefined} [origin]
1142
+ * Place in code where the message originates (example:
1143
+ * `'my-package:my-rule'` or `'my-rule'`).
1144
+ * @returns
1145
+ * Instance of `VFileMessage`.
1146
+ */
1147
+ constructor(reason: string, parent: Node$2 | NodeLike$1 | null | undefined, origin?: string | null | undefined);
1148
+ /**
1149
+ * Create a message for `reason`.
1150
+ *
1151
+ * > 🪦 **Note**: also has obsolete signatures.
1152
+ *
1153
+ * @overload
1154
+ * @param {string} reason
1155
+ * @param {Options | null | undefined} [options]
1156
+ * @returns
1157
+ *
1158
+ * @overload
1159
+ * @param {string} reason
1160
+ * @param {Node | NodeLike | null | undefined} parent
1161
+ * @param {string | null | undefined} [origin]
1162
+ * @returns
1163
+ *
1164
+ * @overload
1165
+ * @param {string} reason
1166
+ * @param {Point | Position | null | undefined} place
1167
+ * @param {string | null | undefined} [origin]
1168
+ * @returns
1169
+ *
1170
+ * @overload
1171
+ * @param {string} reason
1172
+ * @param {string | null | undefined} [origin]
1173
+ * @returns
1174
+ *
1175
+ * @overload
1176
+ * @param {Error | VFileMessage} cause
1177
+ * @param {Node | NodeLike | null | undefined} parent
1178
+ * @param {string | null | undefined} [origin]
1179
+ * @returns
1180
+ *
1181
+ * @overload
1182
+ * @param {Error | VFileMessage} cause
1183
+ * @param {Point | Position | null | undefined} place
1184
+ * @param {string | null | undefined} [origin]
1185
+ * @returns
1186
+ *
1187
+ * @overload
1188
+ * @param {Error | VFileMessage} cause
1189
+ * @param {string | null | undefined} [origin]
1190
+ * @returns
1191
+ *
1192
+ * @param {Error | VFileMessage | string} causeOrReason
1193
+ * Reason for message, should use markdown.
1194
+ * @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1195
+ * Configuration (optional).
1196
+ * @param {string | null | undefined} [origin]
1197
+ * Place in code where the message originates (example:
1198
+ * `'my-package:my-rule'` or `'my-rule'`).
1199
+ * @returns
1200
+ * Instance of `VFileMessage`.
1201
+ */
1202
+ constructor(reason: string, place: Point | Position | null | undefined, origin?: string | null | undefined);
1203
+ /**
1204
+ * Create a message for `reason`.
1205
+ *
1206
+ * > 🪦 **Note**: also has obsolete signatures.
1207
+ *
1208
+ * @overload
1209
+ * @param {string} reason
1210
+ * @param {Options | null | undefined} [options]
1211
+ * @returns
1212
+ *
1213
+ * @overload
1214
+ * @param {string} reason
1215
+ * @param {Node | NodeLike | null | undefined} parent
1216
+ * @param {string | null | undefined} [origin]
1217
+ * @returns
1218
+ *
1219
+ * @overload
1220
+ * @param {string} reason
1221
+ * @param {Point | Position | null | undefined} place
1222
+ * @param {string | null | undefined} [origin]
1223
+ * @returns
1224
+ *
1225
+ * @overload
1226
+ * @param {string} reason
1227
+ * @param {string | null | undefined} [origin]
1228
+ * @returns
1229
+ *
1230
+ * @overload
1231
+ * @param {Error | VFileMessage} cause
1232
+ * @param {Node | NodeLike | null | undefined} parent
1233
+ * @param {string | null | undefined} [origin]
1234
+ * @returns
1235
+ *
1236
+ * @overload
1237
+ * @param {Error | VFileMessage} cause
1238
+ * @param {Point | Position | null | undefined} place
1239
+ * @param {string | null | undefined} [origin]
1240
+ * @returns
1241
+ *
1242
+ * @overload
1243
+ * @param {Error | VFileMessage} cause
1244
+ * @param {string | null | undefined} [origin]
1245
+ * @returns
1246
+ *
1247
+ * @param {Error | VFileMessage | string} causeOrReason
1248
+ * Reason for message, should use markdown.
1249
+ * @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1250
+ * Configuration (optional).
1251
+ * @param {string | null | undefined} [origin]
1252
+ * Place in code where the message originates (example:
1253
+ * `'my-package:my-rule'` or `'my-rule'`).
1254
+ * @returns
1255
+ * Instance of `VFileMessage`.
1256
+ */
1257
+ constructor(reason: string, origin?: string | null | undefined);
1258
+ /**
1259
+ * Create a message for `reason`.
1260
+ *
1261
+ * > 🪦 **Note**: also has obsolete signatures.
1262
+ *
1263
+ * @overload
1264
+ * @param {string} reason
1265
+ * @param {Options | null | undefined} [options]
1266
+ * @returns
1267
+ *
1268
+ * @overload
1269
+ * @param {string} reason
1270
+ * @param {Node | NodeLike | null | undefined} parent
1271
+ * @param {string | null | undefined} [origin]
1272
+ * @returns
1273
+ *
1274
+ * @overload
1275
+ * @param {string} reason
1276
+ * @param {Point | Position | null | undefined} place
1277
+ * @param {string | null | undefined} [origin]
1278
+ * @returns
1279
+ *
1280
+ * @overload
1281
+ * @param {string} reason
1282
+ * @param {string | null | undefined} [origin]
1283
+ * @returns
1284
+ *
1285
+ * @overload
1286
+ * @param {Error | VFileMessage} cause
1287
+ * @param {Node | NodeLike | null | undefined} parent
1288
+ * @param {string | null | undefined} [origin]
1289
+ * @returns
1290
+ *
1291
+ * @overload
1292
+ * @param {Error | VFileMessage} cause
1293
+ * @param {Point | Position | null | undefined} place
1294
+ * @param {string | null | undefined} [origin]
1295
+ * @returns
1296
+ *
1297
+ * @overload
1298
+ * @param {Error | VFileMessage} cause
1299
+ * @param {string | null | undefined} [origin]
1300
+ * @returns
1301
+ *
1302
+ * @param {Error | VFileMessage | string} causeOrReason
1303
+ * Reason for message, should use markdown.
1304
+ * @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1305
+ * Configuration (optional).
1306
+ * @param {string | null | undefined} [origin]
1307
+ * Place in code where the message originates (example:
1308
+ * `'my-package:my-rule'` or `'my-rule'`).
1309
+ * @returns
1310
+ * Instance of `VFileMessage`.
1311
+ */
1312
+ constructor(cause: Error | VFileMessage, parent: Node$2 | NodeLike$1 | null | undefined, origin?: string | null | undefined);
1313
+ /**
1314
+ * Create a message for `reason`.
1315
+ *
1316
+ * > 🪦 **Note**: also has obsolete signatures.
1317
+ *
1318
+ * @overload
1319
+ * @param {string} reason
1320
+ * @param {Options | null | undefined} [options]
1321
+ * @returns
1322
+ *
1323
+ * @overload
1324
+ * @param {string} reason
1325
+ * @param {Node | NodeLike | null | undefined} parent
1326
+ * @param {string | null | undefined} [origin]
1327
+ * @returns
1328
+ *
1329
+ * @overload
1330
+ * @param {string} reason
1331
+ * @param {Point | Position | null | undefined} place
1332
+ * @param {string | null | undefined} [origin]
1333
+ * @returns
1334
+ *
1335
+ * @overload
1336
+ * @param {string} reason
1337
+ * @param {string | null | undefined} [origin]
1338
+ * @returns
1339
+ *
1340
+ * @overload
1341
+ * @param {Error | VFileMessage} cause
1342
+ * @param {Node | NodeLike | null | undefined} parent
1343
+ * @param {string | null | undefined} [origin]
1344
+ * @returns
1345
+ *
1346
+ * @overload
1347
+ * @param {Error | VFileMessage} cause
1348
+ * @param {Point | Position | null | undefined} place
1349
+ * @param {string | null | undefined} [origin]
1350
+ * @returns
1351
+ *
1352
+ * @overload
1353
+ * @param {Error | VFileMessage} cause
1354
+ * @param {string | null | undefined} [origin]
1355
+ * @returns
1356
+ *
1357
+ * @param {Error | VFileMessage | string} causeOrReason
1358
+ * Reason for message, should use markdown.
1359
+ * @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1360
+ * Configuration (optional).
1361
+ * @param {string | null | undefined} [origin]
1362
+ * Place in code where the message originates (example:
1363
+ * `'my-package:my-rule'` or `'my-rule'`).
1364
+ * @returns
1365
+ * Instance of `VFileMessage`.
1366
+ */
1367
+ constructor(cause: Error | VFileMessage, place: Point | Position | null | undefined, origin?: string | null | undefined);
1368
+ /**
1369
+ * Create a message for `reason`.
1370
+ *
1371
+ * > 🪦 **Note**: also has obsolete signatures.
1372
+ *
1373
+ * @overload
1374
+ * @param {string} reason
1375
+ * @param {Options | null | undefined} [options]
1376
+ * @returns
1377
+ *
1378
+ * @overload
1379
+ * @param {string} reason
1380
+ * @param {Node | NodeLike | null | undefined} parent
1381
+ * @param {string | null | undefined} [origin]
1382
+ * @returns
1383
+ *
1384
+ * @overload
1385
+ * @param {string} reason
1386
+ * @param {Point | Position | null | undefined} place
1387
+ * @param {string | null | undefined} [origin]
1388
+ * @returns
1389
+ *
1390
+ * @overload
1391
+ * @param {string} reason
1392
+ * @param {string | null | undefined} [origin]
1393
+ * @returns
1394
+ *
1395
+ * @overload
1396
+ * @param {Error | VFileMessage} cause
1397
+ * @param {Node | NodeLike | null | undefined} parent
1398
+ * @param {string | null | undefined} [origin]
1399
+ * @returns
1400
+ *
1401
+ * @overload
1402
+ * @param {Error | VFileMessage} cause
1403
+ * @param {Point | Position | null | undefined} place
1404
+ * @param {string | null | undefined} [origin]
1405
+ * @returns
1406
+ *
1407
+ * @overload
1408
+ * @param {Error | VFileMessage} cause
1409
+ * @param {string | null | undefined} [origin]
1410
+ * @returns
1411
+ *
1412
+ * @param {Error | VFileMessage | string} causeOrReason
1413
+ * Reason for message, should use markdown.
1414
+ * @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1415
+ * Configuration (optional).
1416
+ * @param {string | null | undefined} [origin]
1417
+ * Place in code where the message originates (example:
1418
+ * `'my-package:my-rule'` or `'my-rule'`).
1419
+ * @returns
1420
+ * Instance of `VFileMessage`.
1421
+ */
1422
+ constructor(cause: Error | VFileMessage, origin?: string | null | undefined);
1423
+ /**
1424
+ * Stack of ancestor nodes surrounding the message.
1425
+ *
1426
+ * @type {Array<Node> | undefined}
1427
+ */
1428
+ ancestors: Array<Node$2> | undefined;
1429
+ /**
1430
+ * Starting column of message.
1431
+ *
1432
+ * @type {number | undefined}
1433
+ */
1434
+ column: number | undefined;
1435
+ /**
1436
+ * State of problem.
1437
+ *
1438
+ * * `true` — error, file not usable
1439
+ * * `false` — warning, change may be needed
1440
+ * * `undefined` — change likely not needed
1441
+ *
1442
+ * @type {boolean | null | undefined}
1443
+ */
1444
+ fatal: boolean | null | undefined;
1445
+ /**
1446
+ * Path of a file (used throughout the `VFile` ecosystem).
1447
+ *
1448
+ * @type {string | undefined}
1449
+ */
1450
+ file: string | undefined;
1451
+ /**
1452
+ * Starting line of error.
1453
+ *
1454
+ * @type {number | undefined}
1455
+ */
1456
+ line: number | undefined;
1457
+ /**
1458
+ * Place of message.
1459
+ *
1460
+ * @type {Point | Position | undefined}
1461
+ */
1462
+ place: Point | Position | undefined;
1463
+ /**
1464
+ * Reason for message, should use markdown.
1465
+ *
1466
+ * @type {string}
1467
+ */
1468
+ reason: string;
1469
+ /**
1470
+ * Category of message (example: `'my-rule'`).
1471
+ *
1472
+ * @type {string | undefined}
1473
+ */
1474
+ ruleId: string | undefined;
1475
+ /**
1476
+ * Namespace of message (example: `'my-package'`).
1477
+ *
1478
+ * @type {string | undefined}
1479
+ */
1480
+ source: string | undefined;
1481
+ /**
1482
+ * Specify the source value that’s being reported, which is deemed
1483
+ * incorrect.
1484
+ *
1485
+ * @type {string | undefined}
1486
+ */
1487
+ actual: string | undefined;
1488
+ /**
1489
+ * Suggest acceptable values that can be used instead of `actual`.
1490
+ *
1491
+ * @type {Array<string> | undefined}
1492
+ */
1493
+ expected: Array<string> | undefined;
1494
+ /**
1495
+ * Long form description of the message (you should use markdown).
1496
+ *
1497
+ * @type {string | undefined}
1498
+ */
1499
+ note: string | undefined;
1500
+ /**
1501
+ * Link to docs for the message.
1502
+ *
1503
+ * > 👉 **Note**: this must be an absolute URL that can be passed as `x`
1504
+ * > to `new URL(x)`.
1505
+ *
1506
+ * @type {string | undefined}
1507
+ */
1508
+ url: string | undefined;
1509
+ }
1510
+ type NodeLike$1 = object & {
1511
+ type: string;
1512
+ position?: Position | undefined;
1513
+ };
1514
+ /**
1515
+ * Configuration.
1516
+ */
1517
+ type Options$2 = {
1518
+ /**
1519
+ * Stack of (inclusive) ancestor nodes surrounding the message (optional).
1520
+ */
1521
+ ancestors?: Array<Node$2> | null | undefined;
1522
+ /**
1523
+ * Original error cause of the message (optional).
1524
+ */
1525
+ cause?: Error | null | undefined;
1526
+ /**
1527
+ * Place of message (optional).
1528
+ */
1529
+ place?: Point | Position | null | undefined;
1530
+ /**
1531
+ * Category of message (optional, example: `'my-rule'`).
1532
+ */
1533
+ ruleId?: string | null | undefined;
1534
+ /**
1535
+ * Namespace of who sent the message (optional, example: `'my-package'`).
1536
+ */
1537
+ source?: string | null | undefined;
1538
+ };
1539
+ //#endregion
1540
+ //#region ../../node_modules/.pnpm/vfile-message@4.0.3/node_modules/vfile-message/index.d.ts
1541
+ type Options$1 = Options$2;
1542
+ //#endregion
1543
+ //#region ../../node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/index.d.ts
1544
+ declare class VFile {
1545
+ /**
1546
+ * Create a new virtual file.
1547
+ *
1548
+ * `options` is treated as:
1549
+ *
1550
+ * * `string` or `Uint8Array` — `{value: options}`
1551
+ * * `URL` — `{path: options}`
1552
+ * * `VFile` — shallow copies its data over to the new file
1553
+ * * `object` — all fields are shallow copied over to the new file
1554
+ *
1555
+ * Path related fields are set in the following order (least specific to
1556
+ * most specific): `history`, `path`, `basename`, `stem`, `extname`,
1557
+ * `dirname`.
1558
+ *
1559
+ * You cannot set `dirname` or `extname` without setting either `history`,
1560
+ * `path`, `basename`, or `stem` too.
1561
+ *
1562
+ * @param {Compatible | null | undefined} [value]
1563
+ * File value.
1564
+ * @returns
1565
+ * New instance.
1566
+ */
1567
+ constructor(value?: Compatible$1 | null | undefined);
1568
+ /**
1569
+ * Base of `path` (default: `process.cwd()` or `'/'` in browsers).
1570
+ *
1571
+ * @type {string}
1572
+ */
1573
+ cwd: string;
1574
+ /**
1575
+ * Place to store custom info (default: `{}`).
1576
+ *
1577
+ * It’s OK to store custom data directly on the file but moving it to
1578
+ * `data` is recommended.
1579
+ *
1580
+ * @type {Data}
1581
+ */
1582
+ data: Data$2;
1583
+ /**
1584
+ * List of file paths the file moved between.
1585
+ *
1586
+ * The first is the original path and the last is the current path.
1587
+ *
1588
+ * @type {Array<string>}
1589
+ */
1590
+ history: Array<string>;
1591
+ /**
1592
+ * List of messages associated with the file.
1593
+ *
1594
+ * @type {Array<VFileMessage>}
1595
+ */
1596
+ messages: Array<VFileMessage>;
1597
+ /**
1598
+ * Raw value.
1599
+ *
1600
+ * @type {Value}
1601
+ */
1602
+ value: Value$1;
1603
+ /**
1604
+ * Source map.
1605
+ *
1606
+ * This type is equivalent to the `RawSourceMap` type from the `source-map`
1607
+ * module.
1608
+ *
1609
+ * @type {Map | null | undefined}
1610
+ */
1611
+ map: Map | null | undefined;
1612
+ /**
1613
+ * Custom, non-string, compiled, representation.
1614
+ *
1615
+ * This is used by unified to store non-string results.
1616
+ * One example is when turning markdown into React nodes.
1617
+ *
1618
+ * @type {unknown}
1619
+ */
1620
+ result: unknown;
1621
+ /**
1622
+ * Whether a file was saved to disk.
1623
+ *
1624
+ * This is used by vfile reporters.
1625
+ *
1626
+ * @type {boolean}
1627
+ */
1628
+ stored: boolean;
1629
+ /**
1630
+ * Set basename (including extname) (`'index.min.js'`).
1631
+ *
1632
+ * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
1633
+ * on windows).
1634
+ * Cannot be nullified (use `file.path = file.dirname` instead).
1635
+ *
1636
+ * @param {string} basename
1637
+ * Basename.
1638
+ * @returns {undefined}
1639
+ * Nothing.
1640
+ */
1641
+ set basename(basename: string);
1642
+ /**
1643
+ * Get the basename (including extname) (example: `'index.min.js'`).
1644
+ *
1645
+ * @returns {string | undefined}
1646
+ * Basename.
1647
+ */
1648
+ get basename(): string | undefined;
1649
+ /**
1650
+ * Set the full path (example: `'~/index.min.js'`).
1651
+ *
1652
+ * Cannot be nullified.
1653
+ * You can set a file URL (a `URL` object with a `file:` protocol) which will
1654
+ * be turned into a path with `url.fileURLToPath`.
1655
+ *
1656
+ * @param {URL | string} path
1657
+ * Path.
1658
+ * @returns {undefined}
1659
+ * Nothing.
1660
+ */
1661
+ set path(path: string | URL);
1662
+ /**
1663
+ * Get the full path (example: `'~/index.min.js'`).
1664
+ *
1665
+ * @returns {string}
1666
+ * Path.
1667
+ */
1668
+ get path(): string;
1669
+ /**
1670
+ * Set the parent path (example: `'~'`).
1671
+ *
1672
+ * Cannot be set if there’s no `path` yet.
1673
+ *
1674
+ * @param {string | undefined} dirname
1675
+ * Dirname.
1676
+ * @returns {undefined}
1677
+ * Nothing.
1678
+ */
1679
+ set dirname(dirname: string | undefined);
1680
+ /**
1681
+ * Get the parent path (example: `'~'`).
1682
+ *
1683
+ * @returns {string | undefined}
1684
+ * Dirname.
1685
+ */
1686
+ get dirname(): string | undefined;
1687
+ /**
1688
+ * Set the extname (including dot) (example: `'.js'`).
1689
+ *
1690
+ * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
1691
+ * on windows).
1692
+ * Cannot be set if there’s no `path` yet.
1693
+ *
1694
+ * @param {string | undefined} extname
1695
+ * Extname.
1696
+ * @returns {undefined}
1697
+ * Nothing.
1698
+ */
1699
+ set extname(extname: string | undefined);
1700
+ /**
1701
+ * Get the extname (including dot) (example: `'.js'`).
1702
+ *
1703
+ * @returns {string | undefined}
1704
+ * Extname.
1705
+ */
1706
+ get extname(): string | undefined;
1707
+ /**
1708
+ * Set the stem (basename w/o extname) (example: `'index.min'`).
1709
+ *
1710
+ * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
1711
+ * on windows).
1712
+ * Cannot be nullified (use `file.path = file.dirname` instead).
1713
+ *
1714
+ * @param {string} stem
1715
+ * Stem.
1716
+ * @returns {undefined}
1717
+ * Nothing.
1718
+ */
1719
+ set stem(stem: string);
1720
+ /**
1721
+ * Get the stem (basename w/o extname) (example: `'index.min'`).
1722
+ *
1723
+ * @returns {string | undefined}
1724
+ * Stem.
1725
+ */
1726
+ get stem(): string | undefined;
1727
+ /**
1728
+ * Create a fatal message for `reason` associated with the file.
1729
+ *
1730
+ * The `fatal` field of the message is set to `true` (error; file not usable)
1731
+ * and the `file` field is set to the current file path.
1732
+ * The message is added to the `messages` field on `file`.
1733
+ *
1734
+ * > 🪦 **Note**: also has obsolete signatures.
1735
+ *
1736
+ * @overload
1737
+ * @param {string} reason
1738
+ * @param {MessageOptions | null | undefined} [options]
1739
+ * @returns {never}
1740
+ *
1741
+ * @overload
1742
+ * @param {string} reason
1743
+ * @param {Node | NodeLike | null | undefined} parent
1744
+ * @param {string | null | undefined} [origin]
1745
+ * @returns {never}
1746
+ *
1747
+ * @overload
1748
+ * @param {string} reason
1749
+ * @param {Point | Position | null | undefined} place
1750
+ * @param {string | null | undefined} [origin]
1751
+ * @returns {never}
1752
+ *
1753
+ * @overload
1754
+ * @param {string} reason
1755
+ * @param {string | null | undefined} [origin]
1756
+ * @returns {never}
1757
+ *
1758
+ * @overload
1759
+ * @param {Error | VFileMessage} cause
1760
+ * @param {Node | NodeLike | null | undefined} parent
1761
+ * @param {string | null | undefined} [origin]
1762
+ * @returns {never}
1763
+ *
1764
+ * @overload
1765
+ * @param {Error | VFileMessage} cause
1766
+ * @param {Point | Position | null | undefined} place
1767
+ * @param {string | null | undefined} [origin]
1768
+ * @returns {never}
1769
+ *
1770
+ * @overload
1771
+ * @param {Error | VFileMessage} cause
1772
+ * @param {string | null | undefined} [origin]
1773
+ * @returns {never}
1774
+ *
1775
+ * @param {Error | VFileMessage | string} causeOrReason
1776
+ * Reason for message, should use markdown.
1777
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1778
+ * Configuration (optional).
1779
+ * @param {string | null | undefined} [origin]
1780
+ * Place in code where the message originates (example:
1781
+ * `'my-package:my-rule'` or `'my-rule'`).
1782
+ * @returns {never}
1783
+ * Never.
1784
+ * @throws {VFileMessage}
1785
+ * Message.
1786
+ */
1787
+ fail(reason: string, options?: Options$1 | null | undefined): never;
1788
+ /**
1789
+ * Create a fatal message for `reason` associated with the file.
1790
+ *
1791
+ * The `fatal` field of the message is set to `true` (error; file not usable)
1792
+ * and the `file` field is set to the current file path.
1793
+ * The message is added to the `messages` field on `file`.
1794
+ *
1795
+ * > 🪦 **Note**: also has obsolete signatures.
1796
+ *
1797
+ * @overload
1798
+ * @param {string} reason
1799
+ * @param {MessageOptions | null | undefined} [options]
1800
+ * @returns {never}
1801
+ *
1802
+ * @overload
1803
+ * @param {string} reason
1804
+ * @param {Node | NodeLike | null | undefined} parent
1805
+ * @param {string | null | undefined} [origin]
1806
+ * @returns {never}
1807
+ *
1808
+ * @overload
1809
+ * @param {string} reason
1810
+ * @param {Point | Position | null | undefined} place
1811
+ * @param {string | null | undefined} [origin]
1812
+ * @returns {never}
1813
+ *
1814
+ * @overload
1815
+ * @param {string} reason
1816
+ * @param {string | null | undefined} [origin]
1817
+ * @returns {never}
1818
+ *
1819
+ * @overload
1820
+ * @param {Error | VFileMessage} cause
1821
+ * @param {Node | NodeLike | null | undefined} parent
1822
+ * @param {string | null | undefined} [origin]
1823
+ * @returns {never}
1824
+ *
1825
+ * @overload
1826
+ * @param {Error | VFileMessage} cause
1827
+ * @param {Point | Position | null | undefined} place
1828
+ * @param {string | null | undefined} [origin]
1829
+ * @returns {never}
1830
+ *
1831
+ * @overload
1832
+ * @param {Error | VFileMessage} cause
1833
+ * @param {string | null | undefined} [origin]
1834
+ * @returns {never}
1835
+ *
1836
+ * @param {Error | VFileMessage | string} causeOrReason
1837
+ * Reason for message, should use markdown.
1838
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1839
+ * Configuration (optional).
1840
+ * @param {string | null | undefined} [origin]
1841
+ * Place in code where the message originates (example:
1842
+ * `'my-package:my-rule'` or `'my-rule'`).
1843
+ * @returns {never}
1844
+ * Never.
1845
+ * @throws {VFileMessage}
1846
+ * Message.
1847
+ */
1848
+ fail(reason: string, parent: Node$2 | NodeLike | null | undefined, origin?: string | null | undefined): never;
1849
+ /**
1850
+ * Create a fatal message for `reason` associated with the file.
1851
+ *
1852
+ * The `fatal` field of the message is set to `true` (error; file not usable)
1853
+ * and the `file` field is set to the current file path.
1854
+ * The message is added to the `messages` field on `file`.
1855
+ *
1856
+ * > 🪦 **Note**: also has obsolete signatures.
1857
+ *
1858
+ * @overload
1859
+ * @param {string} reason
1860
+ * @param {MessageOptions | null | undefined} [options]
1861
+ * @returns {never}
1862
+ *
1863
+ * @overload
1864
+ * @param {string} reason
1865
+ * @param {Node | NodeLike | null | undefined} parent
1866
+ * @param {string | null | undefined} [origin]
1867
+ * @returns {never}
1868
+ *
1869
+ * @overload
1870
+ * @param {string} reason
1871
+ * @param {Point | Position | null | undefined} place
1872
+ * @param {string | null | undefined} [origin]
1873
+ * @returns {never}
1874
+ *
1875
+ * @overload
1876
+ * @param {string} reason
1877
+ * @param {string | null | undefined} [origin]
1878
+ * @returns {never}
1879
+ *
1880
+ * @overload
1881
+ * @param {Error | VFileMessage} cause
1882
+ * @param {Node | NodeLike | null | undefined} parent
1883
+ * @param {string | null | undefined} [origin]
1884
+ * @returns {never}
1885
+ *
1886
+ * @overload
1887
+ * @param {Error | VFileMessage} cause
1888
+ * @param {Point | Position | null | undefined} place
1889
+ * @param {string | null | undefined} [origin]
1890
+ * @returns {never}
1891
+ *
1892
+ * @overload
1893
+ * @param {Error | VFileMessage} cause
1894
+ * @param {string | null | undefined} [origin]
1895
+ * @returns {never}
1896
+ *
1897
+ * @param {Error | VFileMessage | string} causeOrReason
1898
+ * Reason for message, should use markdown.
1899
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1900
+ * Configuration (optional).
1901
+ * @param {string | null | undefined} [origin]
1902
+ * Place in code where the message originates (example:
1903
+ * `'my-package:my-rule'` or `'my-rule'`).
1904
+ * @returns {never}
1905
+ * Never.
1906
+ * @throws {VFileMessage}
1907
+ * Message.
1908
+ */
1909
+ fail(reason: string, place: Point | Position | null | undefined, origin?: string | null | undefined): never;
1910
+ /**
1911
+ * Create a fatal message for `reason` associated with the file.
1912
+ *
1913
+ * The `fatal` field of the message is set to `true` (error; file not usable)
1914
+ * and the `file` field is set to the current file path.
1915
+ * The message is added to the `messages` field on `file`.
1916
+ *
1917
+ * > 🪦 **Note**: also has obsolete signatures.
1918
+ *
1919
+ * @overload
1920
+ * @param {string} reason
1921
+ * @param {MessageOptions | null | undefined} [options]
1922
+ * @returns {never}
1923
+ *
1924
+ * @overload
1925
+ * @param {string} reason
1926
+ * @param {Node | NodeLike | null | undefined} parent
1927
+ * @param {string | null | undefined} [origin]
1928
+ * @returns {never}
1929
+ *
1930
+ * @overload
1931
+ * @param {string} reason
1932
+ * @param {Point | Position | null | undefined} place
1933
+ * @param {string | null | undefined} [origin]
1934
+ * @returns {never}
1935
+ *
1936
+ * @overload
1937
+ * @param {string} reason
1938
+ * @param {string | null | undefined} [origin]
1939
+ * @returns {never}
1940
+ *
1941
+ * @overload
1942
+ * @param {Error | VFileMessage} cause
1943
+ * @param {Node | NodeLike | null | undefined} parent
1944
+ * @param {string | null | undefined} [origin]
1945
+ * @returns {never}
1946
+ *
1947
+ * @overload
1948
+ * @param {Error | VFileMessage} cause
1949
+ * @param {Point | Position | null | undefined} place
1950
+ * @param {string | null | undefined} [origin]
1951
+ * @returns {never}
1952
+ *
1953
+ * @overload
1954
+ * @param {Error | VFileMessage} cause
1955
+ * @param {string | null | undefined} [origin]
1956
+ * @returns {never}
1957
+ *
1958
+ * @param {Error | VFileMessage | string} causeOrReason
1959
+ * Reason for message, should use markdown.
1960
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1961
+ * Configuration (optional).
1962
+ * @param {string | null | undefined} [origin]
1963
+ * Place in code where the message originates (example:
1964
+ * `'my-package:my-rule'` or `'my-rule'`).
1965
+ * @returns {never}
1966
+ * Never.
1967
+ * @throws {VFileMessage}
1968
+ * Message.
1969
+ */
1970
+ fail(reason: string, origin?: string | null | undefined): never;
1971
+ /**
1972
+ * Create a fatal message for `reason` associated with the file.
1973
+ *
1974
+ * The `fatal` field of the message is set to `true` (error; file not usable)
1975
+ * and the `file` field is set to the current file path.
1976
+ * The message is added to the `messages` field on `file`.
1977
+ *
1978
+ * > 🪦 **Note**: also has obsolete signatures.
1979
+ *
1980
+ * @overload
1981
+ * @param {string} reason
1982
+ * @param {MessageOptions | null | undefined} [options]
1983
+ * @returns {never}
1984
+ *
1985
+ * @overload
1986
+ * @param {string} reason
1987
+ * @param {Node | NodeLike | null | undefined} parent
1988
+ * @param {string | null | undefined} [origin]
1989
+ * @returns {never}
1990
+ *
1991
+ * @overload
1992
+ * @param {string} reason
1993
+ * @param {Point | Position | null | undefined} place
1994
+ * @param {string | null | undefined} [origin]
1995
+ * @returns {never}
1996
+ *
1997
+ * @overload
1998
+ * @param {string} reason
1999
+ * @param {string | null | undefined} [origin]
2000
+ * @returns {never}
2001
+ *
2002
+ * @overload
2003
+ * @param {Error | VFileMessage} cause
2004
+ * @param {Node | NodeLike | null | undefined} parent
2005
+ * @param {string | null | undefined} [origin]
2006
+ * @returns {never}
2007
+ *
2008
+ * @overload
2009
+ * @param {Error | VFileMessage} cause
2010
+ * @param {Point | Position | null | undefined} place
2011
+ * @param {string | null | undefined} [origin]
2012
+ * @returns {never}
2013
+ *
2014
+ * @overload
2015
+ * @param {Error | VFileMessage} cause
2016
+ * @param {string | null | undefined} [origin]
2017
+ * @returns {never}
2018
+ *
2019
+ * @param {Error | VFileMessage | string} causeOrReason
2020
+ * Reason for message, should use markdown.
2021
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
2022
+ * Configuration (optional).
2023
+ * @param {string | null | undefined} [origin]
2024
+ * Place in code where the message originates (example:
2025
+ * `'my-package:my-rule'` or `'my-rule'`).
2026
+ * @returns {never}
2027
+ * Never.
2028
+ * @throws {VFileMessage}
2029
+ * Message.
2030
+ */
2031
+ fail(cause: Error | VFileMessage, parent: Node$2 | NodeLike | null | undefined, origin?: string | null | undefined): never;
2032
+ /**
2033
+ * Create a fatal message for `reason` associated with the file.
2034
+ *
2035
+ * The `fatal` field of the message is set to `true` (error; file not usable)
2036
+ * and the `file` field is set to the current file path.
2037
+ * The message is added to the `messages` field on `file`.
2038
+ *
2039
+ * > 🪦 **Note**: also has obsolete signatures.
2040
+ *
2041
+ * @overload
2042
+ * @param {string} reason
2043
+ * @param {MessageOptions | null | undefined} [options]
2044
+ * @returns {never}
2045
+ *
2046
+ * @overload
2047
+ * @param {string} reason
2048
+ * @param {Node | NodeLike | null | undefined} parent
2049
+ * @param {string | null | undefined} [origin]
2050
+ * @returns {never}
2051
+ *
2052
+ * @overload
2053
+ * @param {string} reason
2054
+ * @param {Point | Position | null | undefined} place
2055
+ * @param {string | null | undefined} [origin]
2056
+ * @returns {never}
2057
+ *
2058
+ * @overload
2059
+ * @param {string} reason
2060
+ * @param {string | null | undefined} [origin]
2061
+ * @returns {never}
2062
+ *
2063
+ * @overload
2064
+ * @param {Error | VFileMessage} cause
2065
+ * @param {Node | NodeLike | null | undefined} parent
2066
+ * @param {string | null | undefined} [origin]
2067
+ * @returns {never}
2068
+ *
2069
+ * @overload
2070
+ * @param {Error | VFileMessage} cause
2071
+ * @param {Point | Position | null | undefined} place
2072
+ * @param {string | null | undefined} [origin]
2073
+ * @returns {never}
2074
+ *
2075
+ * @overload
2076
+ * @param {Error | VFileMessage} cause
2077
+ * @param {string | null | undefined} [origin]
2078
+ * @returns {never}
2079
+ *
2080
+ * @param {Error | VFileMessage | string} causeOrReason
2081
+ * Reason for message, should use markdown.
2082
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
2083
+ * Configuration (optional).
2084
+ * @param {string | null | undefined} [origin]
2085
+ * Place in code where the message originates (example:
2086
+ * `'my-package:my-rule'` or `'my-rule'`).
2087
+ * @returns {never}
2088
+ * Never.
2089
+ * @throws {VFileMessage}
2090
+ * Message.
2091
+ */
2092
+ fail(cause: Error | VFileMessage, place: Point | Position | null | undefined, origin?: string | null | undefined): never;
2093
+ /**
2094
+ * Create a fatal message for `reason` associated with the file.
2095
+ *
2096
+ * The `fatal` field of the message is set to `true` (error; file not usable)
2097
+ * and the `file` field is set to the current file path.
2098
+ * The message is added to the `messages` field on `file`.
2099
+ *
2100
+ * > 🪦 **Note**: also has obsolete signatures.
2101
+ *
2102
+ * @overload
2103
+ * @param {string} reason
2104
+ * @param {MessageOptions | null | undefined} [options]
2105
+ * @returns {never}
2106
+ *
2107
+ * @overload
2108
+ * @param {string} reason
2109
+ * @param {Node | NodeLike | null | undefined} parent
2110
+ * @param {string | null | undefined} [origin]
2111
+ * @returns {never}
2112
+ *
2113
+ * @overload
2114
+ * @param {string} reason
2115
+ * @param {Point | Position | null | undefined} place
2116
+ * @param {string | null | undefined} [origin]
2117
+ * @returns {never}
2118
+ *
2119
+ * @overload
2120
+ * @param {string} reason
2121
+ * @param {string | null | undefined} [origin]
2122
+ * @returns {never}
2123
+ *
2124
+ * @overload
2125
+ * @param {Error | VFileMessage} cause
2126
+ * @param {Node | NodeLike | null | undefined} parent
2127
+ * @param {string | null | undefined} [origin]
2128
+ * @returns {never}
2129
+ *
2130
+ * @overload
2131
+ * @param {Error | VFileMessage} cause
2132
+ * @param {Point | Position | null | undefined} place
2133
+ * @param {string | null | undefined} [origin]
2134
+ * @returns {never}
2135
+ *
2136
+ * @overload
2137
+ * @param {Error | VFileMessage} cause
2138
+ * @param {string | null | undefined} [origin]
2139
+ * @returns {never}
2140
+ *
2141
+ * @param {Error | VFileMessage | string} causeOrReason
2142
+ * Reason for message, should use markdown.
2143
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
2144
+ * Configuration (optional).
2145
+ * @param {string | null | undefined} [origin]
2146
+ * Place in code where the message originates (example:
2147
+ * `'my-package:my-rule'` or `'my-rule'`).
2148
+ * @returns {never}
2149
+ * Never.
2150
+ * @throws {VFileMessage}
2151
+ * Message.
2152
+ */
2153
+ fail(cause: Error | VFileMessage, origin?: string | null | undefined): never;
2154
+ /**
2155
+ * Create an info message for `reason` associated with the file.
2156
+ *
2157
+ * The `fatal` field of the message is set to `undefined` (info; change
2158
+ * likely not needed) and the `file` field is set to the current file path.
2159
+ * The message is added to the `messages` field on `file`.
2160
+ *
2161
+ * > 🪦 **Note**: also has obsolete signatures.
2162
+ *
2163
+ * @overload
2164
+ * @param {string} reason
2165
+ * @param {MessageOptions | null | undefined} [options]
2166
+ * @returns {VFileMessage}
2167
+ *
2168
+ * @overload
2169
+ * @param {string} reason
2170
+ * @param {Node | NodeLike | null | undefined} parent
2171
+ * @param {string | null | undefined} [origin]
2172
+ * @returns {VFileMessage}
2173
+ *
2174
+ * @overload
2175
+ * @param {string} reason
2176
+ * @param {Point | Position | null | undefined} place
2177
+ * @param {string | null | undefined} [origin]
2178
+ * @returns {VFileMessage}
2179
+ *
2180
+ * @overload
2181
+ * @param {string} reason
2182
+ * @param {string | null | undefined} [origin]
2183
+ * @returns {VFileMessage}
2184
+ *
2185
+ * @overload
2186
+ * @param {Error | VFileMessage} cause
2187
+ * @param {Node | NodeLike | null | undefined} parent
2188
+ * @param {string | null | undefined} [origin]
2189
+ * @returns {VFileMessage}
2190
+ *
2191
+ * @overload
2192
+ * @param {Error | VFileMessage} cause
2193
+ * @param {Point | Position | null | undefined} place
2194
+ * @param {string | null | undefined} [origin]
2195
+ * @returns {VFileMessage}
2196
+ *
2197
+ * @overload
2198
+ * @param {Error | VFileMessage} cause
2199
+ * @param {string | null | undefined} [origin]
2200
+ * @returns {VFileMessage}
2201
+ *
2202
+ * @param {Error | VFileMessage | string} causeOrReason
2203
+ * Reason for message, should use markdown.
2204
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
2205
+ * Configuration (optional).
2206
+ * @param {string | null | undefined} [origin]
2207
+ * Place in code where the message originates (example:
2208
+ * `'my-package:my-rule'` or `'my-rule'`).
2209
+ * @returns {VFileMessage}
2210
+ * Message.
2211
+ */
2212
+ info(reason: string, options?: Options$1 | null | undefined): VFileMessage;
2213
+ /**
2214
+ * Create an info message for `reason` associated with the file.
2215
+ *
2216
+ * The `fatal` field of the message is set to `undefined` (info; change
2217
+ * likely not needed) and the `file` field is set to the current file path.
2218
+ * The message is added to the `messages` field on `file`.
2219
+ *
2220
+ * > 🪦 **Note**: also has obsolete signatures.
2221
+ *
2222
+ * @overload
2223
+ * @param {string} reason
2224
+ * @param {MessageOptions | null | undefined} [options]
2225
+ * @returns {VFileMessage}
2226
+ *
2227
+ * @overload
2228
+ * @param {string} reason
2229
+ * @param {Node | NodeLike | null | undefined} parent
2230
+ * @param {string | null | undefined} [origin]
2231
+ * @returns {VFileMessage}
2232
+ *
2233
+ * @overload
2234
+ * @param {string} reason
2235
+ * @param {Point | Position | null | undefined} place
2236
+ * @param {string | null | undefined} [origin]
2237
+ * @returns {VFileMessage}
2238
+ *
2239
+ * @overload
2240
+ * @param {string} reason
2241
+ * @param {string | null | undefined} [origin]
2242
+ * @returns {VFileMessage}
2243
+ *
2244
+ * @overload
2245
+ * @param {Error | VFileMessage} cause
2246
+ * @param {Node | NodeLike | null | undefined} parent
2247
+ * @param {string | null | undefined} [origin]
2248
+ * @returns {VFileMessage}
2249
+ *
2250
+ * @overload
2251
+ * @param {Error | VFileMessage} cause
2252
+ * @param {Point | Position | null | undefined} place
2253
+ * @param {string | null | undefined} [origin]
2254
+ * @returns {VFileMessage}
2255
+ *
2256
+ * @overload
2257
+ * @param {Error | VFileMessage} cause
2258
+ * @param {string | null | undefined} [origin]
2259
+ * @returns {VFileMessage}
2260
+ *
2261
+ * @param {Error | VFileMessage | string} causeOrReason
2262
+ * Reason for message, should use markdown.
2263
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
2264
+ * Configuration (optional).
2265
+ * @param {string | null | undefined} [origin]
2266
+ * Place in code where the message originates (example:
2267
+ * `'my-package:my-rule'` or `'my-rule'`).
2268
+ * @returns {VFileMessage}
2269
+ * Message.
2270
+ */
2271
+ info(reason: string, parent: Node$2 | NodeLike | null | undefined, origin?: string | null | undefined): VFileMessage;
2272
+ /**
2273
+ * Create an info message for `reason` associated with the file.
2274
+ *
2275
+ * The `fatal` field of the message is set to `undefined` (info; change
2276
+ * likely not needed) and the `file` field is set to the current file path.
2277
+ * The message is added to the `messages` field on `file`.
2278
+ *
2279
+ * > 🪦 **Note**: also has obsolete signatures.
2280
+ *
2281
+ * @overload
2282
+ * @param {string} reason
2283
+ * @param {MessageOptions | null | undefined} [options]
2284
+ * @returns {VFileMessage}
2285
+ *
2286
+ * @overload
2287
+ * @param {string} reason
2288
+ * @param {Node | NodeLike | null | undefined} parent
2289
+ * @param {string | null | undefined} [origin]
2290
+ * @returns {VFileMessage}
2291
+ *
2292
+ * @overload
2293
+ * @param {string} reason
2294
+ * @param {Point | Position | null | undefined} place
2295
+ * @param {string | null | undefined} [origin]
2296
+ * @returns {VFileMessage}
2297
+ *
2298
+ * @overload
2299
+ * @param {string} reason
2300
+ * @param {string | null | undefined} [origin]
2301
+ * @returns {VFileMessage}
2302
+ *
2303
+ * @overload
2304
+ * @param {Error | VFileMessage} cause
2305
+ * @param {Node | NodeLike | null | undefined} parent
2306
+ * @param {string | null | undefined} [origin]
2307
+ * @returns {VFileMessage}
2308
+ *
2309
+ * @overload
2310
+ * @param {Error | VFileMessage} cause
2311
+ * @param {Point | Position | null | undefined} place
2312
+ * @param {string | null | undefined} [origin]
2313
+ * @returns {VFileMessage}
2314
+ *
2315
+ * @overload
2316
+ * @param {Error | VFileMessage} cause
2317
+ * @param {string | null | undefined} [origin]
2318
+ * @returns {VFileMessage}
2319
+ *
2320
+ * @param {Error | VFileMessage | string} causeOrReason
2321
+ * Reason for message, should use markdown.
2322
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
2323
+ * Configuration (optional).
2324
+ * @param {string | null | undefined} [origin]
2325
+ * Place in code where the message originates (example:
2326
+ * `'my-package:my-rule'` or `'my-rule'`).
2327
+ * @returns {VFileMessage}
2328
+ * Message.
2329
+ */
2330
+ info(reason: string, place: Point | Position | null | undefined, origin?: string | null | undefined): VFileMessage;
2331
+ /**
2332
+ * Create an info message for `reason` associated with the file.
2333
+ *
2334
+ * The `fatal` field of the message is set to `undefined` (info; change
2335
+ * likely not needed) and the `file` field is set to the current file path.
2336
+ * The message is added to the `messages` field on `file`.
2337
+ *
2338
+ * > 🪦 **Note**: also has obsolete signatures.
2339
+ *
2340
+ * @overload
2341
+ * @param {string} reason
2342
+ * @param {MessageOptions | null | undefined} [options]
2343
+ * @returns {VFileMessage}
2344
+ *
2345
+ * @overload
2346
+ * @param {string} reason
2347
+ * @param {Node | NodeLike | null | undefined} parent
2348
+ * @param {string | null | undefined} [origin]
2349
+ * @returns {VFileMessage}
2350
+ *
2351
+ * @overload
2352
+ * @param {string} reason
2353
+ * @param {Point | Position | null | undefined} place
2354
+ * @param {string | null | undefined} [origin]
2355
+ * @returns {VFileMessage}
2356
+ *
2357
+ * @overload
2358
+ * @param {string} reason
2359
+ * @param {string | null | undefined} [origin]
2360
+ * @returns {VFileMessage}
2361
+ *
2362
+ * @overload
2363
+ * @param {Error | VFileMessage} cause
2364
+ * @param {Node | NodeLike | null | undefined} parent
2365
+ * @param {string | null | undefined} [origin]
2366
+ * @returns {VFileMessage}
2367
+ *
2368
+ * @overload
2369
+ * @param {Error | VFileMessage} cause
2370
+ * @param {Point | Position | null | undefined} place
2371
+ * @param {string | null | undefined} [origin]
2372
+ * @returns {VFileMessage}
2373
+ *
2374
+ * @overload
2375
+ * @param {Error | VFileMessage} cause
2376
+ * @param {string | null | undefined} [origin]
2377
+ * @returns {VFileMessage}
2378
+ *
2379
+ * @param {Error | VFileMessage | string} causeOrReason
2380
+ * Reason for message, should use markdown.
2381
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
2382
+ * Configuration (optional).
2383
+ * @param {string | null | undefined} [origin]
2384
+ * Place in code where the message originates (example:
2385
+ * `'my-package:my-rule'` or `'my-rule'`).
2386
+ * @returns {VFileMessage}
2387
+ * Message.
2388
+ */
2389
+ info(reason: string, origin?: string | null | undefined): VFileMessage;
2390
+ /**
2391
+ * Create an info message for `reason` associated with the file.
2392
+ *
2393
+ * The `fatal` field of the message is set to `undefined` (info; change
2394
+ * likely not needed) and the `file` field is set to the current file path.
2395
+ * The message is added to the `messages` field on `file`.
2396
+ *
2397
+ * > 🪦 **Note**: also has obsolete signatures.
2398
+ *
2399
+ * @overload
2400
+ * @param {string} reason
2401
+ * @param {MessageOptions | null | undefined} [options]
2402
+ * @returns {VFileMessage}
2403
+ *
2404
+ * @overload
2405
+ * @param {string} reason
2406
+ * @param {Node | NodeLike | null | undefined} parent
2407
+ * @param {string | null | undefined} [origin]
2408
+ * @returns {VFileMessage}
2409
+ *
2410
+ * @overload
2411
+ * @param {string} reason
2412
+ * @param {Point | Position | null | undefined} place
2413
+ * @param {string | null | undefined} [origin]
2414
+ * @returns {VFileMessage}
2415
+ *
2416
+ * @overload
2417
+ * @param {string} reason
2418
+ * @param {string | null | undefined} [origin]
2419
+ * @returns {VFileMessage}
2420
+ *
2421
+ * @overload
2422
+ * @param {Error | VFileMessage} cause
2423
+ * @param {Node | NodeLike | null | undefined} parent
2424
+ * @param {string | null | undefined} [origin]
2425
+ * @returns {VFileMessage}
2426
+ *
2427
+ * @overload
2428
+ * @param {Error | VFileMessage} cause
2429
+ * @param {Point | Position | null | undefined} place
2430
+ * @param {string | null | undefined} [origin]
2431
+ * @returns {VFileMessage}
2432
+ *
2433
+ * @overload
2434
+ * @param {Error | VFileMessage} cause
2435
+ * @param {string | null | undefined} [origin]
2436
+ * @returns {VFileMessage}
2437
+ *
2438
+ * @param {Error | VFileMessage | string} causeOrReason
2439
+ * Reason for message, should use markdown.
2440
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
2441
+ * Configuration (optional).
2442
+ * @param {string | null | undefined} [origin]
2443
+ * Place in code where the message originates (example:
2444
+ * `'my-package:my-rule'` or `'my-rule'`).
2445
+ * @returns {VFileMessage}
2446
+ * Message.
2447
+ */
2448
+ info(cause: Error | VFileMessage, parent: Node$2 | NodeLike | null | undefined, origin?: string | null | undefined): VFileMessage;
2449
+ /**
2450
+ * Create an info message for `reason` associated with the file.
2451
+ *
2452
+ * The `fatal` field of the message is set to `undefined` (info; change
2453
+ * likely not needed) and the `file` field is set to the current file path.
2454
+ * The message is added to the `messages` field on `file`.
2455
+ *
2456
+ * > 🪦 **Note**: also has obsolete signatures.
2457
+ *
2458
+ * @overload
2459
+ * @param {string} reason
2460
+ * @param {MessageOptions | null | undefined} [options]
2461
+ * @returns {VFileMessage}
2462
+ *
2463
+ * @overload
2464
+ * @param {string} reason
2465
+ * @param {Node | NodeLike | null | undefined} parent
2466
+ * @param {string | null | undefined} [origin]
2467
+ * @returns {VFileMessage}
2468
+ *
2469
+ * @overload
2470
+ * @param {string} reason
2471
+ * @param {Point | Position | null | undefined} place
2472
+ * @param {string | null | undefined} [origin]
2473
+ * @returns {VFileMessage}
2474
+ *
2475
+ * @overload
2476
+ * @param {string} reason
2477
+ * @param {string | null | undefined} [origin]
2478
+ * @returns {VFileMessage}
2479
+ *
2480
+ * @overload
2481
+ * @param {Error | VFileMessage} cause
2482
+ * @param {Node | NodeLike | null | undefined} parent
2483
+ * @param {string | null | undefined} [origin]
2484
+ * @returns {VFileMessage}
2485
+ *
2486
+ * @overload
2487
+ * @param {Error | VFileMessage} cause
2488
+ * @param {Point | Position | null | undefined} place
2489
+ * @param {string | null | undefined} [origin]
2490
+ * @returns {VFileMessage}
2491
+ *
2492
+ * @overload
2493
+ * @param {Error | VFileMessage} cause
2494
+ * @param {string | null | undefined} [origin]
2495
+ * @returns {VFileMessage}
2496
+ *
2497
+ * @param {Error | VFileMessage | string} causeOrReason
2498
+ * Reason for message, should use markdown.
2499
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
2500
+ * Configuration (optional).
2501
+ * @param {string | null | undefined} [origin]
2502
+ * Place in code where the message originates (example:
2503
+ * `'my-package:my-rule'` or `'my-rule'`).
2504
+ * @returns {VFileMessage}
2505
+ * Message.
2506
+ */
2507
+ info(cause: Error | VFileMessage, place: Point | Position | null | undefined, origin?: string | null | undefined): VFileMessage;
2508
+ /**
2509
+ * Create an info message for `reason` associated with the file.
2510
+ *
2511
+ * The `fatal` field of the message is set to `undefined` (info; change
2512
+ * likely not needed) and the `file` field is set to the current file path.
2513
+ * The message is added to the `messages` field on `file`.
2514
+ *
2515
+ * > 🪦 **Note**: also has obsolete signatures.
2516
+ *
2517
+ * @overload
2518
+ * @param {string} reason
2519
+ * @param {MessageOptions | null | undefined} [options]
2520
+ * @returns {VFileMessage}
2521
+ *
2522
+ * @overload
2523
+ * @param {string} reason
2524
+ * @param {Node | NodeLike | null | undefined} parent
2525
+ * @param {string | null | undefined} [origin]
2526
+ * @returns {VFileMessage}
2527
+ *
2528
+ * @overload
2529
+ * @param {string} reason
2530
+ * @param {Point | Position | null | undefined} place
2531
+ * @param {string | null | undefined} [origin]
2532
+ * @returns {VFileMessage}
2533
+ *
2534
+ * @overload
2535
+ * @param {string} reason
2536
+ * @param {string | null | undefined} [origin]
2537
+ * @returns {VFileMessage}
2538
+ *
2539
+ * @overload
2540
+ * @param {Error | VFileMessage} cause
2541
+ * @param {Node | NodeLike | null | undefined} parent
2542
+ * @param {string | null | undefined} [origin]
2543
+ * @returns {VFileMessage}
2544
+ *
2545
+ * @overload
2546
+ * @param {Error | VFileMessage} cause
2547
+ * @param {Point | Position | null | undefined} place
2548
+ * @param {string | null | undefined} [origin]
2549
+ * @returns {VFileMessage}
2550
+ *
2551
+ * @overload
2552
+ * @param {Error | VFileMessage} cause
2553
+ * @param {string | null | undefined} [origin]
2554
+ * @returns {VFileMessage}
2555
+ *
2556
+ * @param {Error | VFileMessage | string} causeOrReason
2557
+ * Reason for message, should use markdown.
2558
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
2559
+ * Configuration (optional).
2560
+ * @param {string | null | undefined} [origin]
2561
+ * Place in code where the message originates (example:
2562
+ * `'my-package:my-rule'` or `'my-rule'`).
2563
+ * @returns {VFileMessage}
2564
+ * Message.
2565
+ */
2566
+ info(cause: Error | VFileMessage, origin?: string | null | undefined): VFileMessage;
2567
+ /**
2568
+ * Create a message for `reason` associated with the file.
2569
+ *
2570
+ * The `fatal` field of the message is set to `false` (warning; change may be
2571
+ * needed) and the `file` field is set to the current file path.
2572
+ * The message is added to the `messages` field on `file`.
2573
+ *
2574
+ * > 🪦 **Note**: also has obsolete signatures.
2575
+ *
2576
+ * @overload
2577
+ * @param {string} reason
2578
+ * @param {MessageOptions | null | undefined} [options]
2579
+ * @returns {VFileMessage}
2580
+ *
2581
+ * @overload
2582
+ * @param {string} reason
2583
+ * @param {Node | NodeLike | null | undefined} parent
2584
+ * @param {string | null | undefined} [origin]
2585
+ * @returns {VFileMessage}
2586
+ *
2587
+ * @overload
2588
+ * @param {string} reason
2589
+ * @param {Point | Position | null | undefined} place
2590
+ * @param {string | null | undefined} [origin]
2591
+ * @returns {VFileMessage}
2592
+ *
2593
+ * @overload
2594
+ * @param {string} reason
2595
+ * @param {string | null | undefined} [origin]
2596
+ * @returns {VFileMessage}
2597
+ *
2598
+ * @overload
2599
+ * @param {Error | VFileMessage} cause
2600
+ * @param {Node | NodeLike | null | undefined} parent
2601
+ * @param {string | null | undefined} [origin]
2602
+ * @returns {VFileMessage}
2603
+ *
2604
+ * @overload
2605
+ * @param {Error | VFileMessage} cause
2606
+ * @param {Point | Position | null | undefined} place
2607
+ * @param {string | null | undefined} [origin]
2608
+ * @returns {VFileMessage}
2609
+ *
2610
+ * @overload
2611
+ * @param {Error | VFileMessage} cause
2612
+ * @param {string | null | undefined} [origin]
2613
+ * @returns {VFileMessage}
2614
+ *
2615
+ * @param {Error | VFileMessage | string} causeOrReason
2616
+ * Reason for message, should use markdown.
2617
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
2618
+ * Configuration (optional).
2619
+ * @param {string | null | undefined} [origin]
2620
+ * Place in code where the message originates (example:
2621
+ * `'my-package:my-rule'` or `'my-rule'`).
2622
+ * @returns {VFileMessage}
2623
+ * Message.
2624
+ */
2625
+ message(reason: string, options?: Options$1 | null | undefined): VFileMessage;
2626
+ /**
2627
+ * Create a message for `reason` associated with the file.
2628
+ *
2629
+ * The `fatal` field of the message is set to `false` (warning; change may be
2630
+ * needed) and the `file` field is set to the current file path.
2631
+ * The message is added to the `messages` field on `file`.
2632
+ *
2633
+ * > 🪦 **Note**: also has obsolete signatures.
2634
+ *
2635
+ * @overload
2636
+ * @param {string} reason
2637
+ * @param {MessageOptions | null | undefined} [options]
2638
+ * @returns {VFileMessage}
2639
+ *
2640
+ * @overload
2641
+ * @param {string} reason
2642
+ * @param {Node | NodeLike | null | undefined} parent
2643
+ * @param {string | null | undefined} [origin]
2644
+ * @returns {VFileMessage}
2645
+ *
2646
+ * @overload
2647
+ * @param {string} reason
2648
+ * @param {Point | Position | null | undefined} place
2649
+ * @param {string | null | undefined} [origin]
2650
+ * @returns {VFileMessage}
2651
+ *
2652
+ * @overload
2653
+ * @param {string} reason
2654
+ * @param {string | null | undefined} [origin]
2655
+ * @returns {VFileMessage}
2656
+ *
2657
+ * @overload
2658
+ * @param {Error | VFileMessage} cause
2659
+ * @param {Node | NodeLike | null | undefined} parent
2660
+ * @param {string | null | undefined} [origin]
2661
+ * @returns {VFileMessage}
2662
+ *
2663
+ * @overload
2664
+ * @param {Error | VFileMessage} cause
2665
+ * @param {Point | Position | null | undefined} place
2666
+ * @param {string | null | undefined} [origin]
2667
+ * @returns {VFileMessage}
2668
+ *
2669
+ * @overload
2670
+ * @param {Error | VFileMessage} cause
2671
+ * @param {string | null | undefined} [origin]
2672
+ * @returns {VFileMessage}
2673
+ *
2674
+ * @param {Error | VFileMessage | string} causeOrReason
2675
+ * Reason for message, should use markdown.
2676
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
2677
+ * Configuration (optional).
2678
+ * @param {string | null | undefined} [origin]
2679
+ * Place in code where the message originates (example:
2680
+ * `'my-package:my-rule'` or `'my-rule'`).
2681
+ * @returns {VFileMessage}
2682
+ * Message.
2683
+ */
2684
+ message(reason: string, parent: Node$2 | NodeLike | null | undefined, origin?: string | null | undefined): VFileMessage;
2685
+ /**
2686
+ * Create a message for `reason` associated with the file.
2687
+ *
2688
+ * The `fatal` field of the message is set to `false` (warning; change may be
2689
+ * needed) and the `file` field is set to the current file path.
2690
+ * The message is added to the `messages` field on `file`.
2691
+ *
2692
+ * > 🪦 **Note**: also has obsolete signatures.
2693
+ *
2694
+ * @overload
2695
+ * @param {string} reason
2696
+ * @param {MessageOptions | null | undefined} [options]
2697
+ * @returns {VFileMessage}
2698
+ *
2699
+ * @overload
2700
+ * @param {string} reason
2701
+ * @param {Node | NodeLike | null | undefined} parent
2702
+ * @param {string | null | undefined} [origin]
2703
+ * @returns {VFileMessage}
2704
+ *
2705
+ * @overload
2706
+ * @param {string} reason
2707
+ * @param {Point | Position | null | undefined} place
2708
+ * @param {string | null | undefined} [origin]
2709
+ * @returns {VFileMessage}
2710
+ *
2711
+ * @overload
2712
+ * @param {string} reason
2713
+ * @param {string | null | undefined} [origin]
2714
+ * @returns {VFileMessage}
2715
+ *
2716
+ * @overload
2717
+ * @param {Error | VFileMessage} cause
2718
+ * @param {Node | NodeLike | null | undefined} parent
2719
+ * @param {string | null | undefined} [origin]
2720
+ * @returns {VFileMessage}
2721
+ *
2722
+ * @overload
2723
+ * @param {Error | VFileMessage} cause
2724
+ * @param {Point | Position | null | undefined} place
2725
+ * @param {string | null | undefined} [origin]
2726
+ * @returns {VFileMessage}
2727
+ *
2728
+ * @overload
2729
+ * @param {Error | VFileMessage} cause
2730
+ * @param {string | null | undefined} [origin]
2731
+ * @returns {VFileMessage}
2732
+ *
2733
+ * @param {Error | VFileMessage | string} causeOrReason
2734
+ * Reason for message, should use markdown.
2735
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
2736
+ * Configuration (optional).
2737
+ * @param {string | null | undefined} [origin]
2738
+ * Place in code where the message originates (example:
2739
+ * `'my-package:my-rule'` or `'my-rule'`).
2740
+ * @returns {VFileMessage}
2741
+ * Message.
2742
+ */
2743
+ message(reason: string, place: Point | Position | null | undefined, origin?: string | null | undefined): VFileMessage;
2744
+ /**
2745
+ * Create a message for `reason` associated with the file.
2746
+ *
2747
+ * The `fatal` field of the message is set to `false` (warning; change may be
2748
+ * needed) and the `file` field is set to the current file path.
2749
+ * The message is added to the `messages` field on `file`.
2750
+ *
2751
+ * > 🪦 **Note**: also has obsolete signatures.
2752
+ *
2753
+ * @overload
2754
+ * @param {string} reason
2755
+ * @param {MessageOptions | null | undefined} [options]
2756
+ * @returns {VFileMessage}
2757
+ *
2758
+ * @overload
2759
+ * @param {string} reason
2760
+ * @param {Node | NodeLike | null | undefined} parent
2761
+ * @param {string | null | undefined} [origin]
2762
+ * @returns {VFileMessage}
2763
+ *
2764
+ * @overload
2765
+ * @param {string} reason
2766
+ * @param {Point | Position | null | undefined} place
2767
+ * @param {string | null | undefined} [origin]
2768
+ * @returns {VFileMessage}
2769
+ *
2770
+ * @overload
2771
+ * @param {string} reason
2772
+ * @param {string | null | undefined} [origin]
2773
+ * @returns {VFileMessage}
2774
+ *
2775
+ * @overload
2776
+ * @param {Error | VFileMessage} cause
2777
+ * @param {Node | NodeLike | null | undefined} parent
2778
+ * @param {string | null | undefined} [origin]
2779
+ * @returns {VFileMessage}
2780
+ *
2781
+ * @overload
2782
+ * @param {Error | VFileMessage} cause
2783
+ * @param {Point | Position | null | undefined} place
2784
+ * @param {string | null | undefined} [origin]
2785
+ * @returns {VFileMessage}
2786
+ *
2787
+ * @overload
2788
+ * @param {Error | VFileMessage} cause
2789
+ * @param {string | null | undefined} [origin]
2790
+ * @returns {VFileMessage}
2791
+ *
2792
+ * @param {Error | VFileMessage | string} causeOrReason
2793
+ * Reason for message, should use markdown.
2794
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
2795
+ * Configuration (optional).
2796
+ * @param {string | null | undefined} [origin]
2797
+ * Place in code where the message originates (example:
2798
+ * `'my-package:my-rule'` or `'my-rule'`).
2799
+ * @returns {VFileMessage}
2800
+ * Message.
2801
+ */
2802
+ message(reason: string, origin?: string | null | undefined): VFileMessage;
2803
+ /**
2804
+ * Create a message for `reason` associated with the file.
2805
+ *
2806
+ * The `fatal` field of the message is set to `false` (warning; change may be
2807
+ * needed) and the `file` field is set to the current file path.
2808
+ * The message is added to the `messages` field on `file`.
2809
+ *
2810
+ * > 🪦 **Note**: also has obsolete signatures.
2811
+ *
2812
+ * @overload
2813
+ * @param {string} reason
2814
+ * @param {MessageOptions | null | undefined} [options]
2815
+ * @returns {VFileMessage}
2816
+ *
2817
+ * @overload
2818
+ * @param {string} reason
2819
+ * @param {Node | NodeLike | null | undefined} parent
2820
+ * @param {string | null | undefined} [origin]
2821
+ * @returns {VFileMessage}
2822
+ *
2823
+ * @overload
2824
+ * @param {string} reason
2825
+ * @param {Point | Position | null | undefined} place
2826
+ * @param {string | null | undefined} [origin]
2827
+ * @returns {VFileMessage}
2828
+ *
2829
+ * @overload
2830
+ * @param {string} reason
2831
+ * @param {string | null | undefined} [origin]
2832
+ * @returns {VFileMessage}
2833
+ *
2834
+ * @overload
2835
+ * @param {Error | VFileMessage} cause
2836
+ * @param {Node | NodeLike | null | undefined} parent
2837
+ * @param {string | null | undefined} [origin]
2838
+ * @returns {VFileMessage}
2839
+ *
2840
+ * @overload
2841
+ * @param {Error | VFileMessage} cause
2842
+ * @param {Point | Position | null | undefined} place
2843
+ * @param {string | null | undefined} [origin]
2844
+ * @returns {VFileMessage}
2845
+ *
2846
+ * @overload
2847
+ * @param {Error | VFileMessage} cause
2848
+ * @param {string | null | undefined} [origin]
2849
+ * @returns {VFileMessage}
2850
+ *
2851
+ * @param {Error | VFileMessage | string} causeOrReason
2852
+ * Reason for message, should use markdown.
2853
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
2854
+ * Configuration (optional).
2855
+ * @param {string | null | undefined} [origin]
2856
+ * Place in code where the message originates (example:
2857
+ * `'my-package:my-rule'` or `'my-rule'`).
2858
+ * @returns {VFileMessage}
2859
+ * Message.
2860
+ */
2861
+ message(cause: Error | VFileMessage, parent: Node$2 | NodeLike | null | undefined, origin?: string | null | undefined): VFileMessage;
2862
+ /**
2863
+ * Create a message for `reason` associated with the file.
2864
+ *
2865
+ * The `fatal` field of the message is set to `false` (warning; change may be
2866
+ * needed) and the `file` field is set to the current file path.
2867
+ * The message is added to the `messages` field on `file`.
2868
+ *
2869
+ * > 🪦 **Note**: also has obsolete signatures.
2870
+ *
2871
+ * @overload
2872
+ * @param {string} reason
2873
+ * @param {MessageOptions | null | undefined} [options]
2874
+ * @returns {VFileMessage}
2875
+ *
2876
+ * @overload
2877
+ * @param {string} reason
2878
+ * @param {Node | NodeLike | null | undefined} parent
2879
+ * @param {string | null | undefined} [origin]
2880
+ * @returns {VFileMessage}
2881
+ *
2882
+ * @overload
2883
+ * @param {string} reason
2884
+ * @param {Point | Position | null | undefined} place
2885
+ * @param {string | null | undefined} [origin]
2886
+ * @returns {VFileMessage}
2887
+ *
2888
+ * @overload
2889
+ * @param {string} reason
2890
+ * @param {string | null | undefined} [origin]
2891
+ * @returns {VFileMessage}
2892
+ *
2893
+ * @overload
2894
+ * @param {Error | VFileMessage} cause
2895
+ * @param {Node | NodeLike | null | undefined} parent
2896
+ * @param {string | null | undefined} [origin]
2897
+ * @returns {VFileMessage}
2898
+ *
2899
+ * @overload
2900
+ * @param {Error | VFileMessage} cause
2901
+ * @param {Point | Position | null | undefined} place
2902
+ * @param {string | null | undefined} [origin]
2903
+ * @returns {VFileMessage}
2904
+ *
2905
+ * @overload
2906
+ * @param {Error | VFileMessage} cause
2907
+ * @param {string | null | undefined} [origin]
2908
+ * @returns {VFileMessage}
2909
+ *
2910
+ * @param {Error | VFileMessage | string} causeOrReason
2911
+ * Reason for message, should use markdown.
2912
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
2913
+ * Configuration (optional).
2914
+ * @param {string | null | undefined} [origin]
2915
+ * Place in code where the message originates (example:
2916
+ * `'my-package:my-rule'` or `'my-rule'`).
2917
+ * @returns {VFileMessage}
2918
+ * Message.
2919
+ */
2920
+ message(cause: Error | VFileMessage, place: Point | Position | null | undefined, origin?: string | null | undefined): VFileMessage;
2921
+ /**
2922
+ * Create a message for `reason` associated with the file.
2923
+ *
2924
+ * The `fatal` field of the message is set to `false` (warning; change may be
2925
+ * needed) and the `file` field is set to the current file path.
2926
+ * The message is added to the `messages` field on `file`.
2927
+ *
2928
+ * > 🪦 **Note**: also has obsolete signatures.
2929
+ *
2930
+ * @overload
2931
+ * @param {string} reason
2932
+ * @param {MessageOptions | null | undefined} [options]
2933
+ * @returns {VFileMessage}
2934
+ *
2935
+ * @overload
2936
+ * @param {string} reason
2937
+ * @param {Node | NodeLike | null | undefined} parent
2938
+ * @param {string | null | undefined} [origin]
2939
+ * @returns {VFileMessage}
2940
+ *
2941
+ * @overload
2942
+ * @param {string} reason
2943
+ * @param {Point | Position | null | undefined} place
2944
+ * @param {string | null | undefined} [origin]
2945
+ * @returns {VFileMessage}
2946
+ *
2947
+ * @overload
2948
+ * @param {string} reason
2949
+ * @param {string | null | undefined} [origin]
2950
+ * @returns {VFileMessage}
2951
+ *
2952
+ * @overload
2953
+ * @param {Error | VFileMessage} cause
2954
+ * @param {Node | NodeLike | null | undefined} parent
2955
+ * @param {string | null | undefined} [origin]
2956
+ * @returns {VFileMessage}
2957
+ *
2958
+ * @overload
2959
+ * @param {Error | VFileMessage} cause
2960
+ * @param {Point | Position | null | undefined} place
2961
+ * @param {string | null | undefined} [origin]
2962
+ * @returns {VFileMessage}
2963
+ *
2964
+ * @overload
2965
+ * @param {Error | VFileMessage} cause
2966
+ * @param {string | null | undefined} [origin]
2967
+ * @returns {VFileMessage}
2968
+ *
2969
+ * @param {Error | VFileMessage | string} causeOrReason
2970
+ * Reason for message, should use markdown.
2971
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
2972
+ * Configuration (optional).
2973
+ * @param {string | null | undefined} [origin]
2974
+ * Place in code where the message originates (example:
2975
+ * `'my-package:my-rule'` or `'my-rule'`).
2976
+ * @returns {VFileMessage}
2977
+ * Message.
2978
+ */
2979
+ message(cause: Error | VFileMessage, origin?: string | null | undefined): VFileMessage;
2980
+ /**
2981
+ * Serialize the file.
2982
+ *
2983
+ * > **Note**: which encodings are supported depends on the engine.
2984
+ * > For info on Node.js, see:
2985
+ * > <https://nodejs.org/api/util.html#whatwg-supported-encodings>.
2986
+ *
2987
+ * @param {string | null | undefined} [encoding='utf8']
2988
+ * Character encoding to understand `value` as when it’s a `Uint8Array`
2989
+ * (default: `'utf-8'`).
2990
+ * @returns {string}
2991
+ * Serialized file.
2992
+ */
2993
+ toString(encoding?: string | null | undefined): string;
2994
+ }
2995
+ type NodeLike = object & {
2996
+ type: string;
2997
+ position?: Position | undefined;
2998
+ };
2999
+ //#endregion
3000
+ //#region ../../node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/index.d.ts
3001
+ // See: <https://github.com/sindresorhus/type-fest/blob/main/source/empty-object.d.ts>
3002
+ declare const emptyObjectSymbol$1: unique symbol; // To do: next major: remove.
3003
+ /**
3004
+ * Things that can be passed to the constructor.
3005
+ */
3006
+ type Compatible$1 = Options | URL | VFile | Value$1;
3007
+ /**
3008
+ * Raw source map.
3009
+ *
3010
+ * See:
3011
+ * <https://github.com/mozilla/source-map/blob/60adcb0/source-map.d.ts#L15-L23>.
3012
+ */
3013
+ interface Map {
3014
+ /**
3015
+ * The generated file this source map is associated with.
3016
+ */
3017
+ file: string;
3018
+ /**
3019
+ * A string of base64 VLQs which contain the actual mappings.
3020
+ */
3021
+ mappings: string;
3022
+ /**
3023
+ * An array of identifiers which can be referenced by individual mappings.
3024
+ */
3025
+ names: Array<string>;
3026
+ /**
3027
+ * An array of contents of the original source files.
3028
+ */
3029
+ sourcesContent?: Array<string> | undefined;
3030
+ /**
3031
+ * The URL root from which all sources are relative.
3032
+ */
3033
+ sourceRoot?: string | undefined;
3034
+ /**
3035
+ * An array of URLs to the original source files.
3036
+ */
3037
+ sources: Array<string>;
3038
+ /**
3039
+ * Which version of the source map spec this map is following.
3040
+ */
3041
+ version: number;
3042
+ }
3043
+ /**
3044
+ * This map registers the type of the `data` key of a `VFile`.
3045
+ *
3046
+ * This type can be augmented to register custom `data` types.
3047
+ *
3048
+ * @example
3049
+ * declare module 'vfile' {
3050
+ * interface DataMap {
3051
+ * // `file.data.name` is typed as `string`
3052
+ * name: string
3053
+ * }
3054
+ * }
3055
+ */
3056
+ interface DataMap {
3057
+ [emptyObjectSymbol$1]?: never;
3058
+ }
3059
+ /**
3060
+ * Custom info.
3061
+ *
3062
+ * Known attributes can be added to {@linkcode DataMap}
3063
+ */
3064
+ type Data$2 = Record<string, unknown> & Partial<DataMap>;
3065
+ /**
3066
+ * Configuration.
3067
+ */
3068
+ interface Options {
3069
+ /**
3070
+ * Arbitrary fields that will be shallow copied over to the new file.
3071
+ */
3072
+ [key: string]: unknown;
3073
+ /**
3074
+ * Set `basename` (name).
3075
+ */
3076
+ basename?: string | null | undefined;
3077
+ /**
3078
+ * Set `cwd` (working directory).
3079
+ */
3080
+ cwd?: string | null | undefined;
3081
+ /**
3082
+ * Set `data` (associated info).
3083
+ */
3084
+ data?: Data$2 | null | undefined;
3085
+ /**
3086
+ * Set `dirname` (path w/o basename).
3087
+ */
3088
+ dirname?: string | null | undefined;
3089
+ /**
3090
+ * Set `extname` (extension with dot).
3091
+ */
3092
+ extname?: string | null | undefined;
3093
+ /**
3094
+ * Set `history` (paths the file moved between).
3095
+ */
3096
+ history?: Array<string> | null | undefined;
3097
+ /**
3098
+ * Set `path` (current path).
3099
+ */
3100
+ path?: URL | string | null | undefined;
3101
+ /**
3102
+ * Set `stem` (name without extension).
3103
+ */
3104
+ stem?: string | null | undefined;
3105
+ /**
3106
+ * Set `value` (the contents of the file).
3107
+ */
3108
+ value?: Value$1 | null | undefined;
3109
+ }
3110
+ /**
3111
+ * Contents of the file.
3112
+ *
3113
+ * Can either be text or a `Uint8Array` structure.
3114
+ */
3115
+ type Value$1 = Uint8Array | string;
3116
+ //#endregion
3117
+ //#region ../../node_modules/.pnpm/trough@2.2.0/node_modules/trough/lib/index.d.ts
3118
+ /**
3119
+ * Ware.
3120
+ */
3121
+ type Middleware = (...input: Array<any>) => any;
3122
+ /**
3123
+ * Pipeline.
3124
+ */
3125
+ type Pipeline$2 = {
3126
+ /**
3127
+ * Run the pipeline.
3128
+ */
3129
+ run: Run;
3130
+ /**
3131
+ * Add middleware.
3132
+ */
3133
+ use: Use;
3134
+ };
3135
+ /**
3136
+ * Call all middleware.
3137
+ *
3138
+ * Calls `done` on completion with either an error or the output of the
3139
+ * last middleware.
3140
+ *
3141
+ * > 👉 **Note**: as the length of input defines whether async functions get a
3142
+ * > `next` function,
3143
+ * > it’s recommended to keep `input` at one value normally.
3144
+ */
3145
+ type Run = (...input: Array<any>) => void;
3146
+ /**
3147
+ * Add middleware.
3148
+ */
3149
+ type Use = (fn: Middleware) => Pipeline$2;
3150
+ //#endregion
3151
+ //#region ../../node_modules/.pnpm/trough@2.2.0/node_modules/trough/index.d.ts
3152
+ type Pipeline$1 = Pipeline$2;
3153
+ //#endregion
3154
+ //#region ../../node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/callable-instance.d.ts
3155
+ declare const CallableInstance: new <Parameters extends unknown[], Result>(property: string | symbol) => (...parameters: Parameters) => Result;
3156
+ //#endregion
3157
+ //#region ../../node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.d.ts
3158
+ /**
3159
+ * @template {Node | undefined} [ParseTree=undefined]
3160
+ * Output of `parse` (optional).
3161
+ * @template {Node | undefined} [HeadTree=undefined]
3162
+ * Input for `run` (optional).
3163
+ * @template {Node | undefined} [TailTree=undefined]
3164
+ * Output for `run` (optional).
3165
+ * @template {Node | undefined} [CompileTree=undefined]
3166
+ * Input of `stringify` (optional).
3167
+ * @template {CompileResults | undefined} [CompileResult=undefined]
3168
+ * Output of `stringify` (optional).
3169
+ * @extends {CallableInstance<[], Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>>}
3170
+ */
3171
+ declare class Processor<ParseTree extends Node$2 | undefined = undefined, HeadTree extends Node$2 | undefined = undefined, TailTree extends Node$2 | undefined = undefined, CompileTree extends Node$2 | undefined = undefined, CompileResult extends CompileResults | undefined = undefined> extends CallableInstance<[], Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>> {
3172
+ /**
3173
+ * Create a processor.
3174
+ */
3175
+ constructor();
3176
+ /**
3177
+ * Compiler to use (deprecated).
3178
+ *
3179
+ * @deprecated
3180
+ * Use `compiler` instead.
3181
+ * @type {(
3182
+ * Compiler<
3183
+ * CompileTree extends undefined ? Node : CompileTree,
3184
+ * CompileResult extends undefined ? CompileResults : CompileResult
3185
+ * > |
3186
+ * undefined
3187
+ * )}
3188
+ */
3189
+ Compiler: (Compiler<CompileTree extends undefined ? Node : CompileTree, CompileResult extends undefined ? CompileResults : CompileResult> | undefined);
3190
+ /**
3191
+ * Parser to use (deprecated).
3192
+ *
3193
+ * @deprecated
3194
+ * Use `parser` instead.
3195
+ * @type {(
3196
+ * Parser<ParseTree extends undefined ? Node : ParseTree> |
3197
+ * undefined
3198
+ * )}
3199
+ */
3200
+ Parser: (Parser<ParseTree extends undefined ? Node : ParseTree> | undefined);
3201
+ /**
3202
+ * Internal list of configured plugins.
3203
+ *
3204
+ * @deprecated
3205
+ * This is a private internal property and should not be used.
3206
+ * @type {Array<PluginTuple<Array<unknown>>>}
3207
+ */
3208
+ attachers: Array<[plugin: Plugin<unknown[], undefined, undefined>, ...parameters: unknown[]]>;
3209
+ /**
3210
+ * Compiler to use.
3211
+ *
3212
+ * @type {(
3213
+ * Compiler<
3214
+ * CompileTree extends undefined ? Node : CompileTree,
3215
+ * CompileResult extends undefined ? CompileResults : CompileResult
3216
+ * > |
3217
+ * undefined
3218
+ * )}
3219
+ */
3220
+ compiler: (Compiler<CompileTree extends undefined ? Node : CompileTree, CompileResult extends undefined ? CompileResults : CompileResult> | undefined);
3221
+ /**
3222
+ * Internal state to track where we are while freezing.
3223
+ *
3224
+ * @deprecated
3225
+ * This is a private internal property and should not be used.
3226
+ * @type {number}
3227
+ */
3228
+ freezeIndex: number;
3229
+ /**
3230
+ * Internal state to track whether we’re frozen.
3231
+ *
3232
+ * @deprecated
3233
+ * This is a private internal property and should not be used.
3234
+ * @type {boolean | undefined}
3235
+ */
3236
+ frozen: boolean | undefined;
3237
+ /**
3238
+ * Internal state.
3239
+ *
3240
+ * @deprecated
3241
+ * This is a private internal property and should not be used.
3242
+ * @type {Data}
3243
+ */
3244
+ namespace: Data$1;
3245
+ /**
3246
+ * Parser to use.
3247
+ *
3248
+ * @type {(
3249
+ * Parser<ParseTree extends undefined ? Node : ParseTree> |
3250
+ * undefined
3251
+ * )}
3252
+ */
3253
+ parser: (Parser<ParseTree extends undefined ? Node : ParseTree> | undefined);
3254
+ /**
3255
+ * Internal list of configured transformers.
3256
+ *
3257
+ * @deprecated
3258
+ * This is a private internal property and should not be used.
3259
+ * @type {Pipeline}
3260
+ */
3261
+ transformers: Pipeline;
3262
+ /**
3263
+ * Copy a processor.
3264
+ *
3265
+ * @deprecated
3266
+ * This is a private internal method and should not be used.
3267
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
3268
+ * New *unfrozen* processor ({@linkcode Processor}) that is
3269
+ * configured to work the same as its ancestor.
3270
+ * When the descendant processor is configured in the future it does not
3271
+ * affect the ancestral processor.
3272
+ */
3273
+ copy(): Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>;
3274
+ /**
3275
+ * Configure the processor with info available to all plugins.
3276
+ * Information is stored in an object.
3277
+ *
3278
+ * Typically, options can be given to a specific plugin, but sometimes it
3279
+ * makes sense to have information shared with several plugins.
3280
+ * For example, a list of HTML elements that are self-closing, which is
3281
+ * needed during all phases.
3282
+ *
3283
+ * > **Note**: setting information cannot occur on *frozen* processors.
3284
+ * > Call the processor first to create a new unfrozen processor.
3285
+ *
3286
+ * > **Note**: to register custom data in TypeScript, augment the
3287
+ * > {@linkcode Data} interface.
3288
+ *
3289
+ * @example
3290
+ * This example show how to get and set info:
3291
+ *
3292
+ * ```js
3293
+ * import {unified} from 'unified'
3294
+ *
3295
+ * const processor = unified().data('alpha', 'bravo')
3296
+ *
3297
+ * processor.data('alpha') // => 'bravo'
3298
+ *
3299
+ * processor.data() // => {alpha: 'bravo'}
3300
+ *
3301
+ * processor.data({charlie: 'delta'})
3302
+ *
3303
+ * processor.data() // => {charlie: 'delta'}
3304
+ * ```
3305
+ *
3306
+ * @template {keyof Data} Key
3307
+ *
3308
+ * @overload
3309
+ * @returns {Data}
3310
+ *
3311
+ * @overload
3312
+ * @param {Data} dataset
3313
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
3314
+ *
3315
+ * @overload
3316
+ * @param {Key} key
3317
+ * @returns {Data[Key]}
3318
+ *
3319
+ * @overload
3320
+ * @param {Key} key
3321
+ * @param {Data[Key]} value
3322
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
3323
+ *
3324
+ * @param {Data | Key} [key]
3325
+ * Key to get or set, or entire dataset to set, or nothing to get the
3326
+ * entire dataset (optional).
3327
+ * @param {Data[Key]} [value]
3328
+ * Value to set (optional).
3329
+ * @returns {unknown}
3330
+ * The current processor when setting, the value at `key` when getting, or
3331
+ * the entire dataset when getting without key.
3332
+ */
3333
+ data<Key extends keyof Data>(): Data$1;
3334
+ /**
3335
+ * Configure the processor with info available to all plugins.
3336
+ * Information is stored in an object.
3337
+ *
3338
+ * Typically, options can be given to a specific plugin, but sometimes it
3339
+ * makes sense to have information shared with several plugins.
3340
+ * For example, a list of HTML elements that are self-closing, which is
3341
+ * needed during all phases.
3342
+ *
3343
+ * > **Note**: setting information cannot occur on *frozen* processors.
3344
+ * > Call the processor first to create a new unfrozen processor.
3345
+ *
3346
+ * > **Note**: to register custom data in TypeScript, augment the
3347
+ * > {@linkcode Data} interface.
3348
+ *
3349
+ * @example
3350
+ * This example show how to get and set info:
3351
+ *
3352
+ * ```js
3353
+ * import {unified} from 'unified'
3354
+ *
3355
+ * const processor = unified().data('alpha', 'bravo')
3356
+ *
3357
+ * processor.data('alpha') // => 'bravo'
3358
+ *
3359
+ * processor.data() // => {alpha: 'bravo'}
3360
+ *
3361
+ * processor.data({charlie: 'delta'})
3362
+ *
3363
+ * processor.data() // => {charlie: 'delta'}
3364
+ * ```
3365
+ *
3366
+ * @template {keyof Data} Key
3367
+ *
3368
+ * @overload
3369
+ * @returns {Data}
3370
+ *
3371
+ * @overload
3372
+ * @param {Data} dataset
3373
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
3374
+ *
3375
+ * @overload
3376
+ * @param {Key} key
3377
+ * @returns {Data[Key]}
3378
+ *
3379
+ * @overload
3380
+ * @param {Key} key
3381
+ * @param {Data[Key]} value
3382
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
3383
+ *
3384
+ * @param {Data | Key} [key]
3385
+ * Key to get or set, or entire dataset to set, or nothing to get the
3386
+ * entire dataset (optional).
3387
+ * @param {Data[Key]} [value]
3388
+ * Value to set (optional).
3389
+ * @returns {unknown}
3390
+ * The current processor when setting, the value at `key` when getting, or
3391
+ * the entire dataset when getting without key.
3392
+ */
3393
+ data<Key extends keyof Data>(dataset: Data$1): Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>;
3394
+ /**
3395
+ * Configure the processor with info available to all plugins.
3396
+ * Information is stored in an object.
3397
+ *
3398
+ * Typically, options can be given to a specific plugin, but sometimes it
3399
+ * makes sense to have information shared with several plugins.
3400
+ * For example, a list of HTML elements that are self-closing, which is
3401
+ * needed during all phases.
3402
+ *
3403
+ * > **Note**: setting information cannot occur on *frozen* processors.
3404
+ * > Call the processor first to create a new unfrozen processor.
3405
+ *
3406
+ * > **Note**: to register custom data in TypeScript, augment the
3407
+ * > {@linkcode Data} interface.
3408
+ *
3409
+ * @example
3410
+ * This example show how to get and set info:
3411
+ *
3412
+ * ```js
3413
+ * import {unified} from 'unified'
3414
+ *
3415
+ * const processor = unified().data('alpha', 'bravo')
3416
+ *
3417
+ * processor.data('alpha') // => 'bravo'
3418
+ *
3419
+ * processor.data() // => {alpha: 'bravo'}
3420
+ *
3421
+ * processor.data({charlie: 'delta'})
3422
+ *
3423
+ * processor.data() // => {charlie: 'delta'}
3424
+ * ```
3425
+ *
3426
+ * @template {keyof Data} Key
3427
+ *
3428
+ * @overload
3429
+ * @returns {Data}
3430
+ *
3431
+ * @overload
3432
+ * @param {Data} dataset
3433
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
3434
+ *
3435
+ * @overload
3436
+ * @param {Key} key
3437
+ * @returns {Data[Key]}
3438
+ *
3439
+ * @overload
3440
+ * @param {Key} key
3441
+ * @param {Data[Key]} value
3442
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
3443
+ *
3444
+ * @param {Data | Key} [key]
3445
+ * Key to get or set, or entire dataset to set, or nothing to get the
3446
+ * entire dataset (optional).
3447
+ * @param {Data[Key]} [value]
3448
+ * Value to set (optional).
3449
+ * @returns {unknown}
3450
+ * The current processor when setting, the value at `key` when getting, or
3451
+ * the entire dataset when getting without key.
3452
+ */
3453
+ data<Key extends keyof Data>(key: Key): Data[Key];
3454
+ /**
3455
+ * Configure the processor with info available to all plugins.
3456
+ * Information is stored in an object.
3457
+ *
3458
+ * Typically, options can be given to a specific plugin, but sometimes it
3459
+ * makes sense to have information shared with several plugins.
3460
+ * For example, a list of HTML elements that are self-closing, which is
3461
+ * needed during all phases.
3462
+ *
3463
+ * > **Note**: setting information cannot occur on *frozen* processors.
3464
+ * > Call the processor first to create a new unfrozen processor.
3465
+ *
3466
+ * > **Note**: to register custom data in TypeScript, augment the
3467
+ * > {@linkcode Data} interface.
3468
+ *
3469
+ * @example
3470
+ * This example show how to get and set info:
3471
+ *
3472
+ * ```js
3473
+ * import {unified} from 'unified'
3474
+ *
3475
+ * const processor = unified().data('alpha', 'bravo')
3476
+ *
3477
+ * processor.data('alpha') // => 'bravo'
3478
+ *
3479
+ * processor.data() // => {alpha: 'bravo'}
3480
+ *
3481
+ * processor.data({charlie: 'delta'})
3482
+ *
3483
+ * processor.data() // => {charlie: 'delta'}
3484
+ * ```
3485
+ *
3486
+ * @template {keyof Data} Key
3487
+ *
3488
+ * @overload
3489
+ * @returns {Data}
3490
+ *
3491
+ * @overload
3492
+ * @param {Data} dataset
3493
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
3494
+ *
3495
+ * @overload
3496
+ * @param {Key} key
3497
+ * @returns {Data[Key]}
3498
+ *
3499
+ * @overload
3500
+ * @param {Key} key
3501
+ * @param {Data[Key]} value
3502
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
3503
+ *
3504
+ * @param {Data | Key} [key]
3505
+ * Key to get or set, or entire dataset to set, or nothing to get the
3506
+ * entire dataset (optional).
3507
+ * @param {Data[Key]} [value]
3508
+ * Value to set (optional).
3509
+ * @returns {unknown}
3510
+ * The current processor when setting, the value at `key` when getting, or
3511
+ * the entire dataset when getting without key.
3512
+ */
3513
+ data<Key extends keyof Data>(key: Key, value: Data[Key]): Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>;
3514
+ /**
3515
+ * Freeze a processor.
3516
+ *
3517
+ * Frozen processors are meant to be extended and not to be configured
3518
+ * directly.
3519
+ *
3520
+ * When a processor is frozen it cannot be unfrozen.
3521
+ * New processors working the same way can be created by calling the
3522
+ * processor.
3523
+ *
3524
+ * It’s possible to freeze processors explicitly by calling `.freeze()`.
3525
+ * Processors freeze automatically when `.parse()`, `.run()`, `.runSync()`,
3526
+ * `.stringify()`, `.process()`, or `.processSync()` are called.
3527
+ *
3528
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
3529
+ * The current processor.
3530
+ */
3531
+ freeze(): Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>;
3532
+ /**
3533
+ * Parse text to a syntax tree.
3534
+ *
3535
+ * > **Note**: `parse` freezes the processor if not already *frozen*.
3536
+ *
3537
+ * > **Note**: `parse` performs the parse phase, not the run phase or other
3538
+ * > phases.
3539
+ *
3540
+ * @param {Compatible | undefined} [file]
3541
+ * file to parse (optional); typically `string` or `VFile`; any value
3542
+ * accepted as `x` in `new VFile(x)`.
3543
+ * @returns {ParseTree extends undefined ? Node : ParseTree}
3544
+ * Syntax tree representing `file`.
3545
+ */
3546
+ parse(file?: Compatible | undefined): ParseTree extends undefined ? Node : ParseTree;
3547
+ /**
3548
+ * Process the given file as configured on the processor.
3549
+ *
3550
+ * > **Note**: `process` freezes the processor if not already *frozen*.
3551
+ *
3552
+ * > **Note**: `process` performs the parse, run, and stringify phases.
3553
+ *
3554
+ * @overload
3555
+ * @param {Compatible | undefined} file
3556
+ * @param {ProcessCallback<VFileWithOutput<CompileResult>>} done
3557
+ * @returns {undefined}
3558
+ *
3559
+ * @overload
3560
+ * @param {Compatible | undefined} [file]
3561
+ * @returns {Promise<VFileWithOutput<CompileResult>>}
3562
+ *
3563
+ * @param {Compatible | undefined} [file]
3564
+ * File (optional); typically `string` or `VFile`]; any value accepted as
3565
+ * `x` in `new VFile(x)`.
3566
+ * @param {ProcessCallback<VFileWithOutput<CompileResult>> | undefined} [done]
3567
+ * Callback (optional).
3568
+ * @returns {Promise<VFile> | undefined}
3569
+ * Nothing if `done` is given.
3570
+ * Otherwise a promise, rejected with a fatal error or resolved with the
3571
+ * processed file.
3572
+ *
3573
+ * The parsed, transformed, and compiled value is available at
3574
+ * `file.value` (see note).
3575
+ *
3576
+ * > **Note**: unified typically compiles by serializing: most
3577
+ * > compilers return `string` (or `Uint8Array`).
3578
+ * > Some compilers, such as the one configured with
3579
+ * > [`rehype-react`][rehype-react], return other values (in this case, a
3580
+ * > React tree).
3581
+ * > If you’re using a compiler that doesn’t serialize, expect different
3582
+ * > result values.
3583
+ * >
3584
+ * > To register custom results in TypeScript, add them to
3585
+ * > {@linkcode CompileResultMap}.
3586
+ *
3587
+ * [rehype-react]: https://github.com/rehypejs/rehype-react
3588
+ */
3589
+ process(file: Compatible | undefined, done: ProcessCallback<VFileWithOutput<CompileResult>>): undefined;
3590
+ /**
3591
+ * Process the given file as configured on the processor.
3592
+ *
3593
+ * > **Note**: `process` freezes the processor if not already *frozen*.
3594
+ *
3595
+ * > **Note**: `process` performs the parse, run, and stringify phases.
3596
+ *
3597
+ * @overload
3598
+ * @param {Compatible | undefined} file
3599
+ * @param {ProcessCallback<VFileWithOutput<CompileResult>>} done
3600
+ * @returns {undefined}
3601
+ *
3602
+ * @overload
3603
+ * @param {Compatible | undefined} [file]
3604
+ * @returns {Promise<VFileWithOutput<CompileResult>>}
3605
+ *
3606
+ * @param {Compatible | undefined} [file]
3607
+ * File (optional); typically `string` or `VFile`]; any value accepted as
3608
+ * `x` in `new VFile(x)`.
3609
+ * @param {ProcessCallback<VFileWithOutput<CompileResult>> | undefined} [done]
3610
+ * Callback (optional).
3611
+ * @returns {Promise<VFile> | undefined}
3612
+ * Nothing if `done` is given.
3613
+ * Otherwise a promise, rejected with a fatal error or resolved with the
3614
+ * processed file.
3615
+ *
3616
+ * The parsed, transformed, and compiled value is available at
3617
+ * `file.value` (see note).
3618
+ *
3619
+ * > **Note**: unified typically compiles by serializing: most
3620
+ * > compilers return `string` (or `Uint8Array`).
3621
+ * > Some compilers, such as the one configured with
3622
+ * > [`rehype-react`][rehype-react], return other values (in this case, a
3623
+ * > React tree).
3624
+ * > If you’re using a compiler that doesn’t serialize, expect different
3625
+ * > result values.
3626
+ * >
3627
+ * > To register custom results in TypeScript, add them to
3628
+ * > {@linkcode CompileResultMap}.
3629
+ *
3630
+ * [rehype-react]: https://github.com/rehypejs/rehype-react
3631
+ */
3632
+ process(file?: Compatible | undefined): Promise<VFileWithOutput<CompileResult>>;
3633
+ /**
3634
+ * Process the given file as configured on the processor.
3635
+ *
3636
+ * An error is thrown if asynchronous transforms are configured.
3637
+ *
3638
+ * > **Note**: `processSync` freezes the processor if not already *frozen*.
3639
+ *
3640
+ * > **Note**: `processSync` performs the parse, run, and stringify phases.
3641
+ *
3642
+ * @param {Compatible | undefined} [file]
3643
+ * File (optional); typically `string` or `VFile`; any value accepted as
3644
+ * `x` in `new VFile(x)`.
3645
+ * @returns {VFileWithOutput<CompileResult>}
3646
+ * The processed file.
3647
+ *
3648
+ * The parsed, transformed, and compiled value is available at
3649
+ * `file.value` (see note).
3650
+ *
3651
+ * > **Note**: unified typically compiles by serializing: most
3652
+ * > compilers return `string` (or `Uint8Array`).
3653
+ * > Some compilers, such as the one configured with
3654
+ * > [`rehype-react`][rehype-react], return other values (in this case, a
3655
+ * > React tree).
3656
+ * > If you’re using a compiler that doesn’t serialize, expect different
3657
+ * > result values.
3658
+ * >
3659
+ * > To register custom results in TypeScript, add them to
3660
+ * > {@linkcode CompileResultMap}.
3661
+ *
3662
+ * [rehype-react]: https://github.com/rehypejs/rehype-react
3663
+ */
3664
+ processSync(file?: Compatible | undefined): VFileWithOutput<CompileResult>;
3665
+ /**
3666
+ * Run *transformers* on a syntax tree.
3667
+ *
3668
+ * > **Note**: `run` freezes the processor if not already *frozen*.
3669
+ *
3670
+ * > **Note**: `run` performs the run phase, not other phases.
3671
+ *
3672
+ * @overload
3673
+ * @param {HeadTree extends undefined ? Node : HeadTree} tree
3674
+ * @param {RunCallback<TailTree extends undefined ? Node : TailTree>} done
3675
+ * @returns {undefined}
3676
+ *
3677
+ * @overload
3678
+ * @param {HeadTree extends undefined ? Node : HeadTree} tree
3679
+ * @param {Compatible | undefined} file
3680
+ * @param {RunCallback<TailTree extends undefined ? Node : TailTree>} done
3681
+ * @returns {undefined}
3682
+ *
3683
+ * @overload
3684
+ * @param {HeadTree extends undefined ? Node : HeadTree} tree
3685
+ * @param {Compatible | undefined} [file]
3686
+ * @returns {Promise<TailTree extends undefined ? Node : TailTree>}
3687
+ *
3688
+ * @param {HeadTree extends undefined ? Node : HeadTree} tree
3689
+ * Tree to transform and inspect.
3690
+ * @param {(
3691
+ * RunCallback<TailTree extends undefined ? Node : TailTree> |
3692
+ * Compatible
3693
+ * )} [file]
3694
+ * File associated with `node` (optional); any value accepted as `x` in
3695
+ * `new VFile(x)`.
3696
+ * @param {RunCallback<TailTree extends undefined ? Node : TailTree>} [done]
3697
+ * Callback (optional).
3698
+ * @returns {Promise<TailTree extends undefined ? Node : TailTree> | undefined}
3699
+ * Nothing if `done` is given.
3700
+ * Otherwise, a promise rejected with a fatal error or resolved with the
3701
+ * transformed tree.
3702
+ */
3703
+ run(tree: HeadTree extends undefined ? Node : HeadTree, done: RunCallback<TailTree extends undefined ? Node : TailTree>): undefined;
3704
+ /**
3705
+ * Run *transformers* on a syntax tree.
3706
+ *
3707
+ * > **Note**: `run` freezes the processor if not already *frozen*.
3708
+ *
3709
+ * > **Note**: `run` performs the run phase, not other phases.
3710
+ *
3711
+ * @overload
3712
+ * @param {HeadTree extends undefined ? Node : HeadTree} tree
3713
+ * @param {RunCallback<TailTree extends undefined ? Node : TailTree>} done
3714
+ * @returns {undefined}
3715
+ *
3716
+ * @overload
3717
+ * @param {HeadTree extends undefined ? Node : HeadTree} tree
3718
+ * @param {Compatible | undefined} file
3719
+ * @param {RunCallback<TailTree extends undefined ? Node : TailTree>} done
3720
+ * @returns {undefined}
3721
+ *
3722
+ * @overload
3723
+ * @param {HeadTree extends undefined ? Node : HeadTree} tree
3724
+ * @param {Compatible | undefined} [file]
3725
+ * @returns {Promise<TailTree extends undefined ? Node : TailTree>}
3726
+ *
3727
+ * @param {HeadTree extends undefined ? Node : HeadTree} tree
3728
+ * Tree to transform and inspect.
3729
+ * @param {(
3730
+ * RunCallback<TailTree extends undefined ? Node : TailTree> |
3731
+ * Compatible
3732
+ * )} [file]
3733
+ * File associated with `node` (optional); any value accepted as `x` in
3734
+ * `new VFile(x)`.
3735
+ * @param {RunCallback<TailTree extends undefined ? Node : TailTree>} [done]
3736
+ * Callback (optional).
3737
+ * @returns {Promise<TailTree extends undefined ? Node : TailTree> | undefined}
3738
+ * Nothing if `done` is given.
3739
+ * Otherwise, a promise rejected with a fatal error or resolved with the
3740
+ * transformed tree.
3741
+ */
3742
+ run(tree: HeadTree extends undefined ? Node : HeadTree, file: Compatible | undefined, done: RunCallback<TailTree extends undefined ? Node : TailTree>): undefined;
3743
+ /**
3744
+ * Run *transformers* on a syntax tree.
3745
+ *
3746
+ * > **Note**: `run` freezes the processor if not already *frozen*.
3747
+ *
3748
+ * > **Note**: `run` performs the run phase, not other phases.
3749
+ *
3750
+ * @overload
3751
+ * @param {HeadTree extends undefined ? Node : HeadTree} tree
3752
+ * @param {RunCallback<TailTree extends undefined ? Node : TailTree>} done
3753
+ * @returns {undefined}
3754
+ *
3755
+ * @overload
3756
+ * @param {HeadTree extends undefined ? Node : HeadTree} tree
3757
+ * @param {Compatible | undefined} file
3758
+ * @param {RunCallback<TailTree extends undefined ? Node : TailTree>} done
3759
+ * @returns {undefined}
3760
+ *
3761
+ * @overload
3762
+ * @param {HeadTree extends undefined ? Node : HeadTree} tree
3763
+ * @param {Compatible | undefined} [file]
3764
+ * @returns {Promise<TailTree extends undefined ? Node : TailTree>}
3765
+ *
3766
+ * @param {HeadTree extends undefined ? Node : HeadTree} tree
3767
+ * Tree to transform and inspect.
3768
+ * @param {(
3769
+ * RunCallback<TailTree extends undefined ? Node : TailTree> |
3770
+ * Compatible
3771
+ * )} [file]
3772
+ * File associated with `node` (optional); any value accepted as `x` in
3773
+ * `new VFile(x)`.
3774
+ * @param {RunCallback<TailTree extends undefined ? Node : TailTree>} [done]
3775
+ * Callback (optional).
3776
+ * @returns {Promise<TailTree extends undefined ? Node : TailTree> | undefined}
3777
+ * Nothing if `done` is given.
3778
+ * Otherwise, a promise rejected with a fatal error or resolved with the
3779
+ * transformed tree.
3780
+ */
3781
+ run(tree: HeadTree extends undefined ? Node : HeadTree, file?: Compatible | undefined): Promise<TailTree extends undefined ? Node : TailTree>;
3782
+ /**
3783
+ * Run *transformers* on a syntax tree.
3784
+ *
3785
+ * An error is thrown if asynchronous transforms are configured.
3786
+ *
3787
+ * > **Note**: `runSync` freezes the processor if not already *frozen*.
3788
+ *
3789
+ * > **Note**: `runSync` performs the run phase, not other phases.
3790
+ *
3791
+ * @param {HeadTree extends undefined ? Node : HeadTree} tree
3792
+ * Tree to transform and inspect.
3793
+ * @param {Compatible | undefined} [file]
3794
+ * File associated with `node` (optional); any value accepted as `x` in
3795
+ * `new VFile(x)`.
3796
+ * @returns {TailTree extends undefined ? Node : TailTree}
3797
+ * Transformed tree.
3798
+ */
3799
+ runSync(tree: HeadTree extends undefined ? Node : HeadTree, file?: Compatible | undefined): TailTree extends undefined ? Node : TailTree;
3800
+ /**
3801
+ * Compile a syntax tree.
3802
+ *
3803
+ * > **Note**: `stringify` freezes the processor if not already *frozen*.
3804
+ *
3805
+ * > **Note**: `stringify` performs the stringify phase, not the run phase
3806
+ * > or other phases.
3807
+ *
3808
+ * @param {CompileTree extends undefined ? Node : CompileTree} tree
3809
+ * Tree to compile.
3810
+ * @param {Compatible | undefined} [file]
3811
+ * File associated with `node` (optional); any value accepted as `x` in
3812
+ * `new VFile(x)`.
3813
+ * @returns {CompileResult extends undefined ? Value : CompileResult}
3814
+ * Textual representation of the tree (see note).
3815
+ *
3816
+ * > **Note**: unified typically compiles by serializing: most compilers
3817
+ * > return `string` (or `Uint8Array`).
3818
+ * > Some compilers, such as the one configured with
3819
+ * > [`rehype-react`][rehype-react], return other values (in this case, a
3820
+ * > React tree).
3821
+ * > If you’re using a compiler that doesn’t serialize, expect different
3822
+ * > result values.
3823
+ * >
3824
+ * > To register custom results in TypeScript, add them to
3825
+ * > {@linkcode CompileResultMap}.
3826
+ *
3827
+ * [rehype-react]: https://github.com/rehypejs/rehype-react
3828
+ */
3829
+ stringify(tree: CompileTree extends undefined ? Node : CompileTree, file?: Compatible | undefined): CompileResult extends undefined ? Value : CompileResult;
3830
+ /**
3831
+ * Configure the processor to use a plugin, a list of usable values, or a
3832
+ * preset.
3833
+ *
3834
+ * If the processor is already using a plugin, the previous plugin
3835
+ * configuration is changed based on the options that are passed in.
3836
+ * In other words, the plugin is not added a second time.
3837
+ *
3838
+ * > **Note**: `use` cannot be called on *frozen* processors.
3839
+ * > Call the processor first to create a new unfrozen processor.
3840
+ *
3841
+ * @example
3842
+ * There are many ways to pass plugins to `.use()`.
3843
+ * This example gives an overview:
3844
+ *
3845
+ * ```js
3846
+ * import {unified} from 'unified'
3847
+ *
3848
+ * unified()
3849
+ * // Plugin with options:
3850
+ * .use(pluginA, {x: true, y: true})
3851
+ * // Passing the same plugin again merges configuration (to `{x: true, y: false, z: true}`):
3852
+ * .use(pluginA, {y: false, z: true})
3853
+ * // Plugins:
3854
+ * .use([pluginB, pluginC])
3855
+ * // Two plugins, the second with options:
3856
+ * .use([pluginD, [pluginE, {}]])
3857
+ * // Preset with plugins and settings:
3858
+ * .use({plugins: [pluginF, [pluginG, {}]], settings: {position: false}})
3859
+ * // Settings only:
3860
+ * .use({settings: {position: false}})
3861
+ * ```
3862
+ *
3863
+ * @template {Array<unknown>} [Parameters=[]]
3864
+ * @template {Node | string | undefined} [Input=undefined]
3865
+ * @template [Output=Input]
3866
+ *
3867
+ * @overload
3868
+ * @param {Preset | null | undefined} [preset]
3869
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
3870
+ *
3871
+ * @overload
3872
+ * @param {PluggableList} list
3873
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
3874
+ *
3875
+ * @overload
3876
+ * @param {Plugin<Parameters, Input, Output>} plugin
3877
+ * @param {...(Parameters | [boolean])} parameters
3878
+ * @returns {UsePlugin<ParseTree, HeadTree, TailTree, CompileTree, CompileResult, Input, Output>}
3879
+ *
3880
+ * @param {PluggableList | Plugin | Preset | null | undefined} value
3881
+ * Usable value.
3882
+ * @param {...unknown} parameters
3883
+ * Parameters, when a plugin is given as a usable value.
3884
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
3885
+ * Current processor.
3886
+ */
3887
+ use<Parameters_1 extends unknown[] = [], Input extends string | Node$2 | undefined = undefined, Output = Input>(preset?: Preset | null | undefined): Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>;
3888
+ /**
3889
+ * Configure the processor to use a plugin, a list of usable values, or a
3890
+ * preset.
3891
+ *
3892
+ * If the processor is already using a plugin, the previous plugin
3893
+ * configuration is changed based on the options that are passed in.
3894
+ * In other words, the plugin is not added a second time.
3895
+ *
3896
+ * > **Note**: `use` cannot be called on *frozen* processors.
3897
+ * > Call the processor first to create a new unfrozen processor.
3898
+ *
3899
+ * @example
3900
+ * There are many ways to pass plugins to `.use()`.
3901
+ * This example gives an overview:
3902
+ *
3903
+ * ```js
3904
+ * import {unified} from 'unified'
3905
+ *
3906
+ * unified()
3907
+ * // Plugin with options:
3908
+ * .use(pluginA, {x: true, y: true})
3909
+ * // Passing the same plugin again merges configuration (to `{x: true, y: false, z: true}`):
3910
+ * .use(pluginA, {y: false, z: true})
3911
+ * // Plugins:
3912
+ * .use([pluginB, pluginC])
3913
+ * // Two plugins, the second with options:
3914
+ * .use([pluginD, [pluginE, {}]])
3915
+ * // Preset with plugins and settings:
3916
+ * .use({plugins: [pluginF, [pluginG, {}]], settings: {position: false}})
3917
+ * // Settings only:
3918
+ * .use({settings: {position: false}})
3919
+ * ```
3920
+ *
3921
+ * @template {Array<unknown>} [Parameters=[]]
3922
+ * @template {Node | string | undefined} [Input=undefined]
3923
+ * @template [Output=Input]
3924
+ *
3925
+ * @overload
3926
+ * @param {Preset | null | undefined} [preset]
3927
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
3928
+ *
3929
+ * @overload
3930
+ * @param {PluggableList} list
3931
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
3932
+ *
3933
+ * @overload
3934
+ * @param {Plugin<Parameters, Input, Output>} plugin
3935
+ * @param {...(Parameters | [boolean])} parameters
3936
+ * @returns {UsePlugin<ParseTree, HeadTree, TailTree, CompileTree, CompileResult, Input, Output>}
3937
+ *
3938
+ * @param {PluggableList | Plugin | Preset | null | undefined} value
3939
+ * Usable value.
3940
+ * @param {...unknown} parameters
3941
+ * Parameters, when a plugin is given as a usable value.
3942
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
3943
+ * Current processor.
3944
+ */
3945
+ use<Parameters_1 extends unknown[] = [], Input extends string | Node$2 | undefined = undefined, Output = Input>(list: PluggableList): Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>;
3946
+ /**
3947
+ * Configure the processor to use a plugin, a list of usable values, or a
3948
+ * preset.
3949
+ *
3950
+ * If the processor is already using a plugin, the previous plugin
3951
+ * configuration is changed based on the options that are passed in.
3952
+ * In other words, the plugin is not added a second time.
3953
+ *
3954
+ * > **Note**: `use` cannot be called on *frozen* processors.
3955
+ * > Call the processor first to create a new unfrozen processor.
3956
+ *
3957
+ * @example
3958
+ * There are many ways to pass plugins to `.use()`.
3959
+ * This example gives an overview:
3960
+ *
3961
+ * ```js
3962
+ * import {unified} from 'unified'
3963
+ *
3964
+ * unified()
3965
+ * // Plugin with options:
3966
+ * .use(pluginA, {x: true, y: true})
3967
+ * // Passing the same plugin again merges configuration (to `{x: true, y: false, z: true}`):
3968
+ * .use(pluginA, {y: false, z: true})
3969
+ * // Plugins:
3970
+ * .use([pluginB, pluginC])
3971
+ * // Two plugins, the second with options:
3972
+ * .use([pluginD, [pluginE, {}]])
3973
+ * // Preset with plugins and settings:
3974
+ * .use({plugins: [pluginF, [pluginG, {}]], settings: {position: false}})
3975
+ * // Settings only:
3976
+ * .use({settings: {position: false}})
3977
+ * ```
3978
+ *
3979
+ * @template {Array<unknown>} [Parameters=[]]
3980
+ * @template {Node | string | undefined} [Input=undefined]
3981
+ * @template [Output=Input]
3982
+ *
3983
+ * @overload
3984
+ * @param {Preset | null | undefined} [preset]
3985
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
3986
+ *
3987
+ * @overload
3988
+ * @param {PluggableList} list
3989
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
3990
+ *
3991
+ * @overload
3992
+ * @param {Plugin<Parameters, Input, Output>} plugin
3993
+ * @param {...(Parameters | [boolean])} parameters
3994
+ * @returns {UsePlugin<ParseTree, HeadTree, TailTree, CompileTree, CompileResult, Input, Output>}
3995
+ *
3996
+ * @param {PluggableList | Plugin | Preset | null | undefined} value
3997
+ * Usable value.
3998
+ * @param {...unknown} parameters
3999
+ * Parameters, when a plugin is given as a usable value.
4000
+ * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
4001
+ * Current processor.
4002
+ */
4003
+ use<Parameters_1 extends unknown[] = [], Input extends string | Node$2 | undefined = undefined, Output = Input>(plugin: Plugin<Parameters_1, Input, Output>, ...parameters: Parameters_1 | [boolean]): UsePlugin<ParseTree, HeadTree, TailTree, CompileTree, CompileResult, Input, Output>;
4004
+ }
4005
+ /**
4006
+ * Create a new processor.
4007
+ *
4008
+ * @example
4009
+ * This example shows how a new processor can be created (from `remark`) and linked
4010
+ * to **stdin**(4) and **stdout**(4).
4011
+ *
4012
+ * ```js
4013
+ * import process from 'node:process'
4014
+ * import concatStream from 'concat-stream'
4015
+ * import {remark} from 'remark'
4016
+ *
4017
+ * process.stdin.pipe(
4018
+ * concatStream(function (buf) {
4019
+ * process.stdout.write(String(remark().processSync(buf)))
4020
+ * })
4021
+ * )
4022
+ * ```
4023
+ *
4024
+ * @returns
4025
+ * New *unfrozen* processor (`processor`).
4026
+ *
4027
+ * This processor is configured to work the same as its ancestor.
4028
+ * When the descendant processor is configured in the future it does not
4029
+ * affect the ancestral processor.
4030
+ */
4031
+ declare const index_d_exports: Processor<undefined, undefined, undefined, undefined, undefined>;
4032
+ type Pipeline = Pipeline$1;
4033
+ type Node = Node$2;
4034
+ type Compatible = Compatible$1;
4035
+ type Value = Value$1;
4036
+ type CompileResultMap$1 = CompileResultMap;
4037
+ type Data$1 = Data;
4038
+ type Settings$1 = Settings;
4039
+ /**
4040
+ * Acceptable results from compilers.
4041
+ *
4042
+ * To register custom results, add them to
4043
+ * {@linkcode CompileResultMap }.
4044
+ */
4045
+ type CompileResults = CompileResultMap$1[keyof CompileResultMap$1];
4046
+ /**
4047
+ * A **compiler** handles the compiling of a syntax tree to something else
4048
+ * (in most cases, text) (TypeScript type).
4049
+ *
4050
+ * It is used in the stringify phase and called with a {@linkcode Node }
4051
+ * and {@linkcode VFile } representation of the document to compile.
4052
+ * It should return the textual representation of the given tree (typically
4053
+ * `string`).
4054
+ *
4055
+ * > **Note**: unified typically compiles by serializing: most compilers
4056
+ * > return `string` (or `Uint8Array`).
4057
+ * > Some compilers, such as the one configured with
4058
+ * > [`rehype-react`][rehype-react], return other values (in this case, a
4059
+ * > React tree).
4060
+ * > If you’re using a compiler that doesn’t serialize, expect different
4061
+ * > result values.
4062
+ * >
4063
+ * > To register custom results in TypeScript, add them to
4064
+ * > {@linkcode CompileResultMap }.
4065
+ *
4066
+ * [rehype-react]: https://github.com/rehypejs/rehype-react
4067
+ */
4068
+ type Compiler<Tree extends Node$2 = Node$2, Result extends CompileResults = CompileResults> = (tree: Tree, file: VFile) => Result;
4069
+ /**
4070
+ * A **parser** handles the parsing of text to a syntax tree.
4071
+ *
4072
+ * It is used in the parse phase and is called with a `string` and
4073
+ * {@linkcode VFile } of the document to parse.
4074
+ * It must return the syntax tree representation of the given file
4075
+ * ({@linkcode Node }).
4076
+ */
4077
+ type Parser<Tree extends Node$2 = Node$2> = (document: string, file: VFile) => Tree;
4078
+ /**
4079
+ * Union of the different ways to add plugins and settings.
4080
+ */
4081
+ type Pluggable = (Plugin<Array<any>, any, any> | PluginTuple<Array<any>, any, any> | Preset);
4082
+ /**
4083
+ * List of plugins and presets.
4084
+ */
4085
+ type PluggableList = Array<Pluggable>;
4086
+ /**
4087
+ * Single plugin.
4088
+ *
4089
+ * Plugins configure the processors they are applied on in the following
4090
+ * ways:
4091
+ *
4092
+ * * they change the processor, such as the parser, the compiler, or by
4093
+ * configuring data
4094
+ * * they specify how to handle trees and files
4095
+ *
4096
+ * In practice, they are functions that can receive options and configure the
4097
+ * processor (`this`).
4098
+ *
4099
+ * > **Note**: plugins are called when the processor is *frozen*, not when
4100
+ * > they are applied.
4101
+ */
4102
+ type Plugin<PluginParameters extends unknown[] = [], Input extends string | Node$2 | undefined = Node$2, 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);
4103
+ /**
4104
+ * Tuple of a plugin and its configuration.
4105
+ *
4106
+ * The first item is a plugin, the rest are its parameters.
4107
+ */
4108
+ type PluginTuple<TupleParameters extends unknown[] = [], Input extends string | Node$2 | undefined = undefined, Output = undefined> = ([plugin: Plugin<TupleParameters, Input, Output>, ...parameters: TupleParameters]);
4109
+ /**
4110
+ * Sharable configuration.
4111
+ *
4112
+ * They can contain plugins and settings.
4113
+ */
4114
+ type Preset = {
4115
+ /**
4116
+ * List of plugins and presets (optional).
4117
+ */
4118
+ plugins?: PluggableList | undefined;
4119
+ /**
4120
+ * Shared settings for parsers and compilers (optional).
4121
+ */
4122
+ settings?: Settings$1 | undefined;
4123
+ };
4124
+ /**
4125
+ * Callback called when the process is done.
4126
+ *
4127
+ * Called with either an error or a result.
4128
+ */
4129
+ type ProcessCallback<File extends VFile = VFile> = (error?: Error | undefined, file?: File | undefined) => undefined;
4130
+ /**
4131
+ * Callback called when transformers are done.
4132
+ *
4133
+ * Called with either an error or results.
4134
+ */
4135
+ type RunCallback<Tree extends Node$2 = Node$2> = (error?: Error | undefined, tree?: Tree | undefined, file?: VFile | undefined) => undefined;
4136
+ /**
4137
+ * Callback passed to transforms.
4138
+ *
4139
+ * If the signature of a `transformer` accepts a third argument, the
4140
+ * transformer may perform asynchronous operations, and must call it.
4141
+ */
4142
+ type TransformCallback<Output extends Node$2 = Node$2> = (error?: Error | undefined, tree?: Output | undefined, file?: VFile | undefined) => undefined;
4143
+ /**
4144
+ * Transformers handle syntax trees and files.
4145
+ *
4146
+ * They are functions that are called each time a syntax tree and file are
4147
+ * passed through the run phase.
4148
+ * When an error occurs in them (either because it’s thrown, returned,
4149
+ * rejected, or passed to `next`), the process stops.
4150
+ *
4151
+ * The run phase is handled by [`trough`][trough], see its documentation for
4152
+ * the exact semantics of these functions.
4153
+ *
4154
+ * > **Note**: you should likely ignore `next`: don’t accept it.
4155
+ * > it supports callback-style async work.
4156
+ * > But promises are likely easier to reason about.
4157
+ *
4158
+ * [trough]: https://github.com/wooorm/trough#function-fninput-next
4159
+ */
4160
+ type Transformer<Input extends Node$2 = Node$2, Output extends Node$2 = Input> = (tree: Input, file: VFile, next: TransformCallback<Output>) => (Promise<Output | undefined | void> | Promise<never> | // For some reason this is needed separately.
4161
+ Output | Error | undefined | void);
4162
+ /**
4163
+ * Create a processor based on the input/output of a {@link Plugin plugin}.
4164
+ */
4165
+ type UsePlugin<ParseTree extends Node$2 | undefined, HeadTree extends Node$2 | undefined, TailTree extends Node$2 | undefined, CompileTree extends Node$2 | undefined, CompileResult extends CompileResults | undefined, Input extends string | Node$2 | 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>);
4166
+ /**
4167
+ * Type to generate a {@linkcode VFile } corresponding to a compiler result.
4168
+ *
4169
+ * If a result that is not acceptable on a `VFile` is used, that will
4170
+ * be stored on the `result` field of {@linkcode VFile }.
4171
+ */
4172
+ type VFileWithOutput<Result extends CompileResults | undefined> = (Result extends Value | undefined ? VFile : VFile & {
4173
+ result: Result;
4174
+ });
4175
+ //#endregion
4176
+ //#region ../../node_modules/.pnpm/unified@11.0.5/node_modules/unified/index.d.ts
4177
+ // See: <https://github.com/sindresorhus/type-fest/blob/main/source/empty-object.d.ts>
4178
+ declare const emptyObjectSymbol: unique symbol;
4179
+ /**
4180
+ * Interface of known results from compilers.
4181
+ *
4182
+ * Normally, compilers result in text ({@linkcode Value} of `vfile`).
4183
+ * When you compile to something else, such as a React node (as in,
4184
+ * `rehype-react`), you can augment this interface to include that type.
4185
+ *
4186
+ * ```ts
4187
+ * import type {ReactNode} from 'somewhere'
4188
+ *
4189
+ * declare module 'unified' {
4190
+ * interface CompileResultMap {
4191
+ * // Register a new result (value is used, key should match it).
4192
+ * ReactNode: ReactNode
4193
+ * }
4194
+ * }
4195
+ *
4196
+ * export {} // You may not need this, but it makes sure the file is a module.
4197
+ * ```
4198
+ *
4199
+ * Use {@linkcode CompileResults} to access the values.
4200
+ */
4201
+ interface CompileResultMap {
4202
+ // Note: if `Value` from `VFile` is changed, this should too.
4203
+ Uint8Array: Uint8Array;
4204
+ string: string;
4205
+ }
4206
+ /**
4207
+ * Interface of known data that can be supported by all plugins.
4208
+ *
4209
+ * Typically, options can be given to a specific plugin, but sometimes it makes
4210
+ * sense to have information shared with several plugins.
4211
+ * For example, a list of HTML elements that are self-closing, which is needed
4212
+ * during all phases.
4213
+ *
4214
+ * To type this, do something like:
4215
+ *
4216
+ * ```ts
4217
+ * declare module 'unified' {
4218
+ * interface Data {
4219
+ * htmlVoidElements?: Array<string> | undefined
4220
+ * }
4221
+ * }
4222
+ *
4223
+ * export {} // You may not need this, but it makes sure the file is a module.
4224
+ * ```
4225
+ */
4226
+ interface Data {
4227
+ settings?: Settings | undefined;
4228
+ }
4229
+ /**
4230
+ * Interface of known extra options, that can be supported by parser and
4231
+ * compilers.
4232
+ *
4233
+ * This exists so that users can use packages such as `remark`, which configure
4234
+ * both parsers and compilers (in this case `remark-parse` and
4235
+ * `remark-stringify`), and still provide options for them.
4236
+ *
4237
+ * When you make parsers or compilers, that could be packaged up together,
4238
+ * you should support `this.data('settings')` as input and merge it with
4239
+ * explicitly passed `options`.
4240
+ * Then, to type it, using `remark-stringify` as an example, do something like:
4241
+ *
4242
+ * ```ts
4243
+ * declare module 'unified' {
4244
+ * interface Settings {
4245
+ * bullet: '*' | '+' | '-'
4246
+ * // …
4247
+ * }
4248
+ * }
4249
+ *
4250
+ * export {} // You may not need this, but it makes sure the file is a module.
4251
+ * ```
4252
+ */
4253
+ interface Settings {
4254
+ [emptyObjectSymbol]?: never;
4255
+ }
4256
+ //#endregion
4257
+ //#region src/remark-slides.d.ts
4258
+ /**
4259
+ * Remark plugin that splits MDX content at `---` (thematic breaks)
4260
+ * into `<Slide>` components wrapped in a `<Deck>`.
4261
+ *
4262
+ * Internally enables remark-frontmatter for the first YAML block.
4263
+ * Subsequent slide frontmatters are detected via setext heading pattern.
4264
+ */
4265
+ declare function remarkSlides(this: Processor): (tree: Root) => void;
4266
+ //#endregion
4267
+ //#region src/remark-click.d.ts
4268
+ /**
4269
+ * Remark plugin that converts `::click` directives (from remark-directive)
4270
+ * into `<Click>` MDX JSX components.
4271
+ *
4272
+ * Supports both leaf (`::click`) and container (`::: click ... :::`) forms.
4273
+ * Auto-increments the `at` attribute for sequential click steps.
4274
+ */
4275
+ declare function remarkClick(): (tree: Root) => void;
4276
+ //#endregion
4277
+ //#region src/remark-mark.d.ts
4278
+ /**
4279
+ * Remark plugin that converts `:mark[text]{.style}` directives
4280
+ * into `<Mark>` MDX JSX components.
4281
+ *
4282
+ * Supports styles: highlight, underline, circle
4283
+ * Supports color via additional class: .orange, .red, .blue, etc.
4284
+ *
4285
+ * Example: `:mark[important text]{.highlight.orange}`
4286
+ * Produces: `<Mark type="highlight" color="orange">important text</Mark>`
4287
+ */
4288
+ declare function remarkMark(): (tree: Root) => void;
4289
+ //#endregion
4290
+ //#region src/compile.d.ts
4291
+ interface CompileResult {
4292
+ /** Compiled JavaScript code string (ESM) */
4293
+ code: string;
4294
+ /** Extracted metadata from frontmatter */
4295
+ metadata: SlideMetadata;
4296
+ }
4297
+ interface SlideMetadata {
4298
+ title?: string;
4299
+ description?: string;
4300
+ createdAt?: string;
4301
+ layout?: string;
4302
+ transition?: string;
4303
+ slideCount: number;
4304
+ [key: string]: unknown;
4305
+ }
4306
+ /**
4307
+ * Parse frontmatter from MDX source without compiling.
4308
+ * Useful for extracting metadata in listing pages.
4309
+ */
4310
+ declare function parseSlideMetadata(source: string): SlideMetadata;
4311
+ /**
4312
+ * Compile MDX slides source to JavaScript code.
4313
+ * The returned code can be evaluated on the client with `ReslideEmbed`.
4314
+ *
4315
+ * Usage (server side):
4316
+ * ```ts
4317
+ * import { compileMdxSlides } from '@reslide/mdx/compile'
4318
+ * const { code, metadata } = await compileMdxSlides(mdxSource)
4319
+ * ```
4320
+ */
4321
+ declare function compileMdxSlides(source: string, options?: {
4322
+ remarkPlugins?: unknown[];
4323
+ rehypePlugins?: unknown[];
4324
+ }): Promise<CompileResult>;
4325
+ //#endregion
4326
+ export { type CompileResult, type SlideMetadata, compileMdxSlides, parseSlideMetadata, remarkClick, remarkMark, remarkSlides };