@rspress/core 2.0.0-beta.33 → 2.0.0-beta.34

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.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { AdditionalPage } from '@rspress/shared';
2
2
  import type { Data as Data_2 } from 'unist';
3
+ import { DefaultThemeConfig } from '@rspress/shared';
3
4
  import { getIconUrlPath } from '@rspress/shared/node-utils';
4
5
  import { getNodeAttribute } from '@rspress/shared/node-utils';
5
6
  import { getSidebarDataGroup } from '@rspress/shared';
@@ -12,8 +13,11 @@ import { NavItemWithLink } from '@rspress/shared';
12
13
  import type { Node as Node_3 } from 'unist';
13
14
  import { normalizeHref } from '@rspress/shared';
14
15
  import { normalizePosixPath } from '@rspress/shared';
16
+ import type { Options as Options_2 } from 'vfile-message';
15
17
  import { PageIndexInfo } from '@rspress/shared';
16
18
  import type { Plugin as Plugin_2 } from 'unified';
19
+ import type { Point } from 'unist';
20
+ import type { Position } from 'unist';
17
21
  import { removeTrailingSlash } from '@rspress/shared';
18
22
  import { RouteMeta } from '@rspress/shared';
19
23
  import type { RsbuildConfig } from '@rsbuild/core';
@@ -27,6 +31,7 @@ import { SidebarGroup } from '@rspress/shared';
27
31
  import { SidebarItem } from '@rspress/shared';
28
32
  import { SidebarSectionHeader } from '@rspress/shared';
29
33
  import { UserConfig } from '@rspress/shared';
34
+ import { VFileMessage } from 'vfile-message';
30
35
  import { withBase } from '@rspress/shared';
31
36
 
32
37
  export declare function build(options: BuildOptions): Promise<void>;
@@ -37,6 +42,11 @@ declare interface BuildOptions {
37
42
  configFilePath: string;
38
43
  }
39
44
 
45
+ /**
46
+ * Things that can be passed to the constructor.
47
+ */
48
+ declare type Compatible = Options | URL | VFile | Value
49
+
40
50
  /**
41
51
  * Info associated with mdast nodes by the ecosystem.
42
52
  *
@@ -57,6 +67,30 @@ declare interface BuildOptions {
57
67
  */
58
68
  declare interface Data extends Data_2 {}
59
69
 
70
+ /**
71
+ * Custom info.
72
+ *
73
+ * Known attributes can be added to {@linkcode DataMap}
74
+ */
75
+ declare type Data_3 = Record<string, unknown> & Partial<DataMap>
76
+
77
+ /**
78
+ * This map registers the type of the `data` key of a `VFile`.
79
+ *
80
+ * This type can be augmented to register custom `data` types.
81
+ *
82
+ * @example
83
+ * declare module 'vfile' {
84
+ * interface DataMap {
85
+ * // `file.data.name` is typed as `string`
86
+ * name: string
87
+ * }
88
+ * }
89
+ */
90
+ declare interface DataMap {
91
+ [emptyObjectSymbol]?: never
92
+ }
93
+
60
94
  export declare function defineConfig(config: UserConfig): UserConfig;
61
95
 
62
96
  export declare function dev(options: DevOptions): Promise<ServerInstance>;
@@ -69,6 +103,8 @@ declare interface DevOptions {
69
103
  extraBuilderConfig?: RsbuildConfig;
70
104
  }
71
105
 
106
+ declare const emptyObjectSymbol: unique symbol;
107
+
72
108
  export { getIconUrlPath }
73
109
 
74
110
  export { getNodeAttribute }
@@ -83,6 +119,43 @@ declare interface InitOptions {
83
119
 
84
120
  export { logger }
85
121
 
122
+ /**
123
+ * Raw source map.
124
+ *
125
+ * See:
126
+ * <https://github.com/mozilla/source-map/blob/60adcb0/source-map.d.ts#L15-L23>.
127
+ */
128
+ declare interface Map_2 {
129
+ /**
130
+ * The generated file this source map is associated with.
131
+ */
132
+ file: string
133
+ /**
134
+ * A string of base64 VLQs which contain the actual mappings.
135
+ */
136
+ mappings: string
137
+ /**
138
+ * An array of identifiers which can be referenced by individual mappings.
139
+ */
140
+ names: Array<string>
141
+ /**
142
+ * An array of contents of the original source files.
143
+ */
144
+ sourcesContent?: Array<string> | undefined
145
+ /**
146
+ * The URL root from which all sources are relative.
147
+ */
148
+ sourceRoot?: string | undefined
149
+ /**
150
+ * An array of URLs to the original source files.
151
+ */
152
+ sources: Array<string>
153
+ /**
154
+ * Which version of the source map spec this map is following.
155
+ */
156
+ version: number
157
+ }
158
+
86
159
  export { matchPath }
87
160
 
88
161
  export { mergeDocConfig }
@@ -111,10 +184,61 @@ declare interface Node_2 extends Node_3 {
111
184
  data?: Data | undefined;
112
185
  }
113
186
 
187
+ declare type NodeLike = object & {
188
+ type: string;
189
+ position?: Position | undefined;
190
+ };
191
+
114
192
  export { normalizeHref }
115
193
 
116
194
  export { normalizePosixPath }
117
195
 
196
+ /**
197
+ * Configuration.
198
+ */
199
+ declare interface Options {
200
+ /**
201
+ * Arbitrary fields that will be shallow copied over to the new file.
202
+ */
203
+ [key: string]: unknown
204
+ /**
205
+ * Set `basename` (name).
206
+ */
207
+ basename?: string | null | undefined
208
+ /**
209
+ * Set `cwd` (working directory).
210
+ */
211
+ cwd?: string | null | undefined
212
+ /**
213
+ * Set `data` (associated info).
214
+ */
215
+ data?: Data_3 | null | undefined
216
+ /**
217
+ * Set `dirname` (path w/o basename).
218
+ */
219
+ dirname?: string | null | undefined
220
+ /**
221
+ * Set `extname` (extension with dot).
222
+ */
223
+ extname?: string | null | undefined
224
+ /**
225
+ * Set `history` (paths the file moved between).
226
+ */
227
+ history?: Array<string> | null | undefined
228
+ /**
229
+ * Set `path` (current path).
230
+ */
231
+ path?: URL | string | null | undefined
232
+ /**
233
+ * Set `stem` (name without extension).
234
+ */
235
+ stem?: string | null | undefined
236
+ /**
237
+ * Set `value` (the contents of the file).
238
+ */
239
+ value?: Value | null | undefined
240
+ }
241
+
118
242
  export { PageIndexInfo }
119
243
 
120
244
  /**
@@ -131,6 +255,32 @@ declare interface Parent extends Node_2 {
131
255
  children: RootContent[];
132
256
  }
133
257
 
258
+ export declare class PluginDriver {
259
+ #private;
260
+ haveNavSidebarConfig: boolean;
261
+ static create(config: UserConfig, configFilePath: string, isProd: boolean): Promise<PluginDriver>;
262
+ private constructor();
263
+ getConfigFilePath(): string;
264
+ init(): Promise<void>;
265
+ addPlugin(plugin: RspressPlugin): void;
266
+ getPlugins(): RspressPlugin[];
267
+ clearPlugins(): void;
268
+ removePlugin(pluginName: string): void;
269
+ modifyConfig(): Promise<UserConfig<DefaultThemeConfig>>;
270
+ beforeBuild(): Promise<void[]>;
271
+ afterBuild(): Promise<void[]>;
272
+ modifySearchIndexData(pages: PageIndexInfo[]): Promise<void[]>;
273
+ extendPageData(pageData: PageIndexInfo): Promise<void[]>;
274
+ addPages(): Promise<AdditionalPage[]>;
275
+ routeGenerated(routes: RouteMeta[]): Promise<void[]>;
276
+ routeServiceGenerated(routeService: RouteService): Promise<void[]>;
277
+ addRuntimeModules(): Promise<Record<string, string>>;
278
+ globalUIComponents(): (string | [string, object])[];
279
+ globalStyles(): string[];
280
+ _runParallelAsyncHook<H extends RspressPluginHookKeys>(hookName: H, ...args: Parameters<Required<RspressPlugin>[H]>): Promise<Awaited<ReturnType<Required<RspressPlugin>[H]>>[]>;
281
+ _runSerialAsyncHook<H extends RspressPluginHookKeys>(hookName: H, ...args: Parameters<Required<RspressPlugin>[H]>): RspressPlugin;
282
+ }
283
+
134
284
  export declare const remarkFileCodeBlock: Plugin_2<[
135
285
  {
136
286
  filepath: string;
@@ -143,14 +293,13 @@ export declare const remarkFileCodeBlock: Plugin_2<[
143
293
  * 1. add version and lang prefix to the link
144
294
  * 2. checkDeadLinks
145
295
  */
146
- export declare const remarkLink: Plugin_2<[
147
- {
296
+ export declare const remarkLink: ({ cleanUrls, routeService, remarkLinkOptions, lint, __base, }: {
148
297
  cleanUrls: boolean | string;
149
298
  routeService: RouteService | null;
150
- remarkLinkOptions?: MarkdownOptions['link'];
299
+ remarkLinkOptions?: MarkdownOptions["link"];
300
+ lint?: boolean;
151
301
  __base?: string;
152
- }
153
- ], Root>;
302
+ }) => (tree: Root, file: VFile) => void;
154
303
 
155
304
  export { removeTrailingSlash }
156
305
 
@@ -227,6 +376,8 @@ export { RSPRESS_TEMP_DIR }
227
376
 
228
377
  export { RspressPlugin }
229
378
 
379
+ declare type RspressPluginHookKeys = 'beforeBuild' | 'config' | 'afterBuild' | 'addPages' | 'addRuntimeModules' | 'routeGenerated' | 'routeServiceGenerated' | 'extendPageData' | 'modifySearchIndexData';
380
+
230
381
  export declare function serve(options: ServeOptions): Promise<ReturnType<RsbuildInstance['preview']>>;
231
382
 
232
383
  declare interface ServeOptions {
@@ -252,6 +403,1465 @@ export { SidebarSectionHeader }
252
403
 
253
404
  export { UserConfig }
254
405
 
406
+ /**
407
+ * Contents of the file.
408
+ *
409
+ * Can either be text or a `Uint8Array` structure.
410
+ */
411
+ declare type Value = Uint8Array | string
412
+
413
+ declare class VFile {
414
+ /**
415
+ * Create a new virtual file.
416
+ *
417
+ * `options` is treated as:
418
+ *
419
+ * * `string` or `Uint8Array` — `{value: options}`
420
+ * * `URL` — `{path: options}`
421
+ * * `VFile` — shallow copies its data over to the new file
422
+ * * `object` — all fields are shallow copied over to the new file
423
+ *
424
+ * Path related fields are set in the following order (least specific to
425
+ * most specific): `history`, `path`, `basename`, `stem`, `extname`,
426
+ * `dirname`.
427
+ *
428
+ * You cannot set `dirname` or `extname` without setting either `history`,
429
+ * `path`, `basename`, or `stem` too.
430
+ *
431
+ * @param {Compatible | null | undefined} [value]
432
+ * File value.
433
+ * @returns
434
+ * New instance.
435
+ */
436
+ constructor(value?: Compatible | null | undefined);
437
+ /**
438
+ * Base of `path` (default: `process.cwd()` or `'/'` in browsers).
439
+ *
440
+ * @type {string}
441
+ */
442
+ cwd: string;
443
+ /**
444
+ * Place to store custom info (default: `{}`).
445
+ *
446
+ * It’s OK to store custom data directly on the file but moving it to
447
+ * `data` is recommended.
448
+ *
449
+ * @type {Data}
450
+ */
451
+ data: Data_3;
452
+ /**
453
+ * List of file paths the file moved between.
454
+ *
455
+ * The first is the original path and the last is the current path.
456
+ *
457
+ * @type {Array<string>}
458
+ */
459
+ history: Array<string>;
460
+ /**
461
+ * List of messages associated with the file.
462
+ *
463
+ * @type {Array<VFileMessage>}
464
+ */
465
+ messages: Array<VFileMessage>;
466
+ /**
467
+ * Raw value.
468
+ *
469
+ * @type {Value}
470
+ */
471
+ value: Value;
472
+ /**
473
+ * Source map.
474
+ *
475
+ * This type is equivalent to the `RawSourceMap` type from the `source-map`
476
+ * module.
477
+ *
478
+ * @type {Map | null | undefined}
479
+ */
480
+ map: Map_2 | null | undefined;
481
+ /**
482
+ * Custom, non-string, compiled, representation.
483
+ *
484
+ * This is used by unified to store non-string results.
485
+ * One example is when turning markdown into React nodes.
486
+ *
487
+ * @type {unknown}
488
+ */
489
+ result: unknown;
490
+ /**
491
+ * Whether a file was saved to disk.
492
+ *
493
+ * This is used by vfile reporters.
494
+ *
495
+ * @type {boolean}
496
+ */
497
+ stored: boolean;
498
+ /**
499
+ * Set basename (including extname) (`'index.min.js'`).
500
+ *
501
+ * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
502
+ * on windows).
503
+ * Cannot be nullified (use `file.path = file.dirname` instead).
504
+ *
505
+ * @param {string} basename
506
+ * Basename.
507
+ * @returns {undefined}
508
+ * Nothing.
509
+ */
510
+ set basename(basename: string);
511
+ /**
512
+ * Get the basename (including extname) (example: `'index.min.js'`).
513
+ *
514
+ * @returns {string | undefined}
515
+ * Basename.
516
+ */
517
+ get basename(): string | undefined;
518
+ /**
519
+ * Set the full path (example: `'~/index.min.js'`).
520
+ *
521
+ * Cannot be nullified.
522
+ * You can set a file URL (a `URL` object with a `file:` protocol) which will
523
+ * be turned into a path with `url.fileURLToPath`.
524
+ *
525
+ * @param {URL | string} path
526
+ * Path.
527
+ * @returns {undefined}
528
+ * Nothing.
529
+ */
530
+ set path(path: string | URL);
531
+ /**
532
+ * Get the full path (example: `'~/index.min.js'`).
533
+ *
534
+ * @returns {string}
535
+ * Path.
536
+ */
537
+ get path(): string;
538
+ /**
539
+ * Set the parent path (example: `'~'`).
540
+ *
541
+ * Cannot be set if there’s no `path` yet.
542
+ *
543
+ * @param {string | undefined} dirname
544
+ * Dirname.
545
+ * @returns {undefined}
546
+ * Nothing.
547
+ */
548
+ set dirname(dirname: string | undefined);
549
+ /**
550
+ * Get the parent path (example: `'~'`).
551
+ *
552
+ * @returns {string | undefined}
553
+ * Dirname.
554
+ */
555
+ get dirname(): string | undefined;
556
+ /**
557
+ * Set the extname (including dot) (example: `'.js'`).
558
+ *
559
+ * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
560
+ * on windows).
561
+ * Cannot be set if there’s no `path` yet.
562
+ *
563
+ * @param {string | undefined} extname
564
+ * Extname.
565
+ * @returns {undefined}
566
+ * Nothing.
567
+ */
568
+ set extname(extname: string | undefined);
569
+ /**
570
+ * Get the extname (including dot) (example: `'.js'`).
571
+ *
572
+ * @returns {string | undefined}
573
+ * Extname.
574
+ */
575
+ get extname(): string | undefined;
576
+ /**
577
+ * Set the stem (basename w/o extname) (example: `'index.min'`).
578
+ *
579
+ * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
580
+ * on windows).
581
+ * Cannot be nullified (use `file.path = file.dirname` instead).
582
+ *
583
+ * @param {string} stem
584
+ * Stem.
585
+ * @returns {undefined}
586
+ * Nothing.
587
+ */
588
+ set stem(stem: string);
589
+ /**
590
+ * Get the stem (basename w/o extname) (example: `'index.min'`).
591
+ *
592
+ * @returns {string | undefined}
593
+ * Stem.
594
+ */
595
+ get stem(): string | undefined;
596
+ /**
597
+ * Create a fatal message for `reason` associated with the file.
598
+ *
599
+ * The `fatal` field of the message is set to `true` (error; file not usable)
600
+ * and the `file` field is set to the current file path.
601
+ * The message is added to the `messages` field on `file`.
602
+ *
603
+ * > 🪦 **Note**: also has obsolete signatures.
604
+ *
605
+ * @overload@overload
606
+ * @param {string} reason
607
+ * @param {MessageOptions | null | undefined} [options]
608
+ * @returns {never}
609
+ *
610
+ * @overload@overload
611
+ * @param {string} reason
612
+ * @param {Node | NodeLike | null | undefined} parent
613
+ * @param {string | null | undefined} [origin]
614
+ * @returns {never}
615
+ *
616
+ * @overload@overload
617
+ * @param {string} reason
618
+ * @param {Point | Position | null | undefined} place
619
+ * @param {string | null | undefined} [origin]
620
+ * @returns {never}
621
+ *
622
+ * @overload@overload
623
+ * @param {string} reason
624
+ * @param {string | null | undefined} [origin]
625
+ * @returns {never}
626
+ *
627
+ * @overload@overload
628
+ * @param {Error | VFileMessage} cause
629
+ * @param {Node | NodeLike | null | undefined} parent
630
+ * @param {string | null | undefined} [origin]
631
+ * @returns {never}
632
+ *
633
+ * @overload@overload
634
+ * @param {Error | VFileMessage} cause
635
+ * @param {Point | Position | null | undefined} place
636
+ * @param {string | null | undefined} [origin]
637
+ * @returns {never}
638
+ *
639
+ * @overload@overload
640
+ * @param {Error | VFileMessage} cause
641
+ * @param {string | null | undefined} [origin]
642
+ * @returns {never}
643
+ *
644
+ * @param {Error | VFileMessage | string} causeOrReason
645
+ * Reason for message, should use markdown.
646
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
647
+ * Configuration (optional).
648
+ * @param {string | null | undefined} [origin]
649
+ * Place in code where the message originates (example:
650
+ * `'my-package:my-rule'` or `'my-rule'`).
651
+ * @returns {never}
652
+ * Never.
653
+ * @throws {VFileMessage}
654
+ * Message.
655
+ */
656
+ fail(reason: string, options?: Options_2 | null | undefined): never;
657
+ /**
658
+ * Create a fatal message for `reason` associated with the file.
659
+ *
660
+ * The `fatal` field of the message is set to `true` (error; file not usable)
661
+ * and the `file` field is set to the current file path.
662
+ * The message is added to the `messages` field on `file`.
663
+ *
664
+ * > 🪦 **Note**: also has obsolete signatures.
665
+ *
666
+ * @overload@overload
667
+ * @param {string} reason
668
+ * @param {MessageOptions | null | undefined} [options]
669
+ * @returns {never}
670
+ *
671
+ * @overload@overload
672
+ * @param {string} reason
673
+ * @param {Node | NodeLike | null | undefined} parent
674
+ * @param {string | null | undefined} [origin]
675
+ * @returns {never}
676
+ *
677
+ * @overload@overload
678
+ * @param {string} reason
679
+ * @param {Point | Position | null | undefined} place
680
+ * @param {string | null | undefined} [origin]
681
+ * @returns {never}
682
+ *
683
+ * @overload@overload
684
+ * @param {string} reason
685
+ * @param {string | null | undefined} [origin]
686
+ * @returns {never}
687
+ *
688
+ * @overload@overload
689
+ * @param {Error | VFileMessage} cause
690
+ * @param {Node | NodeLike | null | undefined} parent
691
+ * @param {string | null | undefined} [origin]
692
+ * @returns {never}
693
+ *
694
+ * @overload@overload
695
+ * @param {Error | VFileMessage} cause
696
+ * @param {Point | Position | null | undefined} place
697
+ * @param {string | null | undefined} [origin]
698
+ * @returns {never}
699
+ *
700
+ * @overload@overload
701
+ * @param {Error | VFileMessage} cause
702
+ * @param {string | null | undefined} [origin]
703
+ * @returns {never}
704
+ *
705
+ * @param {Error | VFileMessage | string} causeOrReason
706
+ * Reason for message, should use markdown.
707
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
708
+ * Configuration (optional).
709
+ * @param {string | null | undefined} [origin]
710
+ * Place in code where the message originates (example:
711
+ * `'my-package:my-rule'` or `'my-rule'`).
712
+ * @returns {never}
713
+ * Never.
714
+ * @throws {VFileMessage}
715
+ * Message.
716
+ */
717
+ fail(reason: string, parent: Node_3 | NodeLike | null | undefined, origin?: string | null | undefined): never;
718
+ /**
719
+ * Create a fatal message for `reason` associated with the file.
720
+ *
721
+ * The `fatal` field of the message is set to `true` (error; file not usable)
722
+ * and the `file` field is set to the current file path.
723
+ * The message is added to the `messages` field on `file`.
724
+ *
725
+ * > 🪦 **Note**: also has obsolete signatures.
726
+ *
727
+ * @overload@overload
728
+ * @param {string} reason
729
+ * @param {MessageOptions | null | undefined} [options]
730
+ * @returns {never}
731
+ *
732
+ * @overload@overload
733
+ * @param {string} reason
734
+ * @param {Node | NodeLike | null | undefined} parent
735
+ * @param {string | null | undefined} [origin]
736
+ * @returns {never}
737
+ *
738
+ * @overload@overload
739
+ * @param {string} reason
740
+ * @param {Point | Position | null | undefined} place
741
+ * @param {string | null | undefined} [origin]
742
+ * @returns {never}
743
+ *
744
+ * @overload@overload
745
+ * @param {string} reason
746
+ * @param {string | null | undefined} [origin]
747
+ * @returns {never}
748
+ *
749
+ * @overload@overload
750
+ * @param {Error | VFileMessage} cause
751
+ * @param {Node | NodeLike | null | undefined} parent
752
+ * @param {string | null | undefined} [origin]
753
+ * @returns {never}
754
+ *
755
+ * @overload@overload
756
+ * @param {Error | VFileMessage} cause
757
+ * @param {Point | Position | null | undefined} place
758
+ * @param {string | null | undefined} [origin]
759
+ * @returns {never}
760
+ *
761
+ * @overload@overload
762
+ * @param {Error | VFileMessage} cause
763
+ * @param {string | null | undefined} [origin]
764
+ * @returns {never}
765
+ *
766
+ * @param {Error | VFileMessage | string} causeOrReason
767
+ * Reason for message, should use markdown.
768
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
769
+ * Configuration (optional).
770
+ * @param {string | null | undefined} [origin]
771
+ * Place in code where the message originates (example:
772
+ * `'my-package:my-rule'` or `'my-rule'`).
773
+ * @returns {never}
774
+ * Never.
775
+ * @throws {VFileMessage}
776
+ * Message.
777
+ */
778
+ fail(reason: string, place: Point | Position | null | undefined, origin?: string | null | undefined): never;
779
+ /**
780
+ * Create a fatal message for `reason` associated with the file.
781
+ *
782
+ * The `fatal` field of the message is set to `true` (error; file not usable)
783
+ * and the `file` field is set to the current file path.
784
+ * The message is added to the `messages` field on `file`.
785
+ *
786
+ * > 🪦 **Note**: also has obsolete signatures.
787
+ *
788
+ * @overload@overload
789
+ * @param {string} reason
790
+ * @param {MessageOptions | null | undefined} [options]
791
+ * @returns {never}
792
+ *
793
+ * @overload@overload
794
+ * @param {string} reason
795
+ * @param {Node | NodeLike | null | undefined} parent
796
+ * @param {string | null | undefined} [origin]
797
+ * @returns {never}
798
+ *
799
+ * @overload@overload
800
+ * @param {string} reason
801
+ * @param {Point | Position | null | undefined} place
802
+ * @param {string | null | undefined} [origin]
803
+ * @returns {never}
804
+ *
805
+ * @overload@overload
806
+ * @param {string} reason
807
+ * @param {string | null | undefined} [origin]
808
+ * @returns {never}
809
+ *
810
+ * @overload@overload
811
+ * @param {Error | VFileMessage} cause
812
+ * @param {Node | NodeLike | null | undefined} parent
813
+ * @param {string | null | undefined} [origin]
814
+ * @returns {never}
815
+ *
816
+ * @overload@overload
817
+ * @param {Error | VFileMessage} cause
818
+ * @param {Point | Position | null | undefined} place
819
+ * @param {string | null | undefined} [origin]
820
+ * @returns {never}
821
+ *
822
+ * @overload@overload
823
+ * @param {Error | VFileMessage} cause
824
+ * @param {string | null | undefined} [origin]
825
+ * @returns {never}
826
+ *
827
+ * @param {Error | VFileMessage | string} causeOrReason
828
+ * Reason for message, should use markdown.
829
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
830
+ * Configuration (optional).
831
+ * @param {string | null | undefined} [origin]
832
+ * Place in code where the message originates (example:
833
+ * `'my-package:my-rule'` or `'my-rule'`).
834
+ * @returns {never}
835
+ * Never.
836
+ * @throws {VFileMessage}
837
+ * Message.
838
+ */
839
+ fail(reason: string, origin?: string | null | undefined): never;
840
+ /**
841
+ * Create a fatal message for `reason` associated with the file.
842
+ *
843
+ * The `fatal` field of the message is set to `true` (error; file not usable)
844
+ * and the `file` field is set to the current file path.
845
+ * The message is added to the `messages` field on `file`.
846
+ *
847
+ * > 🪦 **Note**: also has obsolete signatures.
848
+ *
849
+ * @overload@overload
850
+ * @param {string} reason
851
+ * @param {MessageOptions | null | undefined} [options]
852
+ * @returns {never}
853
+ *
854
+ * @overload@overload
855
+ * @param {string} reason
856
+ * @param {Node | NodeLike | null | undefined} parent
857
+ * @param {string | null | undefined} [origin]
858
+ * @returns {never}
859
+ *
860
+ * @overload@overload
861
+ * @param {string} reason
862
+ * @param {Point | Position | null | undefined} place
863
+ * @param {string | null | undefined} [origin]
864
+ * @returns {never}
865
+ *
866
+ * @overload@overload
867
+ * @param {string} reason
868
+ * @param {string | null | undefined} [origin]
869
+ * @returns {never}
870
+ *
871
+ * @overload@overload
872
+ * @param {Error | VFileMessage} cause
873
+ * @param {Node | NodeLike | null | undefined} parent
874
+ * @param {string | null | undefined} [origin]
875
+ * @returns {never}
876
+ *
877
+ * @overload@overload
878
+ * @param {Error | VFileMessage} cause
879
+ * @param {Point | Position | null | undefined} place
880
+ * @param {string | null | undefined} [origin]
881
+ * @returns {never}
882
+ *
883
+ * @overload@overload
884
+ * @param {Error | VFileMessage} cause
885
+ * @param {string | null | undefined} [origin]
886
+ * @returns {never}
887
+ *
888
+ * @param {Error | VFileMessage | string} causeOrReason
889
+ * Reason for message, should use markdown.
890
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
891
+ * Configuration (optional).
892
+ * @param {string | null | undefined} [origin]
893
+ * Place in code where the message originates (example:
894
+ * `'my-package:my-rule'` or `'my-rule'`).
895
+ * @returns {never}
896
+ * Never.
897
+ * @throws {VFileMessage}
898
+ * Message.
899
+ */
900
+ fail(cause: Error | VFileMessage, parent: Node_3 | NodeLike | null | undefined, origin?: string | null | undefined): never;
901
+ /**
902
+ * Create a fatal message for `reason` associated with the file.
903
+ *
904
+ * The `fatal` field of the message is set to `true` (error; file not usable)
905
+ * and the `file` field is set to the current file path.
906
+ * The message is added to the `messages` field on `file`.
907
+ *
908
+ * > 🪦 **Note**: also has obsolete signatures.
909
+ *
910
+ * @overload@overload
911
+ * @param {string} reason
912
+ * @param {MessageOptions | null | undefined} [options]
913
+ * @returns {never}
914
+ *
915
+ * @overload@overload
916
+ * @param {string} reason
917
+ * @param {Node | NodeLike | null | undefined} parent
918
+ * @param {string | null | undefined} [origin]
919
+ * @returns {never}
920
+ *
921
+ * @overload@overload
922
+ * @param {string} reason
923
+ * @param {Point | Position | null | undefined} place
924
+ * @param {string | null | undefined} [origin]
925
+ * @returns {never}
926
+ *
927
+ * @overload@overload
928
+ * @param {string} reason
929
+ * @param {string | null | undefined} [origin]
930
+ * @returns {never}
931
+ *
932
+ * @overload@overload
933
+ * @param {Error | VFileMessage} cause
934
+ * @param {Node | NodeLike | null | undefined} parent
935
+ * @param {string | null | undefined} [origin]
936
+ * @returns {never}
937
+ *
938
+ * @overload@overload
939
+ * @param {Error | VFileMessage} cause
940
+ * @param {Point | Position | null | undefined} place
941
+ * @param {string | null | undefined} [origin]
942
+ * @returns {never}
943
+ *
944
+ * @overload@overload
945
+ * @param {Error | VFileMessage} cause
946
+ * @param {string | null | undefined} [origin]
947
+ * @returns {never}
948
+ *
949
+ * @param {Error | VFileMessage | string} causeOrReason
950
+ * Reason for message, should use markdown.
951
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
952
+ * Configuration (optional).
953
+ * @param {string | null | undefined} [origin]
954
+ * Place in code where the message originates (example:
955
+ * `'my-package:my-rule'` or `'my-rule'`).
956
+ * @returns {never}
957
+ * Never.
958
+ * @throws {VFileMessage}
959
+ * Message.
960
+ */
961
+ fail(cause: Error | VFileMessage, place: Point | Position | null | undefined, origin?: string | null | undefined): never;
962
+ /**
963
+ * Create a fatal message for `reason` associated with the file.
964
+ *
965
+ * The `fatal` field of the message is set to `true` (error; file not usable)
966
+ * and the `file` field is set to the current file path.
967
+ * The message is added to the `messages` field on `file`.
968
+ *
969
+ * > 🪦 **Note**: also has obsolete signatures.
970
+ *
971
+ * @overload@overload
972
+ * @param {string} reason
973
+ * @param {MessageOptions | null | undefined} [options]
974
+ * @returns {never}
975
+ *
976
+ * @overload@overload
977
+ * @param {string} reason
978
+ * @param {Node | NodeLike | null | undefined} parent
979
+ * @param {string | null | undefined} [origin]
980
+ * @returns {never}
981
+ *
982
+ * @overload@overload
983
+ * @param {string} reason
984
+ * @param {Point | Position | null | undefined} place
985
+ * @param {string | null | undefined} [origin]
986
+ * @returns {never}
987
+ *
988
+ * @overload@overload
989
+ * @param {string} reason
990
+ * @param {string | null | undefined} [origin]
991
+ * @returns {never}
992
+ *
993
+ * @overload@overload
994
+ * @param {Error | VFileMessage} cause
995
+ * @param {Node | NodeLike | null | undefined} parent
996
+ * @param {string | null | undefined} [origin]
997
+ * @returns {never}
998
+ *
999
+ * @overload@overload
1000
+ * @param {Error | VFileMessage} cause
1001
+ * @param {Point | Position | null | undefined} place
1002
+ * @param {string | null | undefined} [origin]
1003
+ * @returns {never}
1004
+ *
1005
+ * @overload@overload
1006
+ * @param {Error | VFileMessage} cause
1007
+ * @param {string | null | undefined} [origin]
1008
+ * @returns {never}
1009
+ *
1010
+ * @param {Error | VFileMessage | string} causeOrReason
1011
+ * Reason for message, should use markdown.
1012
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1013
+ * Configuration (optional).
1014
+ * @param {string | null | undefined} [origin]
1015
+ * Place in code where the message originates (example:
1016
+ * `'my-package:my-rule'` or `'my-rule'`).
1017
+ * @returns {never}
1018
+ * Never.
1019
+ * @throws {VFileMessage}
1020
+ * Message.
1021
+ */
1022
+ fail(cause: Error | VFileMessage, origin?: string | null | undefined): never;
1023
+ /**
1024
+ * Create an info message for `reason` associated with the file.
1025
+ *
1026
+ * The `fatal` field of the message is set to `undefined` (info; change
1027
+ * likely not needed) and the `file` field is set to the current file path.
1028
+ * The message is added to the `messages` field on `file`.
1029
+ *
1030
+ * > 🪦 **Note**: also has obsolete signatures.
1031
+ *
1032
+ * @overload@overload
1033
+ * @param {string} reason
1034
+ * @param {MessageOptions | null | undefined} [options]
1035
+ * @returns {VFileMessage}
1036
+ *
1037
+ * @overload@overload
1038
+ * @param {string} reason
1039
+ * @param {Node | NodeLike | null | undefined} parent
1040
+ * @param {string | null | undefined} [origin]
1041
+ * @returns {VFileMessage}
1042
+ *
1043
+ * @overload@overload
1044
+ * @param {string} reason
1045
+ * @param {Point | Position | null | undefined} place
1046
+ * @param {string | null | undefined} [origin]
1047
+ * @returns {VFileMessage}
1048
+ *
1049
+ * @overload@overload
1050
+ * @param {string} reason
1051
+ * @param {string | null | undefined} [origin]
1052
+ * @returns {VFileMessage}
1053
+ *
1054
+ * @overload@overload
1055
+ * @param {Error | VFileMessage} cause
1056
+ * @param {Node | NodeLike | null | undefined} parent
1057
+ * @param {string | null | undefined} [origin]
1058
+ * @returns {VFileMessage}
1059
+ *
1060
+ * @overload@overload
1061
+ * @param {Error | VFileMessage} cause
1062
+ * @param {Point | Position | null | undefined} place
1063
+ * @param {string | null | undefined} [origin]
1064
+ * @returns {VFileMessage}
1065
+ *
1066
+ * @overload@overload
1067
+ * @param {Error | VFileMessage} cause
1068
+ * @param {string | null | undefined} [origin]
1069
+ * @returns {VFileMessage}
1070
+ *
1071
+ * @param {Error | VFileMessage | string} causeOrReason
1072
+ * Reason for message, should use markdown.
1073
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1074
+ * Configuration (optional).
1075
+ * @param {string | null | undefined} [origin]
1076
+ * Place in code where the message originates (example:
1077
+ * `'my-package:my-rule'` or `'my-rule'`).
1078
+ * @returns {VFileMessage}
1079
+ * Message.
1080
+ */
1081
+ info(reason: string, options?: Options_2 | null | undefined): VFileMessage;
1082
+ /**
1083
+ * Create an info message for `reason` associated with the file.
1084
+ *
1085
+ * The `fatal` field of the message is set to `undefined` (info; change
1086
+ * likely not needed) and the `file` field is set to the current file path.
1087
+ * The message is added to the `messages` field on `file`.
1088
+ *
1089
+ * > 🪦 **Note**: also has obsolete signatures.
1090
+ *
1091
+ * @overload@overload
1092
+ * @param {string} reason
1093
+ * @param {MessageOptions | null | undefined} [options]
1094
+ * @returns {VFileMessage}
1095
+ *
1096
+ * @overload@overload
1097
+ * @param {string} reason
1098
+ * @param {Node | NodeLike | null | undefined} parent
1099
+ * @param {string | null | undefined} [origin]
1100
+ * @returns {VFileMessage}
1101
+ *
1102
+ * @overload@overload
1103
+ * @param {string} reason
1104
+ * @param {Point | Position | null | undefined} place
1105
+ * @param {string | null | undefined} [origin]
1106
+ * @returns {VFileMessage}
1107
+ *
1108
+ * @overload@overload
1109
+ * @param {string} reason
1110
+ * @param {string | null | undefined} [origin]
1111
+ * @returns {VFileMessage}
1112
+ *
1113
+ * @overload@overload
1114
+ * @param {Error | VFileMessage} cause
1115
+ * @param {Node | NodeLike | null | undefined} parent
1116
+ * @param {string | null | undefined} [origin]
1117
+ * @returns {VFileMessage}
1118
+ *
1119
+ * @overload@overload
1120
+ * @param {Error | VFileMessage} cause
1121
+ * @param {Point | Position | null | undefined} place
1122
+ * @param {string | null | undefined} [origin]
1123
+ * @returns {VFileMessage}
1124
+ *
1125
+ * @overload@overload
1126
+ * @param {Error | VFileMessage} cause
1127
+ * @param {string | null | undefined} [origin]
1128
+ * @returns {VFileMessage}
1129
+ *
1130
+ * @param {Error | VFileMessage | string} causeOrReason
1131
+ * Reason for message, should use markdown.
1132
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1133
+ * Configuration (optional).
1134
+ * @param {string | null | undefined} [origin]
1135
+ * Place in code where the message originates (example:
1136
+ * `'my-package:my-rule'` or `'my-rule'`).
1137
+ * @returns {VFileMessage}
1138
+ * Message.
1139
+ */
1140
+ info(reason: string, parent: Node_3 | NodeLike | null | undefined, origin?: string | null | undefined): VFileMessage;
1141
+ /**
1142
+ * Create an info message for `reason` associated with the file.
1143
+ *
1144
+ * The `fatal` field of the message is set to `undefined` (info; change
1145
+ * likely not needed) and the `file` field is set to the current file path.
1146
+ * The message is added to the `messages` field on `file`.
1147
+ *
1148
+ * > 🪦 **Note**: also has obsolete signatures.
1149
+ *
1150
+ * @overload@overload
1151
+ * @param {string} reason
1152
+ * @param {MessageOptions | null | undefined} [options]
1153
+ * @returns {VFileMessage}
1154
+ *
1155
+ * @overload@overload
1156
+ * @param {string} reason
1157
+ * @param {Node | NodeLike | null | undefined} parent
1158
+ * @param {string | null | undefined} [origin]
1159
+ * @returns {VFileMessage}
1160
+ *
1161
+ * @overload@overload
1162
+ * @param {string} reason
1163
+ * @param {Point | Position | null | undefined} place
1164
+ * @param {string | null | undefined} [origin]
1165
+ * @returns {VFileMessage}
1166
+ *
1167
+ * @overload@overload
1168
+ * @param {string} reason
1169
+ * @param {string | null | undefined} [origin]
1170
+ * @returns {VFileMessage}
1171
+ *
1172
+ * @overload@overload
1173
+ * @param {Error | VFileMessage} cause
1174
+ * @param {Node | NodeLike | null | undefined} parent
1175
+ * @param {string | null | undefined} [origin]
1176
+ * @returns {VFileMessage}
1177
+ *
1178
+ * @overload@overload
1179
+ * @param {Error | VFileMessage} cause
1180
+ * @param {Point | Position | null | undefined} place
1181
+ * @param {string | null | undefined} [origin]
1182
+ * @returns {VFileMessage}
1183
+ *
1184
+ * @overload@overload
1185
+ * @param {Error | VFileMessage} cause
1186
+ * @param {string | null | undefined} [origin]
1187
+ * @returns {VFileMessage}
1188
+ *
1189
+ * @param {Error | VFileMessage | string} causeOrReason
1190
+ * Reason for message, should use markdown.
1191
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1192
+ * Configuration (optional).
1193
+ * @param {string | null | undefined} [origin]
1194
+ * Place in code where the message originates (example:
1195
+ * `'my-package:my-rule'` or `'my-rule'`).
1196
+ * @returns {VFileMessage}
1197
+ * Message.
1198
+ */
1199
+ info(reason: string, place: Point | Position | null | undefined, origin?: string | null | undefined): VFileMessage;
1200
+ /**
1201
+ * Create an info message for `reason` associated with the file.
1202
+ *
1203
+ * The `fatal` field of the message is set to `undefined` (info; change
1204
+ * likely not needed) and the `file` field is set to the current file path.
1205
+ * The message is added to the `messages` field on `file`.
1206
+ *
1207
+ * > 🪦 **Note**: also has obsolete signatures.
1208
+ *
1209
+ * @overload@overload
1210
+ * @param {string} reason
1211
+ * @param {MessageOptions | null | undefined} [options]
1212
+ * @returns {VFileMessage}
1213
+ *
1214
+ * @overload@overload
1215
+ * @param {string} reason
1216
+ * @param {Node | NodeLike | null | undefined} parent
1217
+ * @param {string | null | undefined} [origin]
1218
+ * @returns {VFileMessage}
1219
+ *
1220
+ * @overload@overload
1221
+ * @param {string} reason
1222
+ * @param {Point | Position | null | undefined} place
1223
+ * @param {string | null | undefined} [origin]
1224
+ * @returns {VFileMessage}
1225
+ *
1226
+ * @overload@overload
1227
+ * @param {string} reason
1228
+ * @param {string | null | undefined} [origin]
1229
+ * @returns {VFileMessage}
1230
+ *
1231
+ * @overload@overload
1232
+ * @param {Error | VFileMessage} cause
1233
+ * @param {Node | NodeLike | null | undefined} parent
1234
+ * @param {string | null | undefined} [origin]
1235
+ * @returns {VFileMessage}
1236
+ *
1237
+ * @overload@overload
1238
+ * @param {Error | VFileMessage} cause
1239
+ * @param {Point | Position | null | undefined} place
1240
+ * @param {string | null | undefined} [origin]
1241
+ * @returns {VFileMessage}
1242
+ *
1243
+ * @overload@overload
1244
+ * @param {Error | VFileMessage} cause
1245
+ * @param {string | null | undefined} [origin]
1246
+ * @returns {VFileMessage}
1247
+ *
1248
+ * @param {Error | VFileMessage | string} causeOrReason
1249
+ * Reason for message, should use markdown.
1250
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1251
+ * Configuration (optional).
1252
+ * @param {string | null | undefined} [origin]
1253
+ * Place in code where the message originates (example:
1254
+ * `'my-package:my-rule'` or `'my-rule'`).
1255
+ * @returns {VFileMessage}
1256
+ * Message.
1257
+ */
1258
+ info(reason: string, origin?: string | null | undefined): VFileMessage;
1259
+ /**
1260
+ * Create an info message for `reason` associated with the file.
1261
+ *
1262
+ * The `fatal` field of the message is set to `undefined` (info; change
1263
+ * likely not needed) and the `file` field is set to the current file path.
1264
+ * The message is added to the `messages` field on `file`.
1265
+ *
1266
+ * > 🪦 **Note**: also has obsolete signatures.
1267
+ *
1268
+ * @overload@overload
1269
+ * @param {string} reason
1270
+ * @param {MessageOptions | null | undefined} [options]
1271
+ * @returns {VFileMessage}
1272
+ *
1273
+ * @overload@overload
1274
+ * @param {string} reason
1275
+ * @param {Node | NodeLike | null | undefined} parent
1276
+ * @param {string | null | undefined} [origin]
1277
+ * @returns {VFileMessage}
1278
+ *
1279
+ * @overload@overload
1280
+ * @param {string} reason
1281
+ * @param {Point | Position | null | undefined} place
1282
+ * @param {string | null | undefined} [origin]
1283
+ * @returns {VFileMessage}
1284
+ *
1285
+ * @overload@overload
1286
+ * @param {string} reason
1287
+ * @param {string | null | undefined} [origin]
1288
+ * @returns {VFileMessage}
1289
+ *
1290
+ * @overload@overload
1291
+ * @param {Error | VFileMessage} cause
1292
+ * @param {Node | NodeLike | null | undefined} parent
1293
+ * @param {string | null | undefined} [origin]
1294
+ * @returns {VFileMessage}
1295
+ *
1296
+ * @overload@overload
1297
+ * @param {Error | VFileMessage} cause
1298
+ * @param {Point | Position | null | undefined} place
1299
+ * @param {string | null | undefined} [origin]
1300
+ * @returns {VFileMessage}
1301
+ *
1302
+ * @overload@overload
1303
+ * @param {Error | VFileMessage} cause
1304
+ * @param {string | null | undefined} [origin]
1305
+ * @returns {VFileMessage}
1306
+ *
1307
+ * @param {Error | VFileMessage | string} causeOrReason
1308
+ * Reason for message, should use markdown.
1309
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1310
+ * Configuration (optional).
1311
+ * @param {string | null | undefined} [origin]
1312
+ * Place in code where the message originates (example:
1313
+ * `'my-package:my-rule'` or `'my-rule'`).
1314
+ * @returns {VFileMessage}
1315
+ * Message.
1316
+ */
1317
+ info(cause: Error | VFileMessage, parent: Node_3 | NodeLike | null | undefined, origin?: string | null | undefined): VFileMessage;
1318
+ /**
1319
+ * Create an info message for `reason` associated with the file.
1320
+ *
1321
+ * The `fatal` field of the message is set to `undefined` (info; change
1322
+ * likely not needed) and the `file` field is set to the current file path.
1323
+ * The message is added to the `messages` field on `file`.
1324
+ *
1325
+ * > 🪦 **Note**: also has obsolete signatures.
1326
+ *
1327
+ * @overload@overload
1328
+ * @param {string} reason
1329
+ * @param {MessageOptions | null | undefined} [options]
1330
+ * @returns {VFileMessage}
1331
+ *
1332
+ * @overload@overload
1333
+ * @param {string} reason
1334
+ * @param {Node | NodeLike | null | undefined} parent
1335
+ * @param {string | null | undefined} [origin]
1336
+ * @returns {VFileMessage}
1337
+ *
1338
+ * @overload@overload
1339
+ * @param {string} reason
1340
+ * @param {Point | Position | null | undefined} place
1341
+ * @param {string | null | undefined} [origin]
1342
+ * @returns {VFileMessage}
1343
+ *
1344
+ * @overload@overload
1345
+ * @param {string} reason
1346
+ * @param {string | null | undefined} [origin]
1347
+ * @returns {VFileMessage}
1348
+ *
1349
+ * @overload@overload
1350
+ * @param {Error | VFileMessage} cause
1351
+ * @param {Node | NodeLike | null | undefined} parent
1352
+ * @param {string | null | undefined} [origin]
1353
+ * @returns {VFileMessage}
1354
+ *
1355
+ * @overload@overload
1356
+ * @param {Error | VFileMessage} cause
1357
+ * @param {Point | Position | null | undefined} place
1358
+ * @param {string | null | undefined} [origin]
1359
+ * @returns {VFileMessage}
1360
+ *
1361
+ * @overload@overload
1362
+ * @param {Error | VFileMessage} cause
1363
+ * @param {string | null | undefined} [origin]
1364
+ * @returns {VFileMessage}
1365
+ *
1366
+ * @param {Error | VFileMessage | string} causeOrReason
1367
+ * Reason for message, should use markdown.
1368
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1369
+ * Configuration (optional).
1370
+ * @param {string | null | undefined} [origin]
1371
+ * Place in code where the message originates (example:
1372
+ * `'my-package:my-rule'` or `'my-rule'`).
1373
+ * @returns {VFileMessage}
1374
+ * Message.
1375
+ */
1376
+ info(cause: Error | VFileMessage, place: Point | Position | null | undefined, origin?: string | null | undefined): VFileMessage;
1377
+ /**
1378
+ * Create an info message for `reason` associated with the file.
1379
+ *
1380
+ * The `fatal` field of the message is set to `undefined` (info; change
1381
+ * likely not needed) and the `file` field is set to the current file path.
1382
+ * The message is added to the `messages` field on `file`.
1383
+ *
1384
+ * > 🪦 **Note**: also has obsolete signatures.
1385
+ *
1386
+ * @overload@overload
1387
+ * @param {string} reason
1388
+ * @param {MessageOptions | null | undefined} [options]
1389
+ * @returns {VFileMessage}
1390
+ *
1391
+ * @overload@overload
1392
+ * @param {string} reason
1393
+ * @param {Node | NodeLike | null | undefined} parent
1394
+ * @param {string | null | undefined} [origin]
1395
+ * @returns {VFileMessage}
1396
+ *
1397
+ * @overload@overload
1398
+ * @param {string} reason
1399
+ * @param {Point | Position | null | undefined} place
1400
+ * @param {string | null | undefined} [origin]
1401
+ * @returns {VFileMessage}
1402
+ *
1403
+ * @overload@overload
1404
+ * @param {string} reason
1405
+ * @param {string | null | undefined} [origin]
1406
+ * @returns {VFileMessage}
1407
+ *
1408
+ * @overload@overload
1409
+ * @param {Error | VFileMessage} cause
1410
+ * @param {Node | NodeLike | null | undefined} parent
1411
+ * @param {string | null | undefined} [origin]
1412
+ * @returns {VFileMessage}
1413
+ *
1414
+ * @overload@overload
1415
+ * @param {Error | VFileMessage} cause
1416
+ * @param {Point | Position | null | undefined} place
1417
+ * @param {string | null | undefined} [origin]
1418
+ * @returns {VFileMessage}
1419
+ *
1420
+ * @overload@overload
1421
+ * @param {Error | VFileMessage} cause
1422
+ * @param {string | null | undefined} [origin]
1423
+ * @returns {VFileMessage}
1424
+ *
1425
+ * @param {Error | VFileMessage | string} causeOrReason
1426
+ * Reason for message, should use markdown.
1427
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1428
+ * Configuration (optional).
1429
+ * @param {string | null | undefined} [origin]
1430
+ * Place in code where the message originates (example:
1431
+ * `'my-package:my-rule'` or `'my-rule'`).
1432
+ * @returns {VFileMessage}
1433
+ * Message.
1434
+ */
1435
+ info(cause: Error | VFileMessage, origin?: string | null | undefined): VFileMessage;
1436
+ /**
1437
+ * Create a message for `reason` associated with the file.
1438
+ *
1439
+ * The `fatal` field of the message is set to `false` (warning; change may be
1440
+ * needed) and the `file` field is set to the current file path.
1441
+ * The message is added to the `messages` field on `file`.
1442
+ *
1443
+ * > 🪦 **Note**: also has obsolete signatures.
1444
+ *
1445
+ * @overload@overload
1446
+ * @param {string} reason
1447
+ * @param {MessageOptions | null | undefined} [options]
1448
+ * @returns {VFileMessage}
1449
+ *
1450
+ * @overload@overload
1451
+ * @param {string} reason
1452
+ * @param {Node | NodeLike | null | undefined} parent
1453
+ * @param {string | null | undefined} [origin]
1454
+ * @returns {VFileMessage}
1455
+ *
1456
+ * @overload@overload
1457
+ * @param {string} reason
1458
+ * @param {Point | Position | null | undefined} place
1459
+ * @param {string | null | undefined} [origin]
1460
+ * @returns {VFileMessage}
1461
+ *
1462
+ * @overload@overload
1463
+ * @param {string} reason
1464
+ * @param {string | null | undefined} [origin]
1465
+ * @returns {VFileMessage}
1466
+ *
1467
+ * @overload@overload
1468
+ * @param {Error | VFileMessage} cause
1469
+ * @param {Node | NodeLike | null | undefined} parent
1470
+ * @param {string | null | undefined} [origin]
1471
+ * @returns {VFileMessage}
1472
+ *
1473
+ * @overload@overload
1474
+ * @param {Error | VFileMessage} cause
1475
+ * @param {Point | Position | null | undefined} place
1476
+ * @param {string | null | undefined} [origin]
1477
+ * @returns {VFileMessage}
1478
+ *
1479
+ * @overload@overload
1480
+ * @param {Error | VFileMessage} cause
1481
+ * @param {string | null | undefined} [origin]
1482
+ * @returns {VFileMessage}
1483
+ *
1484
+ * @param {Error | VFileMessage | string} causeOrReason
1485
+ * Reason for message, should use markdown.
1486
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1487
+ * Configuration (optional).
1488
+ * @param {string | null | undefined} [origin]
1489
+ * Place in code where the message originates (example:
1490
+ * `'my-package:my-rule'` or `'my-rule'`).
1491
+ * @returns {VFileMessage}
1492
+ * Message.
1493
+ */
1494
+ message(reason: string, options?: Options_2 | null | undefined): VFileMessage;
1495
+ /**
1496
+ * Create a message for `reason` associated with the file.
1497
+ *
1498
+ * The `fatal` field of the message is set to `false` (warning; change may be
1499
+ * needed) and the `file` field is set to the current file path.
1500
+ * The message is added to the `messages` field on `file`.
1501
+ *
1502
+ * > 🪦 **Note**: also has obsolete signatures.
1503
+ *
1504
+ * @overload@overload
1505
+ * @param {string} reason
1506
+ * @param {MessageOptions | null | undefined} [options]
1507
+ * @returns {VFileMessage}
1508
+ *
1509
+ * @overload@overload
1510
+ * @param {string} reason
1511
+ * @param {Node | NodeLike | null | undefined} parent
1512
+ * @param {string | null | undefined} [origin]
1513
+ * @returns {VFileMessage}
1514
+ *
1515
+ * @overload@overload
1516
+ * @param {string} reason
1517
+ * @param {Point | Position | null | undefined} place
1518
+ * @param {string | null | undefined} [origin]
1519
+ * @returns {VFileMessage}
1520
+ *
1521
+ * @overload@overload
1522
+ * @param {string} reason
1523
+ * @param {string | null | undefined} [origin]
1524
+ * @returns {VFileMessage}
1525
+ *
1526
+ * @overload@overload
1527
+ * @param {Error | VFileMessage} cause
1528
+ * @param {Node | NodeLike | null | undefined} parent
1529
+ * @param {string | null | undefined} [origin]
1530
+ * @returns {VFileMessage}
1531
+ *
1532
+ * @overload@overload
1533
+ * @param {Error | VFileMessage} cause
1534
+ * @param {Point | Position | null | undefined} place
1535
+ * @param {string | null | undefined} [origin]
1536
+ * @returns {VFileMessage}
1537
+ *
1538
+ * @overload@overload
1539
+ * @param {Error | VFileMessage} cause
1540
+ * @param {string | null | undefined} [origin]
1541
+ * @returns {VFileMessage}
1542
+ *
1543
+ * @param {Error | VFileMessage | string} causeOrReason
1544
+ * Reason for message, should use markdown.
1545
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1546
+ * Configuration (optional).
1547
+ * @param {string | null | undefined} [origin]
1548
+ * Place in code where the message originates (example:
1549
+ * `'my-package:my-rule'` or `'my-rule'`).
1550
+ * @returns {VFileMessage}
1551
+ * Message.
1552
+ */
1553
+ message(reason: string, parent: Node_3 | NodeLike | null | undefined, origin?: string | null | undefined): VFileMessage;
1554
+ /**
1555
+ * Create a message for `reason` associated with the file.
1556
+ *
1557
+ * The `fatal` field of the message is set to `false` (warning; change may be
1558
+ * needed) and the `file` field is set to the current file path.
1559
+ * The message is added to the `messages` field on `file`.
1560
+ *
1561
+ * > 🪦 **Note**: also has obsolete signatures.
1562
+ *
1563
+ * @overload@overload
1564
+ * @param {string} reason
1565
+ * @param {MessageOptions | null | undefined} [options]
1566
+ * @returns {VFileMessage}
1567
+ *
1568
+ * @overload@overload
1569
+ * @param {string} reason
1570
+ * @param {Node | NodeLike | null | undefined} parent
1571
+ * @param {string | null | undefined} [origin]
1572
+ * @returns {VFileMessage}
1573
+ *
1574
+ * @overload@overload
1575
+ * @param {string} reason
1576
+ * @param {Point | Position | null | undefined} place
1577
+ * @param {string | null | undefined} [origin]
1578
+ * @returns {VFileMessage}
1579
+ *
1580
+ * @overload@overload
1581
+ * @param {string} reason
1582
+ * @param {string | null | undefined} [origin]
1583
+ * @returns {VFileMessage}
1584
+ *
1585
+ * @overload@overload
1586
+ * @param {Error | VFileMessage} cause
1587
+ * @param {Node | NodeLike | null | undefined} parent
1588
+ * @param {string | null | undefined} [origin]
1589
+ * @returns {VFileMessage}
1590
+ *
1591
+ * @overload@overload
1592
+ * @param {Error | VFileMessage} cause
1593
+ * @param {Point | Position | null | undefined} place
1594
+ * @param {string | null | undefined} [origin]
1595
+ * @returns {VFileMessage}
1596
+ *
1597
+ * @overload@overload
1598
+ * @param {Error | VFileMessage} cause
1599
+ * @param {string | null | undefined} [origin]
1600
+ * @returns {VFileMessage}
1601
+ *
1602
+ * @param {Error | VFileMessage | string} causeOrReason
1603
+ * Reason for message, should use markdown.
1604
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1605
+ * Configuration (optional).
1606
+ * @param {string | null | undefined} [origin]
1607
+ * Place in code where the message originates (example:
1608
+ * `'my-package:my-rule'` or `'my-rule'`).
1609
+ * @returns {VFileMessage}
1610
+ * Message.
1611
+ */
1612
+ message(reason: string, place: Point | Position | null | undefined, origin?: string | null | undefined): VFileMessage;
1613
+ /**
1614
+ * Create a message for `reason` associated with the file.
1615
+ *
1616
+ * The `fatal` field of the message is set to `false` (warning; change may be
1617
+ * needed) and the `file` field is set to the current file path.
1618
+ * The message is added to the `messages` field on `file`.
1619
+ *
1620
+ * > 🪦 **Note**: also has obsolete signatures.
1621
+ *
1622
+ * @overload@overload
1623
+ * @param {string} reason
1624
+ * @param {MessageOptions | null | undefined} [options]
1625
+ * @returns {VFileMessage}
1626
+ *
1627
+ * @overload@overload
1628
+ * @param {string} reason
1629
+ * @param {Node | NodeLike | null | undefined} parent
1630
+ * @param {string | null | undefined} [origin]
1631
+ * @returns {VFileMessage}
1632
+ *
1633
+ * @overload@overload
1634
+ * @param {string} reason
1635
+ * @param {Point | Position | null | undefined} place
1636
+ * @param {string | null | undefined} [origin]
1637
+ * @returns {VFileMessage}
1638
+ *
1639
+ * @overload@overload
1640
+ * @param {string} reason
1641
+ * @param {string | null | undefined} [origin]
1642
+ * @returns {VFileMessage}
1643
+ *
1644
+ * @overload@overload
1645
+ * @param {Error | VFileMessage} cause
1646
+ * @param {Node | NodeLike | null | undefined} parent
1647
+ * @param {string | null | undefined} [origin]
1648
+ * @returns {VFileMessage}
1649
+ *
1650
+ * @overload@overload
1651
+ * @param {Error | VFileMessage} cause
1652
+ * @param {Point | Position | null | undefined} place
1653
+ * @param {string | null | undefined} [origin]
1654
+ * @returns {VFileMessage}
1655
+ *
1656
+ * @overload@overload
1657
+ * @param {Error | VFileMessage} cause
1658
+ * @param {string | null | undefined} [origin]
1659
+ * @returns {VFileMessage}
1660
+ *
1661
+ * @param {Error | VFileMessage | string} causeOrReason
1662
+ * Reason for message, should use markdown.
1663
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1664
+ * Configuration (optional).
1665
+ * @param {string | null | undefined} [origin]
1666
+ * Place in code where the message originates (example:
1667
+ * `'my-package:my-rule'` or `'my-rule'`).
1668
+ * @returns {VFileMessage}
1669
+ * Message.
1670
+ */
1671
+ message(reason: string, origin?: string | null | undefined): VFileMessage;
1672
+ /**
1673
+ * Create a message for `reason` associated with the file.
1674
+ *
1675
+ * The `fatal` field of the message is set to `false` (warning; change may be
1676
+ * needed) and the `file` field is set to the current file path.
1677
+ * The message is added to the `messages` field on `file`.
1678
+ *
1679
+ * > 🪦 **Note**: also has obsolete signatures.
1680
+ *
1681
+ * @overload@overload
1682
+ * @param {string} reason
1683
+ * @param {MessageOptions | null | undefined} [options]
1684
+ * @returns {VFileMessage}
1685
+ *
1686
+ * @overload@overload
1687
+ * @param {string} reason
1688
+ * @param {Node | NodeLike | null | undefined} parent
1689
+ * @param {string | null | undefined} [origin]
1690
+ * @returns {VFileMessage}
1691
+ *
1692
+ * @overload@overload
1693
+ * @param {string} reason
1694
+ * @param {Point | Position | null | undefined} place
1695
+ * @param {string | null | undefined} [origin]
1696
+ * @returns {VFileMessage}
1697
+ *
1698
+ * @overload@overload
1699
+ * @param {string} reason
1700
+ * @param {string | null | undefined} [origin]
1701
+ * @returns {VFileMessage}
1702
+ *
1703
+ * @overload@overload
1704
+ * @param {Error | VFileMessage} cause
1705
+ * @param {Node | NodeLike | null | undefined} parent
1706
+ * @param {string | null | undefined} [origin]
1707
+ * @returns {VFileMessage}
1708
+ *
1709
+ * @overload@overload
1710
+ * @param {Error | VFileMessage} cause
1711
+ * @param {Point | Position | null | undefined} place
1712
+ * @param {string | null | undefined} [origin]
1713
+ * @returns {VFileMessage}
1714
+ *
1715
+ * @overload@overload
1716
+ * @param {Error | VFileMessage} cause
1717
+ * @param {string | null | undefined} [origin]
1718
+ * @returns {VFileMessage}
1719
+ *
1720
+ * @param {Error | VFileMessage | string} causeOrReason
1721
+ * Reason for message, should use markdown.
1722
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1723
+ * Configuration (optional).
1724
+ * @param {string | null | undefined} [origin]
1725
+ * Place in code where the message originates (example:
1726
+ * `'my-package:my-rule'` or `'my-rule'`).
1727
+ * @returns {VFileMessage}
1728
+ * Message.
1729
+ */
1730
+ message(cause: Error | VFileMessage, parent: Node_3 | NodeLike | null | undefined, origin?: string | null | undefined): VFileMessage;
1731
+ /**
1732
+ * Create a message for `reason` associated with the file.
1733
+ *
1734
+ * The `fatal` field of the message is set to `false` (warning; change may be
1735
+ * needed) and the `file` field is set to the current file path.
1736
+ * The message is added to the `messages` field on `file`.
1737
+ *
1738
+ * > 🪦 **Note**: also has obsolete signatures.
1739
+ *
1740
+ * @overload@overload
1741
+ * @param {string} reason
1742
+ * @param {MessageOptions | null | undefined} [options]
1743
+ * @returns {VFileMessage}
1744
+ *
1745
+ * @overload@overload
1746
+ * @param {string} reason
1747
+ * @param {Node | NodeLike | null | undefined} parent
1748
+ * @param {string | null | undefined} [origin]
1749
+ * @returns {VFileMessage}
1750
+ *
1751
+ * @overload@overload
1752
+ * @param {string} reason
1753
+ * @param {Point | Position | null | undefined} place
1754
+ * @param {string | null | undefined} [origin]
1755
+ * @returns {VFileMessage}
1756
+ *
1757
+ * @overload@overload
1758
+ * @param {string} reason
1759
+ * @param {string | null | undefined} [origin]
1760
+ * @returns {VFileMessage}
1761
+ *
1762
+ * @overload@overload
1763
+ * @param {Error | VFileMessage} cause
1764
+ * @param {Node | NodeLike | null | undefined} parent
1765
+ * @param {string | null | undefined} [origin]
1766
+ * @returns {VFileMessage}
1767
+ *
1768
+ * @overload@overload
1769
+ * @param {Error | VFileMessage} cause
1770
+ * @param {Point | Position | null | undefined} place
1771
+ * @param {string | null | undefined} [origin]
1772
+ * @returns {VFileMessage}
1773
+ *
1774
+ * @overload@overload
1775
+ * @param {Error | VFileMessage} cause
1776
+ * @param {string | null | undefined} [origin]
1777
+ * @returns {VFileMessage}
1778
+ *
1779
+ * @param {Error | VFileMessage | string} causeOrReason
1780
+ * Reason for message, should use markdown.
1781
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1782
+ * Configuration (optional).
1783
+ * @param {string | null | undefined} [origin]
1784
+ * Place in code where the message originates (example:
1785
+ * `'my-package:my-rule'` or `'my-rule'`).
1786
+ * @returns {VFileMessage}
1787
+ * Message.
1788
+ */
1789
+ message(cause: Error | VFileMessage, place: Point | Position | null | undefined, origin?: string | null | undefined): VFileMessage;
1790
+ /**
1791
+ * Create a message for `reason` associated with the file.
1792
+ *
1793
+ * The `fatal` field of the message is set to `false` (warning; change may be
1794
+ * needed) and the `file` field is set to the current file path.
1795
+ * The message is added to the `messages` field on `file`.
1796
+ *
1797
+ * > 🪦 **Note**: also has obsolete signatures.
1798
+ *
1799
+ * @overload@overload
1800
+ * @param {string} reason
1801
+ * @param {MessageOptions | null | undefined} [options]
1802
+ * @returns {VFileMessage}
1803
+ *
1804
+ * @overload@overload
1805
+ * @param {string} reason
1806
+ * @param {Node | NodeLike | null | undefined} parent
1807
+ * @param {string | null | undefined} [origin]
1808
+ * @returns {VFileMessage}
1809
+ *
1810
+ * @overload@overload
1811
+ * @param {string} reason
1812
+ * @param {Point | Position | null | undefined} place
1813
+ * @param {string | null | undefined} [origin]
1814
+ * @returns {VFileMessage}
1815
+ *
1816
+ * @overload@overload
1817
+ * @param {string} reason
1818
+ * @param {string | null | undefined} [origin]
1819
+ * @returns {VFileMessage}
1820
+ *
1821
+ * @overload@overload
1822
+ * @param {Error | VFileMessage} cause
1823
+ * @param {Node | NodeLike | null | undefined} parent
1824
+ * @param {string | null | undefined} [origin]
1825
+ * @returns {VFileMessage}
1826
+ *
1827
+ * @overload@overload
1828
+ * @param {Error | VFileMessage} cause
1829
+ * @param {Point | Position | null | undefined} place
1830
+ * @param {string | null | undefined} [origin]
1831
+ * @returns {VFileMessage}
1832
+ *
1833
+ * @overload@overload
1834
+ * @param {Error | VFileMessage} cause
1835
+ * @param {string | null | undefined} [origin]
1836
+ * @returns {VFileMessage}
1837
+ *
1838
+ * @param {Error | VFileMessage | string} causeOrReason
1839
+ * Reason for message, should use markdown.
1840
+ * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1841
+ * Configuration (optional).
1842
+ * @param {string | null | undefined} [origin]
1843
+ * Place in code where the message originates (example:
1844
+ * `'my-package:my-rule'` or `'my-rule'`).
1845
+ * @returns {VFileMessage}
1846
+ * Message.
1847
+ */
1848
+ message(cause: Error | VFileMessage, origin?: string | null | undefined): VFileMessage;
1849
+ /**
1850
+ * Serialize the file.
1851
+ *
1852
+ * > **Note**: which encodings are supported depends on the engine.
1853
+ * > For info on Node.js, see:
1854
+ * > <https://nodejs.org/api/util.html#whatwg-supported-encodings>.
1855
+ *
1856
+ * @param {string | null | undefined} [encoding='utf8']
1857
+ * Character encoding to understand `value` as when it’s a `Uint8Array`
1858
+ * (default: `'utf-8'`).
1859
+ * @returns {string}
1860
+ * Serialized file.
1861
+ */
1862
+ toString(encoding?: string | null | undefined): string;
1863
+ }
1864
+
255
1865
  export { withBase }
256
1866
 
257
1867
  export { }