@mirrordown/remd-tabs 0.0.0 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +144 -0
- package/dist/index.d.mts +2450 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +461 -0
- package/dist/index.mjs.map +1 -0
- package/dist/tabs.css +369 -0
- package/package.json +35 -1
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,2450 @@
|
|
|
1
|
+
import { Plugin } from "unified";
|
|
2
|
+
import { BlockContent, Definition, DefinitionContent, FootnoteDefinition, Nodes, Parents, PhrasingContent, Root } from "mdast";
|
|
3
|
+
import { Data, Element, ElementContent, Literal, Nodes as Nodes$1, Properties, RootContent, Text } from "hast";
|
|
4
|
+
import { Node, Point, Position } from "unist";
|
|
5
|
+
|
|
6
|
+
//#region ../../node_modules/vfile-message/lib/index.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* Message.
|
|
9
|
+
*/
|
|
10
|
+
declare class VFileMessage extends Error {
|
|
11
|
+
/**
|
|
12
|
+
* Create a message for `reason`.
|
|
13
|
+
*
|
|
14
|
+
* > 🪦 **Note**: also has obsolete signatures.
|
|
15
|
+
*
|
|
16
|
+
* @overload
|
|
17
|
+
* @param {string} reason
|
|
18
|
+
* @param {Options | null | undefined} [options]
|
|
19
|
+
* @returns
|
|
20
|
+
*
|
|
21
|
+
* @overload
|
|
22
|
+
* @param {string} reason
|
|
23
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
24
|
+
* @param {string | null | undefined} [origin]
|
|
25
|
+
* @returns
|
|
26
|
+
*
|
|
27
|
+
* @overload
|
|
28
|
+
* @param {string} reason
|
|
29
|
+
* @param {Point | Position | null | undefined} place
|
|
30
|
+
* @param {string | null | undefined} [origin]
|
|
31
|
+
* @returns
|
|
32
|
+
*
|
|
33
|
+
* @overload
|
|
34
|
+
* @param {string} reason
|
|
35
|
+
* @param {string | null | undefined} [origin]
|
|
36
|
+
* @returns
|
|
37
|
+
*
|
|
38
|
+
* @overload
|
|
39
|
+
* @param {Error | VFileMessage} cause
|
|
40
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
41
|
+
* @param {string | null | undefined} [origin]
|
|
42
|
+
* @returns
|
|
43
|
+
*
|
|
44
|
+
* @overload
|
|
45
|
+
* @param {Error | VFileMessage} cause
|
|
46
|
+
* @param {Point | Position | null | undefined} place
|
|
47
|
+
* @param {string | null | undefined} [origin]
|
|
48
|
+
* @returns
|
|
49
|
+
*
|
|
50
|
+
* @overload
|
|
51
|
+
* @param {Error | VFileMessage} cause
|
|
52
|
+
* @param {string | null | undefined} [origin]
|
|
53
|
+
* @returns
|
|
54
|
+
*
|
|
55
|
+
* @param {Error | VFileMessage | string} causeOrReason
|
|
56
|
+
* Reason for message, should use markdown.
|
|
57
|
+
* @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
|
58
|
+
* Configuration (optional).
|
|
59
|
+
* @param {string | null | undefined} [origin]
|
|
60
|
+
* Place in code where the message originates (example:
|
|
61
|
+
* `'my-package:my-rule'` or `'my-rule'`).
|
|
62
|
+
* @returns
|
|
63
|
+
* Instance of `VFileMessage`.
|
|
64
|
+
*/
|
|
65
|
+
constructor(reason: string, options?: Options$3 | null | undefined);
|
|
66
|
+
/**
|
|
67
|
+
* Create a message for `reason`.
|
|
68
|
+
*
|
|
69
|
+
* > 🪦 **Note**: also has obsolete signatures.
|
|
70
|
+
*
|
|
71
|
+
* @overload
|
|
72
|
+
* @param {string} reason
|
|
73
|
+
* @param {Options | null | undefined} [options]
|
|
74
|
+
* @returns
|
|
75
|
+
*
|
|
76
|
+
* @overload
|
|
77
|
+
* @param {string} reason
|
|
78
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
79
|
+
* @param {string | null | undefined} [origin]
|
|
80
|
+
* @returns
|
|
81
|
+
*
|
|
82
|
+
* @overload
|
|
83
|
+
* @param {string} reason
|
|
84
|
+
* @param {Point | Position | null | undefined} place
|
|
85
|
+
* @param {string | null | undefined} [origin]
|
|
86
|
+
* @returns
|
|
87
|
+
*
|
|
88
|
+
* @overload
|
|
89
|
+
* @param {string} reason
|
|
90
|
+
* @param {string | null | undefined} [origin]
|
|
91
|
+
* @returns
|
|
92
|
+
*
|
|
93
|
+
* @overload
|
|
94
|
+
* @param {Error | VFileMessage} cause
|
|
95
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
96
|
+
* @param {string | null | undefined} [origin]
|
|
97
|
+
* @returns
|
|
98
|
+
*
|
|
99
|
+
* @overload
|
|
100
|
+
* @param {Error | VFileMessage} cause
|
|
101
|
+
* @param {Point | Position | null | undefined} place
|
|
102
|
+
* @param {string | null | undefined} [origin]
|
|
103
|
+
* @returns
|
|
104
|
+
*
|
|
105
|
+
* @overload
|
|
106
|
+
* @param {Error | VFileMessage} cause
|
|
107
|
+
* @param {string | null | undefined} [origin]
|
|
108
|
+
* @returns
|
|
109
|
+
*
|
|
110
|
+
* @param {Error | VFileMessage | string} causeOrReason
|
|
111
|
+
* Reason for message, should use markdown.
|
|
112
|
+
* @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
|
113
|
+
* Configuration (optional).
|
|
114
|
+
* @param {string | null | undefined} [origin]
|
|
115
|
+
* Place in code where the message originates (example:
|
|
116
|
+
* `'my-package:my-rule'` or `'my-rule'`).
|
|
117
|
+
* @returns
|
|
118
|
+
* Instance of `VFileMessage`.
|
|
119
|
+
*/
|
|
120
|
+
constructor(reason: string, parent: Node | NodeLike$1 | null | undefined, origin?: string | null | undefined);
|
|
121
|
+
/**
|
|
122
|
+
* Create a message for `reason`.
|
|
123
|
+
*
|
|
124
|
+
* > 🪦 **Note**: also has obsolete signatures.
|
|
125
|
+
*
|
|
126
|
+
* @overload
|
|
127
|
+
* @param {string} reason
|
|
128
|
+
* @param {Options | null | undefined} [options]
|
|
129
|
+
* @returns
|
|
130
|
+
*
|
|
131
|
+
* @overload
|
|
132
|
+
* @param {string} reason
|
|
133
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
134
|
+
* @param {string | null | undefined} [origin]
|
|
135
|
+
* @returns
|
|
136
|
+
*
|
|
137
|
+
* @overload
|
|
138
|
+
* @param {string} reason
|
|
139
|
+
* @param {Point | Position | null | undefined} place
|
|
140
|
+
* @param {string | null | undefined} [origin]
|
|
141
|
+
* @returns
|
|
142
|
+
*
|
|
143
|
+
* @overload
|
|
144
|
+
* @param {string} reason
|
|
145
|
+
* @param {string | null | undefined} [origin]
|
|
146
|
+
* @returns
|
|
147
|
+
*
|
|
148
|
+
* @overload
|
|
149
|
+
* @param {Error | VFileMessage} cause
|
|
150
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
151
|
+
* @param {string | null | undefined} [origin]
|
|
152
|
+
* @returns
|
|
153
|
+
*
|
|
154
|
+
* @overload
|
|
155
|
+
* @param {Error | VFileMessage} cause
|
|
156
|
+
* @param {Point | Position | null | undefined} place
|
|
157
|
+
* @param {string | null | undefined} [origin]
|
|
158
|
+
* @returns
|
|
159
|
+
*
|
|
160
|
+
* @overload
|
|
161
|
+
* @param {Error | VFileMessage} cause
|
|
162
|
+
* @param {string | null | undefined} [origin]
|
|
163
|
+
* @returns
|
|
164
|
+
*
|
|
165
|
+
* @param {Error | VFileMessage | string} causeOrReason
|
|
166
|
+
* Reason for message, should use markdown.
|
|
167
|
+
* @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
|
168
|
+
* Configuration (optional).
|
|
169
|
+
* @param {string | null | undefined} [origin]
|
|
170
|
+
* Place in code where the message originates (example:
|
|
171
|
+
* `'my-package:my-rule'` or `'my-rule'`).
|
|
172
|
+
* @returns
|
|
173
|
+
* Instance of `VFileMessage`.
|
|
174
|
+
*/
|
|
175
|
+
constructor(reason: string, place: Point | Position | null | undefined, origin?: string | null | undefined);
|
|
176
|
+
/**
|
|
177
|
+
* Create a message for `reason`.
|
|
178
|
+
*
|
|
179
|
+
* > 🪦 **Note**: also has obsolete signatures.
|
|
180
|
+
*
|
|
181
|
+
* @overload
|
|
182
|
+
* @param {string} reason
|
|
183
|
+
* @param {Options | null | undefined} [options]
|
|
184
|
+
* @returns
|
|
185
|
+
*
|
|
186
|
+
* @overload
|
|
187
|
+
* @param {string} reason
|
|
188
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
189
|
+
* @param {string | null | undefined} [origin]
|
|
190
|
+
* @returns
|
|
191
|
+
*
|
|
192
|
+
* @overload
|
|
193
|
+
* @param {string} reason
|
|
194
|
+
* @param {Point | Position | null | undefined} place
|
|
195
|
+
* @param {string | null | undefined} [origin]
|
|
196
|
+
* @returns
|
|
197
|
+
*
|
|
198
|
+
* @overload
|
|
199
|
+
* @param {string} reason
|
|
200
|
+
* @param {string | null | undefined} [origin]
|
|
201
|
+
* @returns
|
|
202
|
+
*
|
|
203
|
+
* @overload
|
|
204
|
+
* @param {Error | VFileMessage} cause
|
|
205
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
206
|
+
* @param {string | null | undefined} [origin]
|
|
207
|
+
* @returns
|
|
208
|
+
*
|
|
209
|
+
* @overload
|
|
210
|
+
* @param {Error | VFileMessage} cause
|
|
211
|
+
* @param {Point | Position | null | undefined} place
|
|
212
|
+
* @param {string | null | undefined} [origin]
|
|
213
|
+
* @returns
|
|
214
|
+
*
|
|
215
|
+
* @overload
|
|
216
|
+
* @param {Error | VFileMessage} cause
|
|
217
|
+
* @param {string | null | undefined} [origin]
|
|
218
|
+
* @returns
|
|
219
|
+
*
|
|
220
|
+
* @param {Error | VFileMessage | string} causeOrReason
|
|
221
|
+
* Reason for message, should use markdown.
|
|
222
|
+
* @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
|
223
|
+
* Configuration (optional).
|
|
224
|
+
* @param {string | null | undefined} [origin]
|
|
225
|
+
* Place in code where the message originates (example:
|
|
226
|
+
* `'my-package:my-rule'` or `'my-rule'`).
|
|
227
|
+
* @returns
|
|
228
|
+
* Instance of `VFileMessage`.
|
|
229
|
+
*/
|
|
230
|
+
constructor(reason: string, origin?: string | null | undefined);
|
|
231
|
+
/**
|
|
232
|
+
* Create a message for `reason`.
|
|
233
|
+
*
|
|
234
|
+
* > 🪦 **Note**: also has obsolete signatures.
|
|
235
|
+
*
|
|
236
|
+
* @overload
|
|
237
|
+
* @param {string} reason
|
|
238
|
+
* @param {Options | null | undefined} [options]
|
|
239
|
+
* @returns
|
|
240
|
+
*
|
|
241
|
+
* @overload
|
|
242
|
+
* @param {string} reason
|
|
243
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
244
|
+
* @param {string | null | undefined} [origin]
|
|
245
|
+
* @returns
|
|
246
|
+
*
|
|
247
|
+
* @overload
|
|
248
|
+
* @param {string} reason
|
|
249
|
+
* @param {Point | Position | null | undefined} place
|
|
250
|
+
* @param {string | null | undefined} [origin]
|
|
251
|
+
* @returns
|
|
252
|
+
*
|
|
253
|
+
* @overload
|
|
254
|
+
* @param {string} reason
|
|
255
|
+
* @param {string | null | undefined} [origin]
|
|
256
|
+
* @returns
|
|
257
|
+
*
|
|
258
|
+
* @overload
|
|
259
|
+
* @param {Error | VFileMessage} cause
|
|
260
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
261
|
+
* @param {string | null | undefined} [origin]
|
|
262
|
+
* @returns
|
|
263
|
+
*
|
|
264
|
+
* @overload
|
|
265
|
+
* @param {Error | VFileMessage} cause
|
|
266
|
+
* @param {Point | Position | null | undefined} place
|
|
267
|
+
* @param {string | null | undefined} [origin]
|
|
268
|
+
* @returns
|
|
269
|
+
*
|
|
270
|
+
* @overload
|
|
271
|
+
* @param {Error | VFileMessage} cause
|
|
272
|
+
* @param {string | null | undefined} [origin]
|
|
273
|
+
* @returns
|
|
274
|
+
*
|
|
275
|
+
* @param {Error | VFileMessage | string} causeOrReason
|
|
276
|
+
* Reason for message, should use markdown.
|
|
277
|
+
* @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
|
278
|
+
* Configuration (optional).
|
|
279
|
+
* @param {string | null | undefined} [origin]
|
|
280
|
+
* Place in code where the message originates (example:
|
|
281
|
+
* `'my-package:my-rule'` or `'my-rule'`).
|
|
282
|
+
* @returns
|
|
283
|
+
* Instance of `VFileMessage`.
|
|
284
|
+
*/
|
|
285
|
+
constructor(cause: Error | VFileMessage, parent: Node | NodeLike$1 | null | undefined, origin?: string | null | undefined);
|
|
286
|
+
/**
|
|
287
|
+
* Create a message for `reason`.
|
|
288
|
+
*
|
|
289
|
+
* > 🪦 **Note**: also has obsolete signatures.
|
|
290
|
+
*
|
|
291
|
+
* @overload
|
|
292
|
+
* @param {string} reason
|
|
293
|
+
* @param {Options | null | undefined} [options]
|
|
294
|
+
* @returns
|
|
295
|
+
*
|
|
296
|
+
* @overload
|
|
297
|
+
* @param {string} reason
|
|
298
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
299
|
+
* @param {string | null | undefined} [origin]
|
|
300
|
+
* @returns
|
|
301
|
+
*
|
|
302
|
+
* @overload
|
|
303
|
+
* @param {string} reason
|
|
304
|
+
* @param {Point | Position | null | undefined} place
|
|
305
|
+
* @param {string | null | undefined} [origin]
|
|
306
|
+
* @returns
|
|
307
|
+
*
|
|
308
|
+
* @overload
|
|
309
|
+
* @param {string} reason
|
|
310
|
+
* @param {string | null | undefined} [origin]
|
|
311
|
+
* @returns
|
|
312
|
+
*
|
|
313
|
+
* @overload
|
|
314
|
+
* @param {Error | VFileMessage} cause
|
|
315
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
316
|
+
* @param {string | null | undefined} [origin]
|
|
317
|
+
* @returns
|
|
318
|
+
*
|
|
319
|
+
* @overload
|
|
320
|
+
* @param {Error | VFileMessage} cause
|
|
321
|
+
* @param {Point | Position | null | undefined} place
|
|
322
|
+
* @param {string | null | undefined} [origin]
|
|
323
|
+
* @returns
|
|
324
|
+
*
|
|
325
|
+
* @overload
|
|
326
|
+
* @param {Error | VFileMessage} cause
|
|
327
|
+
* @param {string | null | undefined} [origin]
|
|
328
|
+
* @returns
|
|
329
|
+
*
|
|
330
|
+
* @param {Error | VFileMessage | string} causeOrReason
|
|
331
|
+
* Reason for message, should use markdown.
|
|
332
|
+
* @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
|
333
|
+
* Configuration (optional).
|
|
334
|
+
* @param {string | null | undefined} [origin]
|
|
335
|
+
* Place in code where the message originates (example:
|
|
336
|
+
* `'my-package:my-rule'` or `'my-rule'`).
|
|
337
|
+
* @returns
|
|
338
|
+
* Instance of `VFileMessage`.
|
|
339
|
+
*/
|
|
340
|
+
constructor(cause: Error | VFileMessage, place: Point | Position | null | undefined, origin?: string | null | undefined);
|
|
341
|
+
/**
|
|
342
|
+
* Create a message for `reason`.
|
|
343
|
+
*
|
|
344
|
+
* > 🪦 **Note**: also has obsolete signatures.
|
|
345
|
+
*
|
|
346
|
+
* @overload
|
|
347
|
+
* @param {string} reason
|
|
348
|
+
* @param {Options | null | undefined} [options]
|
|
349
|
+
* @returns
|
|
350
|
+
*
|
|
351
|
+
* @overload
|
|
352
|
+
* @param {string} reason
|
|
353
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
354
|
+
* @param {string | null | undefined} [origin]
|
|
355
|
+
* @returns
|
|
356
|
+
*
|
|
357
|
+
* @overload
|
|
358
|
+
* @param {string} reason
|
|
359
|
+
* @param {Point | Position | null | undefined} place
|
|
360
|
+
* @param {string | null | undefined} [origin]
|
|
361
|
+
* @returns
|
|
362
|
+
*
|
|
363
|
+
* @overload
|
|
364
|
+
* @param {string} reason
|
|
365
|
+
* @param {string | null | undefined} [origin]
|
|
366
|
+
* @returns
|
|
367
|
+
*
|
|
368
|
+
* @overload
|
|
369
|
+
* @param {Error | VFileMessage} cause
|
|
370
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
371
|
+
* @param {string | null | undefined} [origin]
|
|
372
|
+
* @returns
|
|
373
|
+
*
|
|
374
|
+
* @overload
|
|
375
|
+
* @param {Error | VFileMessage} cause
|
|
376
|
+
* @param {Point | Position | null | undefined} place
|
|
377
|
+
* @param {string | null | undefined} [origin]
|
|
378
|
+
* @returns
|
|
379
|
+
*
|
|
380
|
+
* @overload
|
|
381
|
+
* @param {Error | VFileMessage} cause
|
|
382
|
+
* @param {string | null | undefined} [origin]
|
|
383
|
+
* @returns
|
|
384
|
+
*
|
|
385
|
+
* @param {Error | VFileMessage | string} causeOrReason
|
|
386
|
+
* Reason for message, should use markdown.
|
|
387
|
+
* @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
|
388
|
+
* Configuration (optional).
|
|
389
|
+
* @param {string | null | undefined} [origin]
|
|
390
|
+
* Place in code where the message originates (example:
|
|
391
|
+
* `'my-package:my-rule'` or `'my-rule'`).
|
|
392
|
+
* @returns
|
|
393
|
+
* Instance of `VFileMessage`.
|
|
394
|
+
*/
|
|
395
|
+
constructor(cause: Error | VFileMessage, origin?: string | null | undefined);
|
|
396
|
+
/**
|
|
397
|
+
* Stack of ancestor nodes surrounding the message.
|
|
398
|
+
*
|
|
399
|
+
* @type {Array<Node> | undefined}
|
|
400
|
+
*/
|
|
401
|
+
ancestors: Array<Node> | undefined;
|
|
402
|
+
/**
|
|
403
|
+
* Starting column of message.
|
|
404
|
+
*
|
|
405
|
+
* @type {number | undefined}
|
|
406
|
+
*/
|
|
407
|
+
column: number | undefined;
|
|
408
|
+
/**
|
|
409
|
+
* State of problem.
|
|
410
|
+
*
|
|
411
|
+
* * `true` — error, file not usable
|
|
412
|
+
* * `false` — warning, change may be needed
|
|
413
|
+
* * `undefined` — change likely not needed
|
|
414
|
+
*
|
|
415
|
+
* @type {boolean | null | undefined}
|
|
416
|
+
*/
|
|
417
|
+
fatal: boolean | null | undefined;
|
|
418
|
+
/**
|
|
419
|
+
* Path of a file (used throughout the `VFile` ecosystem).
|
|
420
|
+
*
|
|
421
|
+
* @type {string | undefined}
|
|
422
|
+
*/
|
|
423
|
+
file: string | undefined;
|
|
424
|
+
/**
|
|
425
|
+
* Starting line of error.
|
|
426
|
+
*
|
|
427
|
+
* @type {number | undefined}
|
|
428
|
+
*/
|
|
429
|
+
line: number | undefined;
|
|
430
|
+
/**
|
|
431
|
+
* Place of message.
|
|
432
|
+
*
|
|
433
|
+
* @type {Point | Position | undefined}
|
|
434
|
+
*/
|
|
435
|
+
place: Point | Position | undefined;
|
|
436
|
+
/**
|
|
437
|
+
* Reason for message, should use markdown.
|
|
438
|
+
*
|
|
439
|
+
* @type {string}
|
|
440
|
+
*/
|
|
441
|
+
reason: string;
|
|
442
|
+
/**
|
|
443
|
+
* Category of message (example: `'my-rule'`).
|
|
444
|
+
*
|
|
445
|
+
* @type {string | undefined}
|
|
446
|
+
*/
|
|
447
|
+
ruleId: string | undefined;
|
|
448
|
+
/**
|
|
449
|
+
* Namespace of message (example: `'my-package'`).
|
|
450
|
+
*
|
|
451
|
+
* @type {string | undefined}
|
|
452
|
+
*/
|
|
453
|
+
source: string | undefined;
|
|
454
|
+
/**
|
|
455
|
+
* Specify the source value that’s being reported, which is deemed
|
|
456
|
+
* incorrect.
|
|
457
|
+
*
|
|
458
|
+
* @type {string | undefined}
|
|
459
|
+
*/
|
|
460
|
+
actual: string | undefined;
|
|
461
|
+
/**
|
|
462
|
+
* Suggest acceptable values that can be used instead of `actual`.
|
|
463
|
+
*
|
|
464
|
+
* @type {Array<string> | undefined}
|
|
465
|
+
*/
|
|
466
|
+
expected: Array<string> | undefined;
|
|
467
|
+
/**
|
|
468
|
+
* Long form description of the message (you should use markdown).
|
|
469
|
+
*
|
|
470
|
+
* @type {string | undefined}
|
|
471
|
+
*/
|
|
472
|
+
note: string | undefined;
|
|
473
|
+
/**
|
|
474
|
+
* Link to docs for the message.
|
|
475
|
+
*
|
|
476
|
+
* > 👉 **Note**: this must be an absolute URL that can be passed as `x`
|
|
477
|
+
* > to `new URL(x)`.
|
|
478
|
+
*
|
|
479
|
+
* @type {string | undefined}
|
|
480
|
+
*/
|
|
481
|
+
url: string | undefined;
|
|
482
|
+
}
|
|
483
|
+
type NodeLike$1 = object & {
|
|
484
|
+
type: string;
|
|
485
|
+
position?: Position | undefined;
|
|
486
|
+
};
|
|
487
|
+
/**
|
|
488
|
+
* Configuration.
|
|
489
|
+
*/
|
|
490
|
+
type Options$3 = {
|
|
491
|
+
/**
|
|
492
|
+
* Stack of (inclusive) ancestor nodes surrounding the message (optional).
|
|
493
|
+
*/
|
|
494
|
+
ancestors?: Array<Node> | null | undefined;
|
|
495
|
+
/**
|
|
496
|
+
* Original error cause of the message (optional).
|
|
497
|
+
*/
|
|
498
|
+
cause?: Error | null | undefined;
|
|
499
|
+
/**
|
|
500
|
+
* Place of message (optional).
|
|
501
|
+
*/
|
|
502
|
+
place?: Point | Position | null | undefined;
|
|
503
|
+
/**
|
|
504
|
+
* Category of message (optional, example: `'my-rule'`).
|
|
505
|
+
*/
|
|
506
|
+
ruleId?: string | null | undefined;
|
|
507
|
+
/**
|
|
508
|
+
* Namespace of who sent the message (optional, example: `'my-package'`).
|
|
509
|
+
*/
|
|
510
|
+
source?: string | null | undefined;
|
|
511
|
+
};
|
|
512
|
+
//#endregion
|
|
513
|
+
//#region ../../node_modules/vfile-message/index.d.ts
|
|
514
|
+
type Options$2 = Options$3;
|
|
515
|
+
//#endregion
|
|
516
|
+
//#region ../../node_modules/vfile/lib/index.d.ts
|
|
517
|
+
declare class VFile {
|
|
518
|
+
/**
|
|
519
|
+
* Create a new virtual file.
|
|
520
|
+
*
|
|
521
|
+
* `options` is treated as:
|
|
522
|
+
*
|
|
523
|
+
* * `string` or `Uint8Array` — `{value: options}`
|
|
524
|
+
* * `URL` — `{path: options}`
|
|
525
|
+
* * `VFile` — shallow copies its data over to the new file
|
|
526
|
+
* * `object` — all fields are shallow copied over to the new file
|
|
527
|
+
*
|
|
528
|
+
* Path related fields are set in the following order (least specific to
|
|
529
|
+
* most specific): `history`, `path`, `basename`, `stem`, `extname`,
|
|
530
|
+
* `dirname`.
|
|
531
|
+
*
|
|
532
|
+
* You cannot set `dirname` or `extname` without setting either `history`,
|
|
533
|
+
* `path`, `basename`, or `stem` too.
|
|
534
|
+
*
|
|
535
|
+
* @param {Compatible | null | undefined} [value]
|
|
536
|
+
* File value.
|
|
537
|
+
* @returns
|
|
538
|
+
* New instance.
|
|
539
|
+
*/
|
|
540
|
+
constructor(value?: Compatible | null | undefined);
|
|
541
|
+
/**
|
|
542
|
+
* Base of `path` (default: `process.cwd()` or `'/'` in browsers).
|
|
543
|
+
*
|
|
544
|
+
* @type {string}
|
|
545
|
+
*/
|
|
546
|
+
cwd: string;
|
|
547
|
+
/**
|
|
548
|
+
* Place to store custom info (default: `{}`).
|
|
549
|
+
*
|
|
550
|
+
* It’s OK to store custom data directly on the file but moving it to
|
|
551
|
+
* `data` is recommended.
|
|
552
|
+
*
|
|
553
|
+
* @type {Data}
|
|
554
|
+
*/
|
|
555
|
+
data: Data$1;
|
|
556
|
+
/**
|
|
557
|
+
* List of file paths the file moved between.
|
|
558
|
+
*
|
|
559
|
+
* The first is the original path and the last is the current path.
|
|
560
|
+
*
|
|
561
|
+
* @type {Array<string>}
|
|
562
|
+
*/
|
|
563
|
+
history: Array<string>;
|
|
564
|
+
/**
|
|
565
|
+
* List of messages associated with the file.
|
|
566
|
+
*
|
|
567
|
+
* @type {Array<VFileMessage>}
|
|
568
|
+
*/
|
|
569
|
+
messages: Array<VFileMessage>;
|
|
570
|
+
/**
|
|
571
|
+
* Raw value.
|
|
572
|
+
*
|
|
573
|
+
* @type {Value}
|
|
574
|
+
*/
|
|
575
|
+
value: Value;
|
|
576
|
+
/**
|
|
577
|
+
* Source map.
|
|
578
|
+
*
|
|
579
|
+
* This type is equivalent to the `RawSourceMap` type from the `source-map`
|
|
580
|
+
* module.
|
|
581
|
+
*
|
|
582
|
+
* @type {Map | null | undefined}
|
|
583
|
+
*/
|
|
584
|
+
map: Map$1 | null | undefined;
|
|
585
|
+
/**
|
|
586
|
+
* Custom, non-string, compiled, representation.
|
|
587
|
+
*
|
|
588
|
+
* This is used by unified to store non-string results.
|
|
589
|
+
* One example is when turning markdown into React nodes.
|
|
590
|
+
*
|
|
591
|
+
* @type {unknown}
|
|
592
|
+
*/
|
|
593
|
+
result: unknown;
|
|
594
|
+
/**
|
|
595
|
+
* Whether a file was saved to disk.
|
|
596
|
+
*
|
|
597
|
+
* This is used by vfile reporters.
|
|
598
|
+
*
|
|
599
|
+
* @type {boolean}
|
|
600
|
+
*/
|
|
601
|
+
stored: boolean;
|
|
602
|
+
/**
|
|
603
|
+
* Set basename (including extname) (`'index.min.js'`).
|
|
604
|
+
*
|
|
605
|
+
* Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
|
|
606
|
+
* on windows).
|
|
607
|
+
* Cannot be nullified (use `file.path = file.dirname` instead).
|
|
608
|
+
*
|
|
609
|
+
* @param {string} basename
|
|
610
|
+
* Basename.
|
|
611
|
+
* @returns {undefined}
|
|
612
|
+
* Nothing.
|
|
613
|
+
*/
|
|
614
|
+
set basename(basename: string);
|
|
615
|
+
/**
|
|
616
|
+
* Get the basename (including extname) (example: `'index.min.js'`).
|
|
617
|
+
*
|
|
618
|
+
* @returns {string | undefined}
|
|
619
|
+
* Basename.
|
|
620
|
+
*/
|
|
621
|
+
get basename(): string | undefined;
|
|
622
|
+
/**
|
|
623
|
+
* Set the full path (example: `'~/index.min.js'`).
|
|
624
|
+
*
|
|
625
|
+
* Cannot be nullified.
|
|
626
|
+
* You can set a file URL (a `URL` object with a `file:` protocol) which will
|
|
627
|
+
* be turned into a path with `url.fileURLToPath`.
|
|
628
|
+
*
|
|
629
|
+
* @param {URL | string} path
|
|
630
|
+
* Path.
|
|
631
|
+
* @returns {undefined}
|
|
632
|
+
* Nothing.
|
|
633
|
+
*/
|
|
634
|
+
set path(path: string | URL);
|
|
635
|
+
/**
|
|
636
|
+
* Get the full path (example: `'~/index.min.js'`).
|
|
637
|
+
*
|
|
638
|
+
* @returns {string}
|
|
639
|
+
* Path.
|
|
640
|
+
*/
|
|
641
|
+
get path(): string;
|
|
642
|
+
/**
|
|
643
|
+
* Set the parent path (example: `'~'`).
|
|
644
|
+
*
|
|
645
|
+
* Cannot be set if there’s no `path` yet.
|
|
646
|
+
*
|
|
647
|
+
* @param {string | undefined} dirname
|
|
648
|
+
* Dirname.
|
|
649
|
+
* @returns {undefined}
|
|
650
|
+
* Nothing.
|
|
651
|
+
*/
|
|
652
|
+
set dirname(dirname: string | undefined);
|
|
653
|
+
/**
|
|
654
|
+
* Get the parent path (example: `'~'`).
|
|
655
|
+
*
|
|
656
|
+
* @returns {string | undefined}
|
|
657
|
+
* Dirname.
|
|
658
|
+
*/
|
|
659
|
+
get dirname(): string | undefined;
|
|
660
|
+
/**
|
|
661
|
+
* Set the extname (including dot) (example: `'.js'`).
|
|
662
|
+
*
|
|
663
|
+
* Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
|
|
664
|
+
* on windows).
|
|
665
|
+
* Cannot be set if there’s no `path` yet.
|
|
666
|
+
*
|
|
667
|
+
* @param {string | undefined} extname
|
|
668
|
+
* Extname.
|
|
669
|
+
* @returns {undefined}
|
|
670
|
+
* Nothing.
|
|
671
|
+
*/
|
|
672
|
+
set extname(extname: string | undefined);
|
|
673
|
+
/**
|
|
674
|
+
* Get the extname (including dot) (example: `'.js'`).
|
|
675
|
+
*
|
|
676
|
+
* @returns {string | undefined}
|
|
677
|
+
* Extname.
|
|
678
|
+
*/
|
|
679
|
+
get extname(): string | undefined;
|
|
680
|
+
/**
|
|
681
|
+
* Set the stem (basename w/o extname) (example: `'index.min'`).
|
|
682
|
+
*
|
|
683
|
+
* Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
|
|
684
|
+
* on windows).
|
|
685
|
+
* Cannot be nullified (use `file.path = file.dirname` instead).
|
|
686
|
+
*
|
|
687
|
+
* @param {string} stem
|
|
688
|
+
* Stem.
|
|
689
|
+
* @returns {undefined}
|
|
690
|
+
* Nothing.
|
|
691
|
+
*/
|
|
692
|
+
set stem(stem: string);
|
|
693
|
+
/**
|
|
694
|
+
* Get the stem (basename w/o extname) (example: `'index.min'`).
|
|
695
|
+
*
|
|
696
|
+
* @returns {string | undefined}
|
|
697
|
+
* Stem.
|
|
698
|
+
*/
|
|
699
|
+
get stem(): string | undefined;
|
|
700
|
+
/**
|
|
701
|
+
* Create a fatal message for `reason` associated with the file.
|
|
702
|
+
*
|
|
703
|
+
* The `fatal` field of the message is set to `true` (error; file not usable)
|
|
704
|
+
* and the `file` field is set to the current file path.
|
|
705
|
+
* The message is added to the `messages` field on `file`.
|
|
706
|
+
*
|
|
707
|
+
* > 🪦 **Note**: also has obsolete signatures.
|
|
708
|
+
*
|
|
709
|
+
* @overload
|
|
710
|
+
* @param {string} reason
|
|
711
|
+
* @param {MessageOptions | null | undefined} [options]
|
|
712
|
+
* @returns {never}
|
|
713
|
+
*
|
|
714
|
+
* @overload
|
|
715
|
+
* @param {string} reason
|
|
716
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
717
|
+
* @param {string | null | undefined} [origin]
|
|
718
|
+
* @returns {never}
|
|
719
|
+
*
|
|
720
|
+
* @overload
|
|
721
|
+
* @param {string} reason
|
|
722
|
+
* @param {Point | Position | null | undefined} place
|
|
723
|
+
* @param {string | null | undefined} [origin]
|
|
724
|
+
* @returns {never}
|
|
725
|
+
*
|
|
726
|
+
* @overload
|
|
727
|
+
* @param {string} reason
|
|
728
|
+
* @param {string | null | undefined} [origin]
|
|
729
|
+
* @returns {never}
|
|
730
|
+
*
|
|
731
|
+
* @overload
|
|
732
|
+
* @param {Error | VFileMessage} cause
|
|
733
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
734
|
+
* @param {string | null | undefined} [origin]
|
|
735
|
+
* @returns {never}
|
|
736
|
+
*
|
|
737
|
+
* @overload
|
|
738
|
+
* @param {Error | VFileMessage} cause
|
|
739
|
+
* @param {Point | Position | null | undefined} place
|
|
740
|
+
* @param {string | null | undefined} [origin]
|
|
741
|
+
* @returns {never}
|
|
742
|
+
*
|
|
743
|
+
* @overload
|
|
744
|
+
* @param {Error | VFileMessage} cause
|
|
745
|
+
* @param {string | null | undefined} [origin]
|
|
746
|
+
* @returns {never}
|
|
747
|
+
*
|
|
748
|
+
* @param {Error | VFileMessage | string} causeOrReason
|
|
749
|
+
* Reason for message, should use markdown.
|
|
750
|
+
* @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
|
751
|
+
* Configuration (optional).
|
|
752
|
+
* @param {string | null | undefined} [origin]
|
|
753
|
+
* Place in code where the message originates (example:
|
|
754
|
+
* `'my-package:my-rule'` or `'my-rule'`).
|
|
755
|
+
* @returns {never}
|
|
756
|
+
* Never.
|
|
757
|
+
* @throws {VFileMessage}
|
|
758
|
+
* Message.
|
|
759
|
+
*/
|
|
760
|
+
fail(reason: string, options?: Options$2 | null | undefined): never;
|
|
761
|
+
/**
|
|
762
|
+
* Create a fatal message for `reason` associated with the file.
|
|
763
|
+
*
|
|
764
|
+
* The `fatal` field of the message is set to `true` (error; file not usable)
|
|
765
|
+
* and the `file` field is set to the current file path.
|
|
766
|
+
* The message is added to the `messages` field on `file`.
|
|
767
|
+
*
|
|
768
|
+
* > 🪦 **Note**: also has obsolete signatures.
|
|
769
|
+
*
|
|
770
|
+
* @overload
|
|
771
|
+
* @param {string} reason
|
|
772
|
+
* @param {MessageOptions | null | undefined} [options]
|
|
773
|
+
* @returns {never}
|
|
774
|
+
*
|
|
775
|
+
* @overload
|
|
776
|
+
* @param {string} reason
|
|
777
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
778
|
+
* @param {string | null | undefined} [origin]
|
|
779
|
+
* @returns {never}
|
|
780
|
+
*
|
|
781
|
+
* @overload
|
|
782
|
+
* @param {string} reason
|
|
783
|
+
* @param {Point | Position | null | undefined} place
|
|
784
|
+
* @param {string | null | undefined} [origin]
|
|
785
|
+
* @returns {never}
|
|
786
|
+
*
|
|
787
|
+
* @overload
|
|
788
|
+
* @param {string} reason
|
|
789
|
+
* @param {string | null | undefined} [origin]
|
|
790
|
+
* @returns {never}
|
|
791
|
+
*
|
|
792
|
+
* @overload
|
|
793
|
+
* @param {Error | VFileMessage} cause
|
|
794
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
795
|
+
* @param {string | null | undefined} [origin]
|
|
796
|
+
* @returns {never}
|
|
797
|
+
*
|
|
798
|
+
* @overload
|
|
799
|
+
* @param {Error | VFileMessage} cause
|
|
800
|
+
* @param {Point | Position | null | undefined} place
|
|
801
|
+
* @param {string | null | undefined} [origin]
|
|
802
|
+
* @returns {never}
|
|
803
|
+
*
|
|
804
|
+
* @overload
|
|
805
|
+
* @param {Error | VFileMessage} cause
|
|
806
|
+
* @param {string | null | undefined} [origin]
|
|
807
|
+
* @returns {never}
|
|
808
|
+
*
|
|
809
|
+
* @param {Error | VFileMessage | string} causeOrReason
|
|
810
|
+
* Reason for message, should use markdown.
|
|
811
|
+
* @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
|
812
|
+
* Configuration (optional).
|
|
813
|
+
* @param {string | null | undefined} [origin]
|
|
814
|
+
* Place in code where the message originates (example:
|
|
815
|
+
* `'my-package:my-rule'` or `'my-rule'`).
|
|
816
|
+
* @returns {never}
|
|
817
|
+
* Never.
|
|
818
|
+
* @throws {VFileMessage}
|
|
819
|
+
* Message.
|
|
820
|
+
*/
|
|
821
|
+
fail(reason: string, parent: Node | NodeLike | null | undefined, origin?: string | null | undefined): never;
|
|
822
|
+
/**
|
|
823
|
+
* Create a fatal message for `reason` associated with the file.
|
|
824
|
+
*
|
|
825
|
+
* The `fatal` field of the message is set to `true` (error; file not usable)
|
|
826
|
+
* and the `file` field is set to the current file path.
|
|
827
|
+
* The message is added to the `messages` field on `file`.
|
|
828
|
+
*
|
|
829
|
+
* > 🪦 **Note**: also has obsolete signatures.
|
|
830
|
+
*
|
|
831
|
+
* @overload
|
|
832
|
+
* @param {string} reason
|
|
833
|
+
* @param {MessageOptions | null | undefined} [options]
|
|
834
|
+
* @returns {never}
|
|
835
|
+
*
|
|
836
|
+
* @overload
|
|
837
|
+
* @param {string} reason
|
|
838
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
839
|
+
* @param {string | null | undefined} [origin]
|
|
840
|
+
* @returns {never}
|
|
841
|
+
*
|
|
842
|
+
* @overload
|
|
843
|
+
* @param {string} reason
|
|
844
|
+
* @param {Point | Position | null | undefined} place
|
|
845
|
+
* @param {string | null | undefined} [origin]
|
|
846
|
+
* @returns {never}
|
|
847
|
+
*
|
|
848
|
+
* @overload
|
|
849
|
+
* @param {string} reason
|
|
850
|
+
* @param {string | null | undefined} [origin]
|
|
851
|
+
* @returns {never}
|
|
852
|
+
*
|
|
853
|
+
* @overload
|
|
854
|
+
* @param {Error | VFileMessage} cause
|
|
855
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
856
|
+
* @param {string | null | undefined} [origin]
|
|
857
|
+
* @returns {never}
|
|
858
|
+
*
|
|
859
|
+
* @overload
|
|
860
|
+
* @param {Error | VFileMessage} cause
|
|
861
|
+
* @param {Point | Position | null | undefined} place
|
|
862
|
+
* @param {string | null | undefined} [origin]
|
|
863
|
+
* @returns {never}
|
|
864
|
+
*
|
|
865
|
+
* @overload
|
|
866
|
+
* @param {Error | VFileMessage} cause
|
|
867
|
+
* @param {string | null | undefined} [origin]
|
|
868
|
+
* @returns {never}
|
|
869
|
+
*
|
|
870
|
+
* @param {Error | VFileMessage | string} causeOrReason
|
|
871
|
+
* Reason for message, should use markdown.
|
|
872
|
+
* @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
|
873
|
+
* Configuration (optional).
|
|
874
|
+
* @param {string | null | undefined} [origin]
|
|
875
|
+
* Place in code where the message originates (example:
|
|
876
|
+
* `'my-package:my-rule'` or `'my-rule'`).
|
|
877
|
+
* @returns {never}
|
|
878
|
+
* Never.
|
|
879
|
+
* @throws {VFileMessage}
|
|
880
|
+
* Message.
|
|
881
|
+
*/
|
|
882
|
+
fail(reason: string, place: Point | Position | null | undefined, origin?: string | null | undefined): never;
|
|
883
|
+
/**
|
|
884
|
+
* Create a fatal message for `reason` associated with the file.
|
|
885
|
+
*
|
|
886
|
+
* The `fatal` field of the message is set to `true` (error; file not usable)
|
|
887
|
+
* and the `file` field is set to the current file path.
|
|
888
|
+
* The message is added to the `messages` field on `file`.
|
|
889
|
+
*
|
|
890
|
+
* > 🪦 **Note**: also has obsolete signatures.
|
|
891
|
+
*
|
|
892
|
+
* @overload
|
|
893
|
+
* @param {string} reason
|
|
894
|
+
* @param {MessageOptions | null | undefined} [options]
|
|
895
|
+
* @returns {never}
|
|
896
|
+
*
|
|
897
|
+
* @overload
|
|
898
|
+
* @param {string} reason
|
|
899
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
900
|
+
* @param {string | null | undefined} [origin]
|
|
901
|
+
* @returns {never}
|
|
902
|
+
*
|
|
903
|
+
* @overload
|
|
904
|
+
* @param {string} reason
|
|
905
|
+
* @param {Point | Position | null | undefined} place
|
|
906
|
+
* @param {string | null | undefined} [origin]
|
|
907
|
+
* @returns {never}
|
|
908
|
+
*
|
|
909
|
+
* @overload
|
|
910
|
+
* @param {string} reason
|
|
911
|
+
* @param {string | null | undefined} [origin]
|
|
912
|
+
* @returns {never}
|
|
913
|
+
*
|
|
914
|
+
* @overload
|
|
915
|
+
* @param {Error | VFileMessage} cause
|
|
916
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
917
|
+
* @param {string | null | undefined} [origin]
|
|
918
|
+
* @returns {never}
|
|
919
|
+
*
|
|
920
|
+
* @overload
|
|
921
|
+
* @param {Error | VFileMessage} cause
|
|
922
|
+
* @param {Point | Position | null | undefined} place
|
|
923
|
+
* @param {string | null | undefined} [origin]
|
|
924
|
+
* @returns {never}
|
|
925
|
+
*
|
|
926
|
+
* @overload
|
|
927
|
+
* @param {Error | VFileMessage} cause
|
|
928
|
+
* @param {string | null | undefined} [origin]
|
|
929
|
+
* @returns {never}
|
|
930
|
+
*
|
|
931
|
+
* @param {Error | VFileMessage | string} causeOrReason
|
|
932
|
+
* Reason for message, should use markdown.
|
|
933
|
+
* @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
|
934
|
+
* Configuration (optional).
|
|
935
|
+
* @param {string | null | undefined} [origin]
|
|
936
|
+
* Place in code where the message originates (example:
|
|
937
|
+
* `'my-package:my-rule'` or `'my-rule'`).
|
|
938
|
+
* @returns {never}
|
|
939
|
+
* Never.
|
|
940
|
+
* @throws {VFileMessage}
|
|
941
|
+
* Message.
|
|
942
|
+
*/
|
|
943
|
+
fail(reason: string, origin?: string | null | undefined): never;
|
|
944
|
+
/**
|
|
945
|
+
* Create a fatal message for `reason` associated with the file.
|
|
946
|
+
*
|
|
947
|
+
* The `fatal` field of the message is set to `true` (error; file not usable)
|
|
948
|
+
* and the `file` field is set to the current file path.
|
|
949
|
+
* The message is added to the `messages` field on `file`.
|
|
950
|
+
*
|
|
951
|
+
* > 🪦 **Note**: also has obsolete signatures.
|
|
952
|
+
*
|
|
953
|
+
* @overload
|
|
954
|
+
* @param {string} reason
|
|
955
|
+
* @param {MessageOptions | null | undefined} [options]
|
|
956
|
+
* @returns {never}
|
|
957
|
+
*
|
|
958
|
+
* @overload
|
|
959
|
+
* @param {string} reason
|
|
960
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
961
|
+
* @param {string | null | undefined} [origin]
|
|
962
|
+
* @returns {never}
|
|
963
|
+
*
|
|
964
|
+
* @overload
|
|
965
|
+
* @param {string} reason
|
|
966
|
+
* @param {Point | Position | null | undefined} place
|
|
967
|
+
* @param {string | null | undefined} [origin]
|
|
968
|
+
* @returns {never}
|
|
969
|
+
*
|
|
970
|
+
* @overload
|
|
971
|
+
* @param {string} reason
|
|
972
|
+
* @param {string | null | undefined} [origin]
|
|
973
|
+
* @returns {never}
|
|
974
|
+
*
|
|
975
|
+
* @overload
|
|
976
|
+
* @param {Error | VFileMessage} cause
|
|
977
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
978
|
+
* @param {string | null | undefined} [origin]
|
|
979
|
+
* @returns {never}
|
|
980
|
+
*
|
|
981
|
+
* @overload
|
|
982
|
+
* @param {Error | VFileMessage} cause
|
|
983
|
+
* @param {Point | Position | null | undefined} place
|
|
984
|
+
* @param {string | null | undefined} [origin]
|
|
985
|
+
* @returns {never}
|
|
986
|
+
*
|
|
987
|
+
* @overload
|
|
988
|
+
* @param {Error | VFileMessage} cause
|
|
989
|
+
* @param {string | null | undefined} [origin]
|
|
990
|
+
* @returns {never}
|
|
991
|
+
*
|
|
992
|
+
* @param {Error | VFileMessage | string} causeOrReason
|
|
993
|
+
* Reason for message, should use markdown.
|
|
994
|
+
* @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
|
995
|
+
* Configuration (optional).
|
|
996
|
+
* @param {string | null | undefined} [origin]
|
|
997
|
+
* Place in code where the message originates (example:
|
|
998
|
+
* `'my-package:my-rule'` or `'my-rule'`).
|
|
999
|
+
* @returns {never}
|
|
1000
|
+
* Never.
|
|
1001
|
+
* @throws {VFileMessage}
|
|
1002
|
+
* Message.
|
|
1003
|
+
*/
|
|
1004
|
+
fail(cause: Error | VFileMessage, parent: Node | NodeLike | null | undefined, origin?: string | null | undefined): never;
|
|
1005
|
+
/**
|
|
1006
|
+
* Create a fatal message for `reason` associated with the file.
|
|
1007
|
+
*
|
|
1008
|
+
* The `fatal` field of the message is set to `true` (error; file not usable)
|
|
1009
|
+
* and the `file` field is set to the current file path.
|
|
1010
|
+
* The message is added to the `messages` field on `file`.
|
|
1011
|
+
*
|
|
1012
|
+
* > 🪦 **Note**: also has obsolete signatures.
|
|
1013
|
+
*
|
|
1014
|
+
* @overload
|
|
1015
|
+
* @param {string} reason
|
|
1016
|
+
* @param {MessageOptions | null | undefined} [options]
|
|
1017
|
+
* @returns {never}
|
|
1018
|
+
*
|
|
1019
|
+
* @overload
|
|
1020
|
+
* @param {string} reason
|
|
1021
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
1022
|
+
* @param {string | null | undefined} [origin]
|
|
1023
|
+
* @returns {never}
|
|
1024
|
+
*
|
|
1025
|
+
* @overload
|
|
1026
|
+
* @param {string} reason
|
|
1027
|
+
* @param {Point | Position | null | undefined} place
|
|
1028
|
+
* @param {string | null | undefined} [origin]
|
|
1029
|
+
* @returns {never}
|
|
1030
|
+
*
|
|
1031
|
+
* @overload
|
|
1032
|
+
* @param {string} reason
|
|
1033
|
+
* @param {string | null | undefined} [origin]
|
|
1034
|
+
* @returns {never}
|
|
1035
|
+
*
|
|
1036
|
+
* @overload
|
|
1037
|
+
* @param {Error | VFileMessage} cause
|
|
1038
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
1039
|
+
* @param {string | null | undefined} [origin]
|
|
1040
|
+
* @returns {never}
|
|
1041
|
+
*
|
|
1042
|
+
* @overload
|
|
1043
|
+
* @param {Error | VFileMessage} cause
|
|
1044
|
+
* @param {Point | Position | null | undefined} place
|
|
1045
|
+
* @param {string | null | undefined} [origin]
|
|
1046
|
+
* @returns {never}
|
|
1047
|
+
*
|
|
1048
|
+
* @overload
|
|
1049
|
+
* @param {Error | VFileMessage} cause
|
|
1050
|
+
* @param {string | null | undefined} [origin]
|
|
1051
|
+
* @returns {never}
|
|
1052
|
+
*
|
|
1053
|
+
* @param {Error | VFileMessage | string} causeOrReason
|
|
1054
|
+
* Reason for message, should use markdown.
|
|
1055
|
+
* @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
|
1056
|
+
* Configuration (optional).
|
|
1057
|
+
* @param {string | null | undefined} [origin]
|
|
1058
|
+
* Place in code where the message originates (example:
|
|
1059
|
+
* `'my-package:my-rule'` or `'my-rule'`).
|
|
1060
|
+
* @returns {never}
|
|
1061
|
+
* Never.
|
|
1062
|
+
* @throws {VFileMessage}
|
|
1063
|
+
* Message.
|
|
1064
|
+
*/
|
|
1065
|
+
fail(cause: Error | VFileMessage, place: Point | Position | null | undefined, origin?: string | null | undefined): never;
|
|
1066
|
+
/**
|
|
1067
|
+
* Create a fatal message for `reason` associated with the file.
|
|
1068
|
+
*
|
|
1069
|
+
* The `fatal` field of the message is set to `true` (error; file not usable)
|
|
1070
|
+
* and the `file` field is set to the current file path.
|
|
1071
|
+
* The message is added to the `messages` field on `file`.
|
|
1072
|
+
*
|
|
1073
|
+
* > 🪦 **Note**: also has obsolete signatures.
|
|
1074
|
+
*
|
|
1075
|
+
* @overload
|
|
1076
|
+
* @param {string} reason
|
|
1077
|
+
* @param {MessageOptions | null | undefined} [options]
|
|
1078
|
+
* @returns {never}
|
|
1079
|
+
*
|
|
1080
|
+
* @overload
|
|
1081
|
+
* @param {string} reason
|
|
1082
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
1083
|
+
* @param {string | null | undefined} [origin]
|
|
1084
|
+
* @returns {never}
|
|
1085
|
+
*
|
|
1086
|
+
* @overload
|
|
1087
|
+
* @param {string} reason
|
|
1088
|
+
* @param {Point | Position | null | undefined} place
|
|
1089
|
+
* @param {string | null | undefined} [origin]
|
|
1090
|
+
* @returns {never}
|
|
1091
|
+
*
|
|
1092
|
+
* @overload
|
|
1093
|
+
* @param {string} reason
|
|
1094
|
+
* @param {string | null | undefined} [origin]
|
|
1095
|
+
* @returns {never}
|
|
1096
|
+
*
|
|
1097
|
+
* @overload
|
|
1098
|
+
* @param {Error | VFileMessage} cause
|
|
1099
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
1100
|
+
* @param {string | null | undefined} [origin]
|
|
1101
|
+
* @returns {never}
|
|
1102
|
+
*
|
|
1103
|
+
* @overload
|
|
1104
|
+
* @param {Error | VFileMessage} cause
|
|
1105
|
+
* @param {Point | Position | null | undefined} place
|
|
1106
|
+
* @param {string | null | undefined} [origin]
|
|
1107
|
+
* @returns {never}
|
|
1108
|
+
*
|
|
1109
|
+
* @overload
|
|
1110
|
+
* @param {Error | VFileMessage} cause
|
|
1111
|
+
* @param {string | null | undefined} [origin]
|
|
1112
|
+
* @returns {never}
|
|
1113
|
+
*
|
|
1114
|
+
* @param {Error | VFileMessage | string} causeOrReason
|
|
1115
|
+
* Reason for message, should use markdown.
|
|
1116
|
+
* @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
|
1117
|
+
* Configuration (optional).
|
|
1118
|
+
* @param {string | null | undefined} [origin]
|
|
1119
|
+
* Place in code where the message originates (example:
|
|
1120
|
+
* `'my-package:my-rule'` or `'my-rule'`).
|
|
1121
|
+
* @returns {never}
|
|
1122
|
+
* Never.
|
|
1123
|
+
* @throws {VFileMessage}
|
|
1124
|
+
* Message.
|
|
1125
|
+
*/
|
|
1126
|
+
fail(cause: Error | VFileMessage, origin?: string | null | undefined): never;
|
|
1127
|
+
/**
|
|
1128
|
+
* Create an info message for `reason` associated with the file.
|
|
1129
|
+
*
|
|
1130
|
+
* The `fatal` field of the message is set to `undefined` (info; change
|
|
1131
|
+
* likely not needed) and the `file` field is set to the current file path.
|
|
1132
|
+
* The message is added to the `messages` field on `file`.
|
|
1133
|
+
*
|
|
1134
|
+
* > 🪦 **Note**: also has obsolete signatures.
|
|
1135
|
+
*
|
|
1136
|
+
* @overload
|
|
1137
|
+
* @param {string} reason
|
|
1138
|
+
* @param {MessageOptions | null | undefined} [options]
|
|
1139
|
+
* @returns {VFileMessage}
|
|
1140
|
+
*
|
|
1141
|
+
* @overload
|
|
1142
|
+
* @param {string} reason
|
|
1143
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
1144
|
+
* @param {string | null | undefined} [origin]
|
|
1145
|
+
* @returns {VFileMessage}
|
|
1146
|
+
*
|
|
1147
|
+
* @overload
|
|
1148
|
+
* @param {string} reason
|
|
1149
|
+
* @param {Point | Position | null | undefined} place
|
|
1150
|
+
* @param {string | null | undefined} [origin]
|
|
1151
|
+
* @returns {VFileMessage}
|
|
1152
|
+
*
|
|
1153
|
+
* @overload
|
|
1154
|
+
* @param {string} reason
|
|
1155
|
+
* @param {string | null | undefined} [origin]
|
|
1156
|
+
* @returns {VFileMessage}
|
|
1157
|
+
*
|
|
1158
|
+
* @overload
|
|
1159
|
+
* @param {Error | VFileMessage} cause
|
|
1160
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
1161
|
+
* @param {string | null | undefined} [origin]
|
|
1162
|
+
* @returns {VFileMessage}
|
|
1163
|
+
*
|
|
1164
|
+
* @overload
|
|
1165
|
+
* @param {Error | VFileMessage} cause
|
|
1166
|
+
* @param {Point | Position | null | undefined} place
|
|
1167
|
+
* @param {string | null | undefined} [origin]
|
|
1168
|
+
* @returns {VFileMessage}
|
|
1169
|
+
*
|
|
1170
|
+
* @overload
|
|
1171
|
+
* @param {Error | VFileMessage} cause
|
|
1172
|
+
* @param {string | null | undefined} [origin]
|
|
1173
|
+
* @returns {VFileMessage}
|
|
1174
|
+
*
|
|
1175
|
+
* @param {Error | VFileMessage | string} causeOrReason
|
|
1176
|
+
* Reason for message, should use markdown.
|
|
1177
|
+
* @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
|
1178
|
+
* Configuration (optional).
|
|
1179
|
+
* @param {string | null | undefined} [origin]
|
|
1180
|
+
* Place in code where the message originates (example:
|
|
1181
|
+
* `'my-package:my-rule'` or `'my-rule'`).
|
|
1182
|
+
* @returns {VFileMessage}
|
|
1183
|
+
* Message.
|
|
1184
|
+
*/
|
|
1185
|
+
info(reason: string, options?: Options$2 | null | undefined): VFileMessage;
|
|
1186
|
+
/**
|
|
1187
|
+
* Create an info message for `reason` associated with the file.
|
|
1188
|
+
*
|
|
1189
|
+
* The `fatal` field of the message is set to `undefined` (info; change
|
|
1190
|
+
* likely not needed) and the `file` field is set to the current file path.
|
|
1191
|
+
* The message is added to the `messages` field on `file`.
|
|
1192
|
+
*
|
|
1193
|
+
* > 🪦 **Note**: also has obsolete signatures.
|
|
1194
|
+
*
|
|
1195
|
+
* @overload
|
|
1196
|
+
* @param {string} reason
|
|
1197
|
+
* @param {MessageOptions | null | undefined} [options]
|
|
1198
|
+
* @returns {VFileMessage}
|
|
1199
|
+
*
|
|
1200
|
+
* @overload
|
|
1201
|
+
* @param {string} reason
|
|
1202
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
1203
|
+
* @param {string | null | undefined} [origin]
|
|
1204
|
+
* @returns {VFileMessage}
|
|
1205
|
+
*
|
|
1206
|
+
* @overload
|
|
1207
|
+
* @param {string} reason
|
|
1208
|
+
* @param {Point | Position | null | undefined} place
|
|
1209
|
+
* @param {string | null | undefined} [origin]
|
|
1210
|
+
* @returns {VFileMessage}
|
|
1211
|
+
*
|
|
1212
|
+
* @overload
|
|
1213
|
+
* @param {string} reason
|
|
1214
|
+
* @param {string | null | undefined} [origin]
|
|
1215
|
+
* @returns {VFileMessage}
|
|
1216
|
+
*
|
|
1217
|
+
* @overload
|
|
1218
|
+
* @param {Error | VFileMessage} cause
|
|
1219
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
1220
|
+
* @param {string | null | undefined} [origin]
|
|
1221
|
+
* @returns {VFileMessage}
|
|
1222
|
+
*
|
|
1223
|
+
* @overload
|
|
1224
|
+
* @param {Error | VFileMessage} cause
|
|
1225
|
+
* @param {Point | Position | null | undefined} place
|
|
1226
|
+
* @param {string | null | undefined} [origin]
|
|
1227
|
+
* @returns {VFileMessage}
|
|
1228
|
+
*
|
|
1229
|
+
* @overload
|
|
1230
|
+
* @param {Error | VFileMessage} cause
|
|
1231
|
+
* @param {string | null | undefined} [origin]
|
|
1232
|
+
* @returns {VFileMessage}
|
|
1233
|
+
*
|
|
1234
|
+
* @param {Error | VFileMessage | string} causeOrReason
|
|
1235
|
+
* Reason for message, should use markdown.
|
|
1236
|
+
* @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
|
1237
|
+
* Configuration (optional).
|
|
1238
|
+
* @param {string | null | undefined} [origin]
|
|
1239
|
+
* Place in code where the message originates (example:
|
|
1240
|
+
* `'my-package:my-rule'` or `'my-rule'`).
|
|
1241
|
+
* @returns {VFileMessage}
|
|
1242
|
+
* Message.
|
|
1243
|
+
*/
|
|
1244
|
+
info(reason: string, parent: Node | NodeLike | null | undefined, origin?: string | null | undefined): VFileMessage;
|
|
1245
|
+
/**
|
|
1246
|
+
* Create an info message for `reason` associated with the file.
|
|
1247
|
+
*
|
|
1248
|
+
* The `fatal` field of the message is set to `undefined` (info; change
|
|
1249
|
+
* likely not needed) and the `file` field is set to the current file path.
|
|
1250
|
+
* The message is added to the `messages` field on `file`.
|
|
1251
|
+
*
|
|
1252
|
+
* > 🪦 **Note**: also has obsolete signatures.
|
|
1253
|
+
*
|
|
1254
|
+
* @overload
|
|
1255
|
+
* @param {string} reason
|
|
1256
|
+
* @param {MessageOptions | null | undefined} [options]
|
|
1257
|
+
* @returns {VFileMessage}
|
|
1258
|
+
*
|
|
1259
|
+
* @overload
|
|
1260
|
+
* @param {string} reason
|
|
1261
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
1262
|
+
* @param {string | null | undefined} [origin]
|
|
1263
|
+
* @returns {VFileMessage}
|
|
1264
|
+
*
|
|
1265
|
+
* @overload
|
|
1266
|
+
* @param {string} reason
|
|
1267
|
+
* @param {Point | Position | null | undefined} place
|
|
1268
|
+
* @param {string | null | undefined} [origin]
|
|
1269
|
+
* @returns {VFileMessage}
|
|
1270
|
+
*
|
|
1271
|
+
* @overload
|
|
1272
|
+
* @param {string} reason
|
|
1273
|
+
* @param {string | null | undefined} [origin]
|
|
1274
|
+
* @returns {VFileMessage}
|
|
1275
|
+
*
|
|
1276
|
+
* @overload
|
|
1277
|
+
* @param {Error | VFileMessage} cause
|
|
1278
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
1279
|
+
* @param {string | null | undefined} [origin]
|
|
1280
|
+
* @returns {VFileMessage}
|
|
1281
|
+
*
|
|
1282
|
+
* @overload
|
|
1283
|
+
* @param {Error | VFileMessage} cause
|
|
1284
|
+
* @param {Point | Position | null | undefined} place
|
|
1285
|
+
* @param {string | null | undefined} [origin]
|
|
1286
|
+
* @returns {VFileMessage}
|
|
1287
|
+
*
|
|
1288
|
+
* @overload
|
|
1289
|
+
* @param {Error | VFileMessage} cause
|
|
1290
|
+
* @param {string | null | undefined} [origin]
|
|
1291
|
+
* @returns {VFileMessage}
|
|
1292
|
+
*
|
|
1293
|
+
* @param {Error | VFileMessage | string} causeOrReason
|
|
1294
|
+
* Reason for message, should use markdown.
|
|
1295
|
+
* @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
|
1296
|
+
* Configuration (optional).
|
|
1297
|
+
* @param {string | null | undefined} [origin]
|
|
1298
|
+
* Place in code where the message originates (example:
|
|
1299
|
+
* `'my-package:my-rule'` or `'my-rule'`).
|
|
1300
|
+
* @returns {VFileMessage}
|
|
1301
|
+
* Message.
|
|
1302
|
+
*/
|
|
1303
|
+
info(reason: string, place: Point | Position | null | undefined, origin?: string | null | undefined): VFileMessage;
|
|
1304
|
+
/**
|
|
1305
|
+
* Create an info message for `reason` associated with the file.
|
|
1306
|
+
*
|
|
1307
|
+
* The `fatal` field of the message is set to `undefined` (info; change
|
|
1308
|
+
* likely not needed) and the `file` field is set to the current file path.
|
|
1309
|
+
* The message is added to the `messages` field on `file`.
|
|
1310
|
+
*
|
|
1311
|
+
* > 🪦 **Note**: also has obsolete signatures.
|
|
1312
|
+
*
|
|
1313
|
+
* @overload
|
|
1314
|
+
* @param {string} reason
|
|
1315
|
+
* @param {MessageOptions | null | undefined} [options]
|
|
1316
|
+
* @returns {VFileMessage}
|
|
1317
|
+
*
|
|
1318
|
+
* @overload
|
|
1319
|
+
* @param {string} reason
|
|
1320
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
1321
|
+
* @param {string | null | undefined} [origin]
|
|
1322
|
+
* @returns {VFileMessage}
|
|
1323
|
+
*
|
|
1324
|
+
* @overload
|
|
1325
|
+
* @param {string} reason
|
|
1326
|
+
* @param {Point | Position | null | undefined} place
|
|
1327
|
+
* @param {string | null | undefined} [origin]
|
|
1328
|
+
* @returns {VFileMessage}
|
|
1329
|
+
*
|
|
1330
|
+
* @overload
|
|
1331
|
+
* @param {string} reason
|
|
1332
|
+
* @param {string | null | undefined} [origin]
|
|
1333
|
+
* @returns {VFileMessage}
|
|
1334
|
+
*
|
|
1335
|
+
* @overload
|
|
1336
|
+
* @param {Error | VFileMessage} cause
|
|
1337
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
1338
|
+
* @param {string | null | undefined} [origin]
|
|
1339
|
+
* @returns {VFileMessage}
|
|
1340
|
+
*
|
|
1341
|
+
* @overload
|
|
1342
|
+
* @param {Error | VFileMessage} cause
|
|
1343
|
+
* @param {Point | Position | null | undefined} place
|
|
1344
|
+
* @param {string | null | undefined} [origin]
|
|
1345
|
+
* @returns {VFileMessage}
|
|
1346
|
+
*
|
|
1347
|
+
* @overload
|
|
1348
|
+
* @param {Error | VFileMessage} cause
|
|
1349
|
+
* @param {string | null | undefined} [origin]
|
|
1350
|
+
* @returns {VFileMessage}
|
|
1351
|
+
*
|
|
1352
|
+
* @param {Error | VFileMessage | string} causeOrReason
|
|
1353
|
+
* Reason for message, should use markdown.
|
|
1354
|
+
* @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
|
1355
|
+
* Configuration (optional).
|
|
1356
|
+
* @param {string | null | undefined} [origin]
|
|
1357
|
+
* Place in code where the message originates (example:
|
|
1358
|
+
* `'my-package:my-rule'` or `'my-rule'`).
|
|
1359
|
+
* @returns {VFileMessage}
|
|
1360
|
+
* Message.
|
|
1361
|
+
*/
|
|
1362
|
+
info(reason: string, origin?: string | null | undefined): VFileMessage;
|
|
1363
|
+
/**
|
|
1364
|
+
* Create an info message for `reason` associated with the file.
|
|
1365
|
+
*
|
|
1366
|
+
* The `fatal` field of the message is set to `undefined` (info; change
|
|
1367
|
+
* likely not needed) and the `file` field is set to the current file path.
|
|
1368
|
+
* The message is added to the `messages` field on `file`.
|
|
1369
|
+
*
|
|
1370
|
+
* > 🪦 **Note**: also has obsolete signatures.
|
|
1371
|
+
*
|
|
1372
|
+
* @overload
|
|
1373
|
+
* @param {string} reason
|
|
1374
|
+
* @param {MessageOptions | null | undefined} [options]
|
|
1375
|
+
* @returns {VFileMessage}
|
|
1376
|
+
*
|
|
1377
|
+
* @overload
|
|
1378
|
+
* @param {string} reason
|
|
1379
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
1380
|
+
* @param {string | null | undefined} [origin]
|
|
1381
|
+
* @returns {VFileMessage}
|
|
1382
|
+
*
|
|
1383
|
+
* @overload
|
|
1384
|
+
* @param {string} reason
|
|
1385
|
+
* @param {Point | Position | null | undefined} place
|
|
1386
|
+
* @param {string | null | undefined} [origin]
|
|
1387
|
+
* @returns {VFileMessage}
|
|
1388
|
+
*
|
|
1389
|
+
* @overload
|
|
1390
|
+
* @param {string} reason
|
|
1391
|
+
* @param {string | null | undefined} [origin]
|
|
1392
|
+
* @returns {VFileMessage}
|
|
1393
|
+
*
|
|
1394
|
+
* @overload
|
|
1395
|
+
* @param {Error | VFileMessage} cause
|
|
1396
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
1397
|
+
* @param {string | null | undefined} [origin]
|
|
1398
|
+
* @returns {VFileMessage}
|
|
1399
|
+
*
|
|
1400
|
+
* @overload
|
|
1401
|
+
* @param {Error | VFileMessage} cause
|
|
1402
|
+
* @param {Point | Position | null | undefined} place
|
|
1403
|
+
* @param {string | null | undefined} [origin]
|
|
1404
|
+
* @returns {VFileMessage}
|
|
1405
|
+
*
|
|
1406
|
+
* @overload
|
|
1407
|
+
* @param {Error | VFileMessage} cause
|
|
1408
|
+
* @param {string | null | undefined} [origin]
|
|
1409
|
+
* @returns {VFileMessage}
|
|
1410
|
+
*
|
|
1411
|
+
* @param {Error | VFileMessage | string} causeOrReason
|
|
1412
|
+
* Reason for message, should use markdown.
|
|
1413
|
+
* @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
|
1414
|
+
* Configuration (optional).
|
|
1415
|
+
* @param {string | null | undefined} [origin]
|
|
1416
|
+
* Place in code where the message originates (example:
|
|
1417
|
+
* `'my-package:my-rule'` or `'my-rule'`).
|
|
1418
|
+
* @returns {VFileMessage}
|
|
1419
|
+
* Message.
|
|
1420
|
+
*/
|
|
1421
|
+
info(cause: Error | VFileMessage, parent: Node | NodeLike | null | undefined, origin?: string | null | undefined): VFileMessage;
|
|
1422
|
+
/**
|
|
1423
|
+
* Create an info message for `reason` associated with the file.
|
|
1424
|
+
*
|
|
1425
|
+
* The `fatal` field of the message is set to `undefined` (info; change
|
|
1426
|
+
* likely not needed) and the `file` field is set to the current file path.
|
|
1427
|
+
* The message is added to the `messages` field on `file`.
|
|
1428
|
+
*
|
|
1429
|
+
* > 🪦 **Note**: also has obsolete signatures.
|
|
1430
|
+
*
|
|
1431
|
+
* @overload
|
|
1432
|
+
* @param {string} reason
|
|
1433
|
+
* @param {MessageOptions | null | undefined} [options]
|
|
1434
|
+
* @returns {VFileMessage}
|
|
1435
|
+
*
|
|
1436
|
+
* @overload
|
|
1437
|
+
* @param {string} reason
|
|
1438
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
1439
|
+
* @param {string | null | undefined} [origin]
|
|
1440
|
+
* @returns {VFileMessage}
|
|
1441
|
+
*
|
|
1442
|
+
* @overload
|
|
1443
|
+
* @param {string} reason
|
|
1444
|
+
* @param {Point | Position | null | undefined} place
|
|
1445
|
+
* @param {string | null | undefined} [origin]
|
|
1446
|
+
* @returns {VFileMessage}
|
|
1447
|
+
*
|
|
1448
|
+
* @overload
|
|
1449
|
+
* @param {string} reason
|
|
1450
|
+
* @param {string | null | undefined} [origin]
|
|
1451
|
+
* @returns {VFileMessage}
|
|
1452
|
+
*
|
|
1453
|
+
* @overload
|
|
1454
|
+
* @param {Error | VFileMessage} cause
|
|
1455
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
1456
|
+
* @param {string | null | undefined} [origin]
|
|
1457
|
+
* @returns {VFileMessage}
|
|
1458
|
+
*
|
|
1459
|
+
* @overload
|
|
1460
|
+
* @param {Error | VFileMessage} cause
|
|
1461
|
+
* @param {Point | Position | null | undefined} place
|
|
1462
|
+
* @param {string | null | undefined} [origin]
|
|
1463
|
+
* @returns {VFileMessage}
|
|
1464
|
+
*
|
|
1465
|
+
* @overload
|
|
1466
|
+
* @param {Error | VFileMessage} cause
|
|
1467
|
+
* @param {string | null | undefined} [origin]
|
|
1468
|
+
* @returns {VFileMessage}
|
|
1469
|
+
*
|
|
1470
|
+
* @param {Error | VFileMessage | string} causeOrReason
|
|
1471
|
+
* Reason for message, should use markdown.
|
|
1472
|
+
* @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
|
1473
|
+
* Configuration (optional).
|
|
1474
|
+
* @param {string | null | undefined} [origin]
|
|
1475
|
+
* Place in code where the message originates (example:
|
|
1476
|
+
* `'my-package:my-rule'` or `'my-rule'`).
|
|
1477
|
+
* @returns {VFileMessage}
|
|
1478
|
+
* Message.
|
|
1479
|
+
*/
|
|
1480
|
+
info(cause: Error | VFileMessage, place: Point | Position | null | undefined, origin?: string | null | undefined): VFileMessage;
|
|
1481
|
+
/**
|
|
1482
|
+
* Create an info message for `reason` associated with the file.
|
|
1483
|
+
*
|
|
1484
|
+
* The `fatal` field of the message is set to `undefined` (info; change
|
|
1485
|
+
* likely not needed) and the `file` field is set to the current file path.
|
|
1486
|
+
* The message is added to the `messages` field on `file`.
|
|
1487
|
+
*
|
|
1488
|
+
* > 🪦 **Note**: also has obsolete signatures.
|
|
1489
|
+
*
|
|
1490
|
+
* @overload
|
|
1491
|
+
* @param {string} reason
|
|
1492
|
+
* @param {MessageOptions | null | undefined} [options]
|
|
1493
|
+
* @returns {VFileMessage}
|
|
1494
|
+
*
|
|
1495
|
+
* @overload
|
|
1496
|
+
* @param {string} reason
|
|
1497
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
1498
|
+
* @param {string | null | undefined} [origin]
|
|
1499
|
+
* @returns {VFileMessage}
|
|
1500
|
+
*
|
|
1501
|
+
* @overload
|
|
1502
|
+
* @param {string} reason
|
|
1503
|
+
* @param {Point | Position | null | undefined} place
|
|
1504
|
+
* @param {string | null | undefined} [origin]
|
|
1505
|
+
* @returns {VFileMessage}
|
|
1506
|
+
*
|
|
1507
|
+
* @overload
|
|
1508
|
+
* @param {string} reason
|
|
1509
|
+
* @param {string | null | undefined} [origin]
|
|
1510
|
+
* @returns {VFileMessage}
|
|
1511
|
+
*
|
|
1512
|
+
* @overload
|
|
1513
|
+
* @param {Error | VFileMessage} cause
|
|
1514
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
1515
|
+
* @param {string | null | undefined} [origin]
|
|
1516
|
+
* @returns {VFileMessage}
|
|
1517
|
+
*
|
|
1518
|
+
* @overload
|
|
1519
|
+
* @param {Error | VFileMessage} cause
|
|
1520
|
+
* @param {Point | Position | null | undefined} place
|
|
1521
|
+
* @param {string | null | undefined} [origin]
|
|
1522
|
+
* @returns {VFileMessage}
|
|
1523
|
+
*
|
|
1524
|
+
* @overload
|
|
1525
|
+
* @param {Error | VFileMessage} cause
|
|
1526
|
+
* @param {string | null | undefined} [origin]
|
|
1527
|
+
* @returns {VFileMessage}
|
|
1528
|
+
*
|
|
1529
|
+
* @param {Error | VFileMessage | string} causeOrReason
|
|
1530
|
+
* Reason for message, should use markdown.
|
|
1531
|
+
* @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
|
1532
|
+
* Configuration (optional).
|
|
1533
|
+
* @param {string | null | undefined} [origin]
|
|
1534
|
+
* Place in code where the message originates (example:
|
|
1535
|
+
* `'my-package:my-rule'` or `'my-rule'`).
|
|
1536
|
+
* @returns {VFileMessage}
|
|
1537
|
+
* Message.
|
|
1538
|
+
*/
|
|
1539
|
+
info(cause: Error | VFileMessage, origin?: string | null | undefined): VFileMessage;
|
|
1540
|
+
/**
|
|
1541
|
+
* Create a message for `reason` associated with the file.
|
|
1542
|
+
*
|
|
1543
|
+
* The `fatal` field of the message is set to `false` (warning; change may be
|
|
1544
|
+
* needed) and the `file` field is set to the current file path.
|
|
1545
|
+
* The message is added to the `messages` field on `file`.
|
|
1546
|
+
*
|
|
1547
|
+
* > 🪦 **Note**: also has obsolete signatures.
|
|
1548
|
+
*
|
|
1549
|
+
* @overload
|
|
1550
|
+
* @param {string} reason
|
|
1551
|
+
* @param {MessageOptions | null | undefined} [options]
|
|
1552
|
+
* @returns {VFileMessage}
|
|
1553
|
+
*
|
|
1554
|
+
* @overload
|
|
1555
|
+
* @param {string} reason
|
|
1556
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
1557
|
+
* @param {string | null | undefined} [origin]
|
|
1558
|
+
* @returns {VFileMessage}
|
|
1559
|
+
*
|
|
1560
|
+
* @overload
|
|
1561
|
+
* @param {string} reason
|
|
1562
|
+
* @param {Point | Position | null | undefined} place
|
|
1563
|
+
* @param {string | null | undefined} [origin]
|
|
1564
|
+
* @returns {VFileMessage}
|
|
1565
|
+
*
|
|
1566
|
+
* @overload
|
|
1567
|
+
* @param {string} reason
|
|
1568
|
+
* @param {string | null | undefined} [origin]
|
|
1569
|
+
* @returns {VFileMessage}
|
|
1570
|
+
*
|
|
1571
|
+
* @overload
|
|
1572
|
+
* @param {Error | VFileMessage} cause
|
|
1573
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
1574
|
+
* @param {string | null | undefined} [origin]
|
|
1575
|
+
* @returns {VFileMessage}
|
|
1576
|
+
*
|
|
1577
|
+
* @overload
|
|
1578
|
+
* @param {Error | VFileMessage} cause
|
|
1579
|
+
* @param {Point | Position | null | undefined} place
|
|
1580
|
+
* @param {string | null | undefined} [origin]
|
|
1581
|
+
* @returns {VFileMessage}
|
|
1582
|
+
*
|
|
1583
|
+
* @overload
|
|
1584
|
+
* @param {Error | VFileMessage} cause
|
|
1585
|
+
* @param {string | null | undefined} [origin]
|
|
1586
|
+
* @returns {VFileMessage}
|
|
1587
|
+
*
|
|
1588
|
+
* @param {Error | VFileMessage | string} causeOrReason
|
|
1589
|
+
* Reason for message, should use markdown.
|
|
1590
|
+
* @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
|
1591
|
+
* Configuration (optional).
|
|
1592
|
+
* @param {string | null | undefined} [origin]
|
|
1593
|
+
* Place in code where the message originates (example:
|
|
1594
|
+
* `'my-package:my-rule'` or `'my-rule'`).
|
|
1595
|
+
* @returns {VFileMessage}
|
|
1596
|
+
* Message.
|
|
1597
|
+
*/
|
|
1598
|
+
message(reason: string, options?: Options$2 | null | undefined): VFileMessage;
|
|
1599
|
+
/**
|
|
1600
|
+
* Create a message for `reason` associated with the file.
|
|
1601
|
+
*
|
|
1602
|
+
* The `fatal` field of the message is set to `false` (warning; change may be
|
|
1603
|
+
* needed) and the `file` field is set to the current file path.
|
|
1604
|
+
* The message is added to the `messages` field on `file`.
|
|
1605
|
+
*
|
|
1606
|
+
* > 🪦 **Note**: also has obsolete signatures.
|
|
1607
|
+
*
|
|
1608
|
+
* @overload
|
|
1609
|
+
* @param {string} reason
|
|
1610
|
+
* @param {MessageOptions | null | undefined} [options]
|
|
1611
|
+
* @returns {VFileMessage}
|
|
1612
|
+
*
|
|
1613
|
+
* @overload
|
|
1614
|
+
* @param {string} reason
|
|
1615
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
1616
|
+
* @param {string | null | undefined} [origin]
|
|
1617
|
+
* @returns {VFileMessage}
|
|
1618
|
+
*
|
|
1619
|
+
* @overload
|
|
1620
|
+
* @param {string} reason
|
|
1621
|
+
* @param {Point | Position | null | undefined} place
|
|
1622
|
+
* @param {string | null | undefined} [origin]
|
|
1623
|
+
* @returns {VFileMessage}
|
|
1624
|
+
*
|
|
1625
|
+
* @overload
|
|
1626
|
+
* @param {string} reason
|
|
1627
|
+
* @param {string | null | undefined} [origin]
|
|
1628
|
+
* @returns {VFileMessage}
|
|
1629
|
+
*
|
|
1630
|
+
* @overload
|
|
1631
|
+
* @param {Error | VFileMessage} cause
|
|
1632
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
1633
|
+
* @param {string | null | undefined} [origin]
|
|
1634
|
+
* @returns {VFileMessage}
|
|
1635
|
+
*
|
|
1636
|
+
* @overload
|
|
1637
|
+
* @param {Error | VFileMessage} cause
|
|
1638
|
+
* @param {Point | Position | null | undefined} place
|
|
1639
|
+
* @param {string | null | undefined} [origin]
|
|
1640
|
+
* @returns {VFileMessage}
|
|
1641
|
+
*
|
|
1642
|
+
* @overload
|
|
1643
|
+
* @param {Error | VFileMessage} cause
|
|
1644
|
+
* @param {string | null | undefined} [origin]
|
|
1645
|
+
* @returns {VFileMessage}
|
|
1646
|
+
*
|
|
1647
|
+
* @param {Error | VFileMessage | string} causeOrReason
|
|
1648
|
+
* Reason for message, should use markdown.
|
|
1649
|
+
* @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
|
1650
|
+
* Configuration (optional).
|
|
1651
|
+
* @param {string | null | undefined} [origin]
|
|
1652
|
+
* Place in code where the message originates (example:
|
|
1653
|
+
* `'my-package:my-rule'` or `'my-rule'`).
|
|
1654
|
+
* @returns {VFileMessage}
|
|
1655
|
+
* Message.
|
|
1656
|
+
*/
|
|
1657
|
+
message(reason: string, parent: Node | NodeLike | null | undefined, origin?: string | null | undefined): VFileMessage;
|
|
1658
|
+
/**
|
|
1659
|
+
* Create a message for `reason` associated with the file.
|
|
1660
|
+
*
|
|
1661
|
+
* The `fatal` field of the message is set to `false` (warning; change may be
|
|
1662
|
+
* needed) and the `file` field is set to the current file path.
|
|
1663
|
+
* The message is added to the `messages` field on `file`.
|
|
1664
|
+
*
|
|
1665
|
+
* > 🪦 **Note**: also has obsolete signatures.
|
|
1666
|
+
*
|
|
1667
|
+
* @overload
|
|
1668
|
+
* @param {string} reason
|
|
1669
|
+
* @param {MessageOptions | null | undefined} [options]
|
|
1670
|
+
* @returns {VFileMessage}
|
|
1671
|
+
*
|
|
1672
|
+
* @overload
|
|
1673
|
+
* @param {string} reason
|
|
1674
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
1675
|
+
* @param {string | null | undefined} [origin]
|
|
1676
|
+
* @returns {VFileMessage}
|
|
1677
|
+
*
|
|
1678
|
+
* @overload
|
|
1679
|
+
* @param {string} reason
|
|
1680
|
+
* @param {Point | Position | null | undefined} place
|
|
1681
|
+
* @param {string | null | undefined} [origin]
|
|
1682
|
+
* @returns {VFileMessage}
|
|
1683
|
+
*
|
|
1684
|
+
* @overload
|
|
1685
|
+
* @param {string} reason
|
|
1686
|
+
* @param {string | null | undefined} [origin]
|
|
1687
|
+
* @returns {VFileMessage}
|
|
1688
|
+
*
|
|
1689
|
+
* @overload
|
|
1690
|
+
* @param {Error | VFileMessage} cause
|
|
1691
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
1692
|
+
* @param {string | null | undefined} [origin]
|
|
1693
|
+
* @returns {VFileMessage}
|
|
1694
|
+
*
|
|
1695
|
+
* @overload
|
|
1696
|
+
* @param {Error | VFileMessage} cause
|
|
1697
|
+
* @param {Point | Position | null | undefined} place
|
|
1698
|
+
* @param {string | null | undefined} [origin]
|
|
1699
|
+
* @returns {VFileMessage}
|
|
1700
|
+
*
|
|
1701
|
+
* @overload
|
|
1702
|
+
* @param {Error | VFileMessage} cause
|
|
1703
|
+
* @param {string | null | undefined} [origin]
|
|
1704
|
+
* @returns {VFileMessage}
|
|
1705
|
+
*
|
|
1706
|
+
* @param {Error | VFileMessage | string} causeOrReason
|
|
1707
|
+
* Reason for message, should use markdown.
|
|
1708
|
+
* @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
|
1709
|
+
* Configuration (optional).
|
|
1710
|
+
* @param {string | null | undefined} [origin]
|
|
1711
|
+
* Place in code where the message originates (example:
|
|
1712
|
+
* `'my-package:my-rule'` or `'my-rule'`).
|
|
1713
|
+
* @returns {VFileMessage}
|
|
1714
|
+
* Message.
|
|
1715
|
+
*/
|
|
1716
|
+
message(reason: string, place: Point | Position | null | undefined, origin?: string | null | undefined): VFileMessage;
|
|
1717
|
+
/**
|
|
1718
|
+
* Create a message for `reason` associated with the file.
|
|
1719
|
+
*
|
|
1720
|
+
* The `fatal` field of the message is set to `false` (warning; change may be
|
|
1721
|
+
* needed) and the `file` field is set to the current file path.
|
|
1722
|
+
* The message is added to the `messages` field on `file`.
|
|
1723
|
+
*
|
|
1724
|
+
* > 🪦 **Note**: also has obsolete signatures.
|
|
1725
|
+
*
|
|
1726
|
+
* @overload
|
|
1727
|
+
* @param {string} reason
|
|
1728
|
+
* @param {MessageOptions | null | undefined} [options]
|
|
1729
|
+
* @returns {VFileMessage}
|
|
1730
|
+
*
|
|
1731
|
+
* @overload
|
|
1732
|
+
* @param {string} reason
|
|
1733
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
1734
|
+
* @param {string | null | undefined} [origin]
|
|
1735
|
+
* @returns {VFileMessage}
|
|
1736
|
+
*
|
|
1737
|
+
* @overload
|
|
1738
|
+
* @param {string} reason
|
|
1739
|
+
* @param {Point | Position | null | undefined} place
|
|
1740
|
+
* @param {string | null | undefined} [origin]
|
|
1741
|
+
* @returns {VFileMessage}
|
|
1742
|
+
*
|
|
1743
|
+
* @overload
|
|
1744
|
+
* @param {string} reason
|
|
1745
|
+
* @param {string | null | undefined} [origin]
|
|
1746
|
+
* @returns {VFileMessage}
|
|
1747
|
+
*
|
|
1748
|
+
* @overload
|
|
1749
|
+
* @param {Error | VFileMessage} cause
|
|
1750
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
1751
|
+
* @param {string | null | undefined} [origin]
|
|
1752
|
+
* @returns {VFileMessage}
|
|
1753
|
+
*
|
|
1754
|
+
* @overload
|
|
1755
|
+
* @param {Error | VFileMessage} cause
|
|
1756
|
+
* @param {Point | Position | null | undefined} place
|
|
1757
|
+
* @param {string | null | undefined} [origin]
|
|
1758
|
+
* @returns {VFileMessage}
|
|
1759
|
+
*
|
|
1760
|
+
* @overload
|
|
1761
|
+
* @param {Error | VFileMessage} cause
|
|
1762
|
+
* @param {string | null | undefined} [origin]
|
|
1763
|
+
* @returns {VFileMessage}
|
|
1764
|
+
*
|
|
1765
|
+
* @param {Error | VFileMessage | string} causeOrReason
|
|
1766
|
+
* Reason for message, should use markdown.
|
|
1767
|
+
* @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
|
1768
|
+
* Configuration (optional).
|
|
1769
|
+
* @param {string | null | undefined} [origin]
|
|
1770
|
+
* Place in code where the message originates (example:
|
|
1771
|
+
* `'my-package:my-rule'` or `'my-rule'`).
|
|
1772
|
+
* @returns {VFileMessage}
|
|
1773
|
+
* Message.
|
|
1774
|
+
*/
|
|
1775
|
+
message(reason: string, origin?: string | null | undefined): VFileMessage;
|
|
1776
|
+
/**
|
|
1777
|
+
* Create a message for `reason` associated with the file.
|
|
1778
|
+
*
|
|
1779
|
+
* The `fatal` field of the message is set to `false` (warning; change may be
|
|
1780
|
+
* needed) and the `file` field is set to the current file path.
|
|
1781
|
+
* The message is added to the `messages` field on `file`.
|
|
1782
|
+
*
|
|
1783
|
+
* > 🪦 **Note**: also has obsolete signatures.
|
|
1784
|
+
*
|
|
1785
|
+
* @overload
|
|
1786
|
+
* @param {string} reason
|
|
1787
|
+
* @param {MessageOptions | null | undefined} [options]
|
|
1788
|
+
* @returns {VFileMessage}
|
|
1789
|
+
*
|
|
1790
|
+
* @overload
|
|
1791
|
+
* @param {string} reason
|
|
1792
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
1793
|
+
* @param {string | null | undefined} [origin]
|
|
1794
|
+
* @returns {VFileMessage}
|
|
1795
|
+
*
|
|
1796
|
+
* @overload
|
|
1797
|
+
* @param {string} reason
|
|
1798
|
+
* @param {Point | Position | null | undefined} place
|
|
1799
|
+
* @param {string | null | undefined} [origin]
|
|
1800
|
+
* @returns {VFileMessage}
|
|
1801
|
+
*
|
|
1802
|
+
* @overload
|
|
1803
|
+
* @param {string} reason
|
|
1804
|
+
* @param {string | null | undefined} [origin]
|
|
1805
|
+
* @returns {VFileMessage}
|
|
1806
|
+
*
|
|
1807
|
+
* @overload
|
|
1808
|
+
* @param {Error | VFileMessage} cause
|
|
1809
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
1810
|
+
* @param {string | null | undefined} [origin]
|
|
1811
|
+
* @returns {VFileMessage}
|
|
1812
|
+
*
|
|
1813
|
+
* @overload
|
|
1814
|
+
* @param {Error | VFileMessage} cause
|
|
1815
|
+
* @param {Point | Position | null | undefined} place
|
|
1816
|
+
* @param {string | null | undefined} [origin]
|
|
1817
|
+
* @returns {VFileMessage}
|
|
1818
|
+
*
|
|
1819
|
+
* @overload
|
|
1820
|
+
* @param {Error | VFileMessage} cause
|
|
1821
|
+
* @param {string | null | undefined} [origin]
|
|
1822
|
+
* @returns {VFileMessage}
|
|
1823
|
+
*
|
|
1824
|
+
* @param {Error | VFileMessage | string} causeOrReason
|
|
1825
|
+
* Reason for message, should use markdown.
|
|
1826
|
+
* @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
|
1827
|
+
* Configuration (optional).
|
|
1828
|
+
* @param {string | null | undefined} [origin]
|
|
1829
|
+
* Place in code where the message originates (example:
|
|
1830
|
+
* `'my-package:my-rule'` or `'my-rule'`).
|
|
1831
|
+
* @returns {VFileMessage}
|
|
1832
|
+
* Message.
|
|
1833
|
+
*/
|
|
1834
|
+
message(cause: Error | VFileMessage, parent: Node | NodeLike | null | undefined, origin?: string | null | undefined): VFileMessage;
|
|
1835
|
+
/**
|
|
1836
|
+
* Create a message for `reason` associated with the file.
|
|
1837
|
+
*
|
|
1838
|
+
* The `fatal` field of the message is set to `false` (warning; change may be
|
|
1839
|
+
* needed) and the `file` field is set to the current file path.
|
|
1840
|
+
* The message is added to the `messages` field on `file`.
|
|
1841
|
+
*
|
|
1842
|
+
* > 🪦 **Note**: also has obsolete signatures.
|
|
1843
|
+
*
|
|
1844
|
+
* @overload
|
|
1845
|
+
* @param {string} reason
|
|
1846
|
+
* @param {MessageOptions | null | undefined} [options]
|
|
1847
|
+
* @returns {VFileMessage}
|
|
1848
|
+
*
|
|
1849
|
+
* @overload
|
|
1850
|
+
* @param {string} reason
|
|
1851
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
1852
|
+
* @param {string | null | undefined} [origin]
|
|
1853
|
+
* @returns {VFileMessage}
|
|
1854
|
+
*
|
|
1855
|
+
* @overload
|
|
1856
|
+
* @param {string} reason
|
|
1857
|
+
* @param {Point | Position | null | undefined} place
|
|
1858
|
+
* @param {string | null | undefined} [origin]
|
|
1859
|
+
* @returns {VFileMessage}
|
|
1860
|
+
*
|
|
1861
|
+
* @overload
|
|
1862
|
+
* @param {string} reason
|
|
1863
|
+
* @param {string | null | undefined} [origin]
|
|
1864
|
+
* @returns {VFileMessage}
|
|
1865
|
+
*
|
|
1866
|
+
* @overload
|
|
1867
|
+
* @param {Error | VFileMessage} cause
|
|
1868
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
1869
|
+
* @param {string | null | undefined} [origin]
|
|
1870
|
+
* @returns {VFileMessage}
|
|
1871
|
+
*
|
|
1872
|
+
* @overload
|
|
1873
|
+
* @param {Error | VFileMessage} cause
|
|
1874
|
+
* @param {Point | Position | null | undefined} place
|
|
1875
|
+
* @param {string | null | undefined} [origin]
|
|
1876
|
+
* @returns {VFileMessage}
|
|
1877
|
+
*
|
|
1878
|
+
* @overload
|
|
1879
|
+
* @param {Error | VFileMessage} cause
|
|
1880
|
+
* @param {string | null | undefined} [origin]
|
|
1881
|
+
* @returns {VFileMessage}
|
|
1882
|
+
*
|
|
1883
|
+
* @param {Error | VFileMessage | string} causeOrReason
|
|
1884
|
+
* Reason for message, should use markdown.
|
|
1885
|
+
* @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
|
1886
|
+
* Configuration (optional).
|
|
1887
|
+
* @param {string | null | undefined} [origin]
|
|
1888
|
+
* Place in code where the message originates (example:
|
|
1889
|
+
* `'my-package:my-rule'` or `'my-rule'`).
|
|
1890
|
+
* @returns {VFileMessage}
|
|
1891
|
+
* Message.
|
|
1892
|
+
*/
|
|
1893
|
+
message(cause: Error | VFileMessage, place: Point | Position | null | undefined, origin?: string | null | undefined): VFileMessage;
|
|
1894
|
+
/**
|
|
1895
|
+
* Create a message for `reason` associated with the file.
|
|
1896
|
+
*
|
|
1897
|
+
* The `fatal` field of the message is set to `false` (warning; change may be
|
|
1898
|
+
* needed) and the `file` field is set to the current file path.
|
|
1899
|
+
* The message is added to the `messages` field on `file`.
|
|
1900
|
+
*
|
|
1901
|
+
* > 🪦 **Note**: also has obsolete signatures.
|
|
1902
|
+
*
|
|
1903
|
+
* @overload
|
|
1904
|
+
* @param {string} reason
|
|
1905
|
+
* @param {MessageOptions | null | undefined} [options]
|
|
1906
|
+
* @returns {VFileMessage}
|
|
1907
|
+
*
|
|
1908
|
+
* @overload
|
|
1909
|
+
* @param {string} reason
|
|
1910
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
1911
|
+
* @param {string | null | undefined} [origin]
|
|
1912
|
+
* @returns {VFileMessage}
|
|
1913
|
+
*
|
|
1914
|
+
* @overload
|
|
1915
|
+
* @param {string} reason
|
|
1916
|
+
* @param {Point | Position | null | undefined} place
|
|
1917
|
+
* @param {string | null | undefined} [origin]
|
|
1918
|
+
* @returns {VFileMessage}
|
|
1919
|
+
*
|
|
1920
|
+
* @overload
|
|
1921
|
+
* @param {string} reason
|
|
1922
|
+
* @param {string | null | undefined} [origin]
|
|
1923
|
+
* @returns {VFileMessage}
|
|
1924
|
+
*
|
|
1925
|
+
* @overload
|
|
1926
|
+
* @param {Error | VFileMessage} cause
|
|
1927
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
1928
|
+
* @param {string | null | undefined} [origin]
|
|
1929
|
+
* @returns {VFileMessage}
|
|
1930
|
+
*
|
|
1931
|
+
* @overload
|
|
1932
|
+
* @param {Error | VFileMessage} cause
|
|
1933
|
+
* @param {Point | Position | null | undefined} place
|
|
1934
|
+
* @param {string | null | undefined} [origin]
|
|
1935
|
+
* @returns {VFileMessage}
|
|
1936
|
+
*
|
|
1937
|
+
* @overload
|
|
1938
|
+
* @param {Error | VFileMessage} cause
|
|
1939
|
+
* @param {string | null | undefined} [origin]
|
|
1940
|
+
* @returns {VFileMessage}
|
|
1941
|
+
*
|
|
1942
|
+
* @param {Error | VFileMessage | string} causeOrReason
|
|
1943
|
+
* Reason for message, should use markdown.
|
|
1944
|
+
* @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
|
1945
|
+
* Configuration (optional).
|
|
1946
|
+
* @param {string | null | undefined} [origin]
|
|
1947
|
+
* Place in code where the message originates (example:
|
|
1948
|
+
* `'my-package:my-rule'` or `'my-rule'`).
|
|
1949
|
+
* @returns {VFileMessage}
|
|
1950
|
+
* Message.
|
|
1951
|
+
*/
|
|
1952
|
+
message(cause: Error | VFileMessage, origin?: string | null | undefined): VFileMessage;
|
|
1953
|
+
/**
|
|
1954
|
+
* Serialize the file.
|
|
1955
|
+
*
|
|
1956
|
+
* > **Note**: which encodings are supported depends on the engine.
|
|
1957
|
+
* > For info on Node.js, see:
|
|
1958
|
+
* > <https://nodejs.org/api/util.html#whatwg-supported-encodings>.
|
|
1959
|
+
*
|
|
1960
|
+
* @param {string | null | undefined} [encoding='utf8']
|
|
1961
|
+
* Character encoding to understand `value` as when it’s a `Uint8Array`
|
|
1962
|
+
* (default: `'utf-8'`).
|
|
1963
|
+
* @returns {string}
|
|
1964
|
+
* Serialized file.
|
|
1965
|
+
*/
|
|
1966
|
+
toString(encoding?: string | null | undefined): string;
|
|
1967
|
+
}
|
|
1968
|
+
type NodeLike = object & {
|
|
1969
|
+
type: string;
|
|
1970
|
+
position?: Position | undefined;
|
|
1971
|
+
};
|
|
1972
|
+
//#endregion
|
|
1973
|
+
//#region ../../node_modules/vfile/index.d.ts
|
|
1974
|
+
// See: <https://github.com/sindresorhus/type-fest/blob/main/source/empty-object.d.ts>
|
|
1975
|
+
declare const emptyObjectSymbol: unique symbol; // To do: next major: remove.
|
|
1976
|
+
/**
|
|
1977
|
+
* Things that can be passed to the constructor.
|
|
1978
|
+
*/
|
|
1979
|
+
type Compatible = Options$1 | URL | VFile | Value;
|
|
1980
|
+
/**
|
|
1981
|
+
* Raw source map.
|
|
1982
|
+
*
|
|
1983
|
+
* See:
|
|
1984
|
+
* <https://github.com/mozilla/source-map/blob/60adcb0/source-map.d.ts#L15-L23>.
|
|
1985
|
+
*/
|
|
1986
|
+
interface Map$1 {
|
|
1987
|
+
/**
|
|
1988
|
+
* The generated file this source map is associated with.
|
|
1989
|
+
*/
|
|
1990
|
+
file: string;
|
|
1991
|
+
/**
|
|
1992
|
+
* A string of base64 VLQs which contain the actual mappings.
|
|
1993
|
+
*/
|
|
1994
|
+
mappings: string;
|
|
1995
|
+
/**
|
|
1996
|
+
* An array of identifiers which can be referenced by individual mappings.
|
|
1997
|
+
*/
|
|
1998
|
+
names: Array<string>;
|
|
1999
|
+
/**
|
|
2000
|
+
* An array of contents of the original source files.
|
|
2001
|
+
*/
|
|
2002
|
+
sourcesContent?: Array<string> | undefined;
|
|
2003
|
+
/**
|
|
2004
|
+
* The URL root from which all sources are relative.
|
|
2005
|
+
*/
|
|
2006
|
+
sourceRoot?: string | undefined;
|
|
2007
|
+
/**
|
|
2008
|
+
* An array of URLs to the original source files.
|
|
2009
|
+
*/
|
|
2010
|
+
sources: Array<string>;
|
|
2011
|
+
/**
|
|
2012
|
+
* Which version of the source map spec this map is following.
|
|
2013
|
+
*/
|
|
2014
|
+
version: number;
|
|
2015
|
+
}
|
|
2016
|
+
/**
|
|
2017
|
+
* This map registers the type of the `data` key of a `VFile`.
|
|
2018
|
+
*
|
|
2019
|
+
* This type can be augmented to register custom `data` types.
|
|
2020
|
+
*
|
|
2021
|
+
* @example
|
|
2022
|
+
* declare module 'vfile' {
|
|
2023
|
+
* interface DataMap {
|
|
2024
|
+
* // `file.data.name` is typed as `string`
|
|
2025
|
+
* name: string
|
|
2026
|
+
* }
|
|
2027
|
+
* }
|
|
2028
|
+
*/
|
|
2029
|
+
interface DataMap {
|
|
2030
|
+
[emptyObjectSymbol]?: never;
|
|
2031
|
+
}
|
|
2032
|
+
/**
|
|
2033
|
+
* Custom info.
|
|
2034
|
+
*
|
|
2035
|
+
* Known attributes can be added to {@linkcode DataMap}
|
|
2036
|
+
*/
|
|
2037
|
+
type Data$1 = Record<string, unknown> & Partial<DataMap>;
|
|
2038
|
+
/**
|
|
2039
|
+
* Configuration.
|
|
2040
|
+
*/
|
|
2041
|
+
interface Options$1 {
|
|
2042
|
+
/**
|
|
2043
|
+
* Arbitrary fields that will be shallow copied over to the new file.
|
|
2044
|
+
*/
|
|
2045
|
+
[key: string]: unknown;
|
|
2046
|
+
/**
|
|
2047
|
+
* Set `basename` (name).
|
|
2048
|
+
*/
|
|
2049
|
+
basename?: string | null | undefined;
|
|
2050
|
+
/**
|
|
2051
|
+
* Set `cwd` (working directory).
|
|
2052
|
+
*/
|
|
2053
|
+
cwd?: string | null | undefined;
|
|
2054
|
+
/**
|
|
2055
|
+
* Set `data` (associated info).
|
|
2056
|
+
*/
|
|
2057
|
+
data?: Data$1 | null | undefined;
|
|
2058
|
+
/**
|
|
2059
|
+
* Set `dirname` (path w/o basename).
|
|
2060
|
+
*/
|
|
2061
|
+
dirname?: string | null | undefined;
|
|
2062
|
+
/**
|
|
2063
|
+
* Set `extname` (extension with dot).
|
|
2064
|
+
*/
|
|
2065
|
+
extname?: string | null | undefined;
|
|
2066
|
+
/**
|
|
2067
|
+
* Set `history` (paths the file moved between).
|
|
2068
|
+
*/
|
|
2069
|
+
history?: Array<string> | null | undefined;
|
|
2070
|
+
/**
|
|
2071
|
+
* Set `path` (current path).
|
|
2072
|
+
*/
|
|
2073
|
+
path?: URL | string | null | undefined;
|
|
2074
|
+
/**
|
|
2075
|
+
* Set `stem` (name without extension).
|
|
2076
|
+
*/
|
|
2077
|
+
stem?: string | null | undefined;
|
|
2078
|
+
/**
|
|
2079
|
+
* Set `value` (the contents of the file).
|
|
2080
|
+
*/
|
|
2081
|
+
value?: Value | null | undefined;
|
|
2082
|
+
}
|
|
2083
|
+
/**
|
|
2084
|
+
* Contents of the file.
|
|
2085
|
+
*
|
|
2086
|
+
* Can either be text or a `Uint8Array` structure.
|
|
2087
|
+
*/
|
|
2088
|
+
type Value = Uint8Array | string;
|
|
2089
|
+
//#endregion
|
|
2090
|
+
//#region ../../node_modules/mdast-util-to-hast/lib/state.d.ts
|
|
2091
|
+
/**
|
|
2092
|
+
* Handle a node.
|
|
2093
|
+
*/
|
|
2094
|
+
type Handler = (state: State, node: any, parent: Parents | undefined) => Array<ElementContent> | ElementContent | undefined;
|
|
2095
|
+
/**
|
|
2096
|
+
* Handle nodes.
|
|
2097
|
+
*/
|
|
2098
|
+
type Handlers = Partial<Record<Nodes["type"], Handler>>;
|
|
2099
|
+
/**
|
|
2100
|
+
* Configuration (optional).
|
|
2101
|
+
*/
|
|
2102
|
+
type Options = {
|
|
2103
|
+
/**
|
|
2104
|
+
* Whether to persist raw HTML in markdown in the hast tree (default:
|
|
2105
|
+
* `false`).
|
|
2106
|
+
*/
|
|
2107
|
+
allowDangerousHtml?: boolean | null | undefined;
|
|
2108
|
+
/**
|
|
2109
|
+
* Prefix to use before the `id` property on footnotes to prevent them from
|
|
2110
|
+
* *clobbering* (default: `'user-content-'`).
|
|
2111
|
+
*
|
|
2112
|
+
* Pass `''` for trusted markdown and when you are careful with
|
|
2113
|
+
* polyfilling.
|
|
2114
|
+
* You could pass a different prefix.
|
|
2115
|
+
*
|
|
2116
|
+
* DOM clobbering is this:
|
|
2117
|
+
*
|
|
2118
|
+
* ```html
|
|
2119
|
+
* <p id="x"></p>
|
|
2120
|
+
* <script>alert(x) // `x` now refers to the `p#x` DOM element</script>
|
|
2121
|
+
* ```
|
|
2122
|
+
*
|
|
2123
|
+
* The above example shows that elements are made available by browsers, by
|
|
2124
|
+
* their ID, on the `window` object.
|
|
2125
|
+
* This is a security risk because you might be expecting some other variable
|
|
2126
|
+
* at that place.
|
|
2127
|
+
* It can also break polyfills.
|
|
2128
|
+
* Using a prefix solves these problems.
|
|
2129
|
+
*/
|
|
2130
|
+
clobberPrefix?: string | null | undefined;
|
|
2131
|
+
/**
|
|
2132
|
+
* Corresponding virtual file representing the input document (optional).
|
|
2133
|
+
*/
|
|
2134
|
+
file?: VFile | null | undefined;
|
|
2135
|
+
/**
|
|
2136
|
+
* Content of the backreference back to references (default: `defaultFootnoteBackContent`).
|
|
2137
|
+
*
|
|
2138
|
+
* The default value is:
|
|
2139
|
+
*
|
|
2140
|
+
* ```js
|
|
2141
|
+
* function defaultFootnoteBackContent(_, rereferenceIndex) {
|
|
2142
|
+
* const result = [{type: 'text', value: '↩'}]
|
|
2143
|
+
*
|
|
2144
|
+
* if (rereferenceIndex > 1) {
|
|
2145
|
+
* result.push({
|
|
2146
|
+
* type: 'element',
|
|
2147
|
+
* tagName: 'sup',
|
|
2148
|
+
* properties: {},
|
|
2149
|
+
* children: [{type: 'text', value: String(rereferenceIndex)}]
|
|
2150
|
+
* })
|
|
2151
|
+
* }
|
|
2152
|
+
*
|
|
2153
|
+
* return result
|
|
2154
|
+
* }
|
|
2155
|
+
* ```
|
|
2156
|
+
*
|
|
2157
|
+
* This content is used in the `a` element of each backreference (the `↩`
|
|
2158
|
+
* links).
|
|
2159
|
+
*/
|
|
2160
|
+
footnoteBackContent?: FootnoteBackContentTemplate | string | null | undefined;
|
|
2161
|
+
/**
|
|
2162
|
+
* Label to describe the backreference back to references (default:
|
|
2163
|
+
* `defaultFootnoteBackLabel`).
|
|
2164
|
+
*
|
|
2165
|
+
* The default value is:
|
|
2166
|
+
*
|
|
2167
|
+
* ```js
|
|
2168
|
+
* function defaultFootnoteBackLabel(referenceIndex, rereferenceIndex) {
|
|
2169
|
+
* return (
|
|
2170
|
+
* 'Back to reference ' +
|
|
2171
|
+
* (referenceIndex + 1) +
|
|
2172
|
+
* (rereferenceIndex > 1 ? '-' + rereferenceIndex : '')
|
|
2173
|
+
* )
|
|
2174
|
+
* }
|
|
2175
|
+
* ```
|
|
2176
|
+
*
|
|
2177
|
+
* Change it when the markdown is not in English.
|
|
2178
|
+
*
|
|
2179
|
+
* This label is used in the `ariaLabel` property on each backreference
|
|
2180
|
+
* (the `↩` links).
|
|
2181
|
+
* It affects users of assistive technology.
|
|
2182
|
+
*/
|
|
2183
|
+
footnoteBackLabel?: FootnoteBackLabelTemplate | string | null | undefined;
|
|
2184
|
+
/**
|
|
2185
|
+
* Textual label to use for the footnotes section (default: `'Footnotes'`).
|
|
2186
|
+
*
|
|
2187
|
+
* Change it when the markdown is not in English.
|
|
2188
|
+
*
|
|
2189
|
+
* This label is typically hidden visually (assuming a `sr-only` CSS class
|
|
2190
|
+
* is defined that does that) and so affects screen readers only.
|
|
2191
|
+
* If you do have such a class, but want to show this section to everyone,
|
|
2192
|
+
* pass different properties with the `footnoteLabelProperties` option.
|
|
2193
|
+
*/
|
|
2194
|
+
footnoteLabel?: string | null | undefined;
|
|
2195
|
+
/**
|
|
2196
|
+
* Properties to use on the footnote label (default: `{className:
|
|
2197
|
+
* ['sr-only']}`).
|
|
2198
|
+
*
|
|
2199
|
+
* Change it to show the label and add other properties.
|
|
2200
|
+
*
|
|
2201
|
+
* This label is typically hidden visually (assuming an `sr-only` CSS class
|
|
2202
|
+
* is defined that does that) and so affects screen readers only.
|
|
2203
|
+
* If you do have such a class, but want to show this section to everyone,
|
|
2204
|
+
* pass an empty string.
|
|
2205
|
+
* You can also add different properties.
|
|
2206
|
+
*
|
|
2207
|
+
* > **Note**: `id: 'footnote-label'` is always added, because footnote
|
|
2208
|
+
* > calls use it with `aria-describedby` to provide an accessible label.
|
|
2209
|
+
*/
|
|
2210
|
+
footnoteLabelProperties?: Properties | null | undefined;
|
|
2211
|
+
/**
|
|
2212
|
+
* HTML tag name to use for the footnote label element (default: `'h2'`).
|
|
2213
|
+
*
|
|
2214
|
+
* Change it to match your document structure.
|
|
2215
|
+
*
|
|
2216
|
+
* This label is typically hidden visually (assuming a `sr-only` CSS class
|
|
2217
|
+
* is defined that does that) and so affects screen readers only.
|
|
2218
|
+
* If you do have such a class, but want to show this section to everyone,
|
|
2219
|
+
* pass different properties with the `footnoteLabelProperties` option.
|
|
2220
|
+
*/
|
|
2221
|
+
footnoteLabelTagName?: string | null | undefined;
|
|
2222
|
+
/**
|
|
2223
|
+
* Extra handlers for nodes (optional).
|
|
2224
|
+
*/
|
|
2225
|
+
handlers?: Handlers | null | undefined;
|
|
2226
|
+
/**
|
|
2227
|
+
* List of custom mdast node types to pass through (keep) in hast (note that
|
|
2228
|
+
* the node itself is passed, but eventual children are transformed)
|
|
2229
|
+
* (optional).
|
|
2230
|
+
*/
|
|
2231
|
+
passThrough?: Array<Nodes["type"]> | null | undefined;
|
|
2232
|
+
/**
|
|
2233
|
+
* Handler for all unknown nodes (optional).
|
|
2234
|
+
*/
|
|
2235
|
+
unknownHandler?: Handler | null | undefined;
|
|
2236
|
+
};
|
|
2237
|
+
/**
|
|
2238
|
+
* Info passed around.
|
|
2239
|
+
*/
|
|
2240
|
+
type State = {
|
|
2241
|
+
/**
|
|
2242
|
+
* Transform the children of an mdast parent to hast.
|
|
2243
|
+
*/
|
|
2244
|
+
all: (node: Nodes) => Array<ElementContent>;
|
|
2245
|
+
/**
|
|
2246
|
+
* Honor the `data` of `from`, and generate an element instead of `node`.
|
|
2247
|
+
*/
|
|
2248
|
+
applyData: <Type extends Nodes$1>(from: Nodes, to: Type) => Element | Type;
|
|
2249
|
+
/**
|
|
2250
|
+
* Definitions by their identifier.
|
|
2251
|
+
*/
|
|
2252
|
+
definitionById: Map<string, Definition>;
|
|
2253
|
+
/**
|
|
2254
|
+
* Footnote definitions by their identifier.
|
|
2255
|
+
*/
|
|
2256
|
+
footnoteById: Map<string, FootnoteDefinition>;
|
|
2257
|
+
/**
|
|
2258
|
+
* Counts for how often the same footnote was called.
|
|
2259
|
+
*/
|
|
2260
|
+
footnoteCounts: Map<string, number>;
|
|
2261
|
+
/**
|
|
2262
|
+
* Identifiers of order when footnote calls first appear in tree order.
|
|
2263
|
+
*/
|
|
2264
|
+
footnoteOrder: Array<string>;
|
|
2265
|
+
/**
|
|
2266
|
+
* Applied handlers.
|
|
2267
|
+
*/
|
|
2268
|
+
handlers: Handlers;
|
|
2269
|
+
/**
|
|
2270
|
+
* Transform an mdast node to hast.
|
|
2271
|
+
*/
|
|
2272
|
+
one: (node: Nodes, parent: Parents | undefined) => Array<ElementContent> | ElementContent | undefined;
|
|
2273
|
+
/**
|
|
2274
|
+
* Configuration.
|
|
2275
|
+
*/
|
|
2276
|
+
options: Options;
|
|
2277
|
+
/**
|
|
2278
|
+
* Copy a node’s positional info.
|
|
2279
|
+
*/
|
|
2280
|
+
patch: (from: Nodes, node: Nodes$1) => undefined;
|
|
2281
|
+
/**
|
|
2282
|
+
* Wrap `nodes` with line endings between each node, adds initial/final line endings when `loose`.
|
|
2283
|
+
*/
|
|
2284
|
+
wrap: <Type extends RootContent>(nodes: Array<Type>, loose?: boolean | undefined) => Array<Text | Type>;
|
|
2285
|
+
};
|
|
2286
|
+
//#endregion
|
|
2287
|
+
//#region ../../node_modules/mdast-util-to-hast/lib/footer.d.ts
|
|
2288
|
+
/**
|
|
2289
|
+
* Generate content for the backreference dynamically.
|
|
2290
|
+
*
|
|
2291
|
+
* For the following markdown:
|
|
2292
|
+
*
|
|
2293
|
+
* ```markdown
|
|
2294
|
+
* Alpha[^micromark], bravo[^micromark], and charlie[^remark].
|
|
2295
|
+
*
|
|
2296
|
+
* [^remark]: things about remark
|
|
2297
|
+
* [^micromark]: things about micromark
|
|
2298
|
+
* ```
|
|
2299
|
+
*
|
|
2300
|
+
* This function will be called with:
|
|
2301
|
+
*
|
|
2302
|
+
* * `0` and `0` for the backreference from `things about micromark` to
|
|
2303
|
+
* `alpha`, as it is the first used definition, and the first call to it
|
|
2304
|
+
* * `0` and `1` for the backreference from `things about micromark` to
|
|
2305
|
+
* `bravo`, as it is the first used definition, and the second call to it
|
|
2306
|
+
* * `1` and `0` for the backreference from `things about remark` to
|
|
2307
|
+
* `charlie`, as it is the second used definition
|
|
2308
|
+
*/
|
|
2309
|
+
type FootnoteBackContentTemplate = (referenceIndex: number, rereferenceIndex: number) => Array<ElementContent> | ElementContent | string;
|
|
2310
|
+
/**
|
|
2311
|
+
* Generate a back label dynamically.
|
|
2312
|
+
*
|
|
2313
|
+
* For the following markdown:
|
|
2314
|
+
*
|
|
2315
|
+
* ```markdown
|
|
2316
|
+
* Alpha[^micromark], bravo[^micromark], and charlie[^remark].
|
|
2317
|
+
*
|
|
2318
|
+
* [^remark]: things about remark
|
|
2319
|
+
* [^micromark]: things about micromark
|
|
2320
|
+
* ```
|
|
2321
|
+
*
|
|
2322
|
+
* This function will be called with:
|
|
2323
|
+
*
|
|
2324
|
+
* * `0` and `0` for the backreference from `things about micromark` to
|
|
2325
|
+
* `alpha`, as it is the first used definition, and the first call to it
|
|
2326
|
+
* * `0` and `1` for the backreference from `things about micromark` to
|
|
2327
|
+
* `bravo`, as it is the first used definition, and the second call to it
|
|
2328
|
+
* * `1` and `0` for the backreference from `things about remark` to
|
|
2329
|
+
* `charlie`, as it is the second used definition
|
|
2330
|
+
*/
|
|
2331
|
+
type FootnoteBackLabelTemplate = (referenceIndex: number, rereferenceIndex: number) => string;
|
|
2332
|
+
//#endregion
|
|
2333
|
+
//#region ../../node_modules/mdast-util-to-hast/index.d.ts
|
|
2334
|
+
/**
|
|
2335
|
+
* Raw string of HTML embedded into HTML AST.
|
|
2336
|
+
*/
|
|
2337
|
+
interface Raw extends Literal {
|
|
2338
|
+
/**
|
|
2339
|
+
* Node type of raw.
|
|
2340
|
+
*/
|
|
2341
|
+
type: 'raw';
|
|
2342
|
+
/**
|
|
2343
|
+
* Data associated with the hast raw.
|
|
2344
|
+
*/
|
|
2345
|
+
data?: RawData | undefined;
|
|
2346
|
+
}
|
|
2347
|
+
/**
|
|
2348
|
+
* Info associated with hast raw nodes by the ecosystem.
|
|
2349
|
+
*/
|
|
2350
|
+
interface RawData extends Data {}
|
|
2351
|
+
// Register nodes in content.
|
|
2352
|
+
declare module 'hast' {
|
|
2353
|
+
interface ElementData {
|
|
2354
|
+
/**
|
|
2355
|
+
* Custom info relating to the node, if `<code>` in `<pre>`.
|
|
2356
|
+
*
|
|
2357
|
+
* Defined by `mdast-util-to-hast` (`remark-rehype`).
|
|
2358
|
+
*/
|
|
2359
|
+
meta?: string | null | undefined;
|
|
2360
|
+
}
|
|
2361
|
+
interface ElementContentMap {
|
|
2362
|
+
/**
|
|
2363
|
+
* Raw string of HTML embedded into HTML AST.
|
|
2364
|
+
*/
|
|
2365
|
+
raw: Raw;
|
|
2366
|
+
}
|
|
2367
|
+
interface RootContentMap {
|
|
2368
|
+
/**
|
|
2369
|
+
* Raw string of HTML embedded into HTML AST.
|
|
2370
|
+
*/
|
|
2371
|
+
raw: Raw;
|
|
2372
|
+
}
|
|
2373
|
+
} // Register data on mdast.
|
|
2374
|
+
declare module 'mdast' {
|
|
2375
|
+
interface Data {
|
|
2376
|
+
/**
|
|
2377
|
+
* Field supported by `mdast-util-to-hast` to signal that a node should
|
|
2378
|
+
* result in something with these children.
|
|
2379
|
+
*
|
|
2380
|
+
* When this is defined, when a parent is created, these children will
|
|
2381
|
+
* be used.
|
|
2382
|
+
*/
|
|
2383
|
+
hChildren?: ElementContent[] | undefined;
|
|
2384
|
+
/**
|
|
2385
|
+
* Field supported by `mdast-util-to-hast` to signal that a node should
|
|
2386
|
+
* result in a particular element, instead of its default behavior.
|
|
2387
|
+
*
|
|
2388
|
+
* When this is defined, an element with the given tag name is created.
|
|
2389
|
+
* For example, when setting `hName` to `'b'`, a `<b>` element is created.
|
|
2390
|
+
*/
|
|
2391
|
+
hName?: string | undefined;
|
|
2392
|
+
/**
|
|
2393
|
+
* Field supported by `mdast-util-to-hast` to signal that a node should
|
|
2394
|
+
* result in an element with these properties.
|
|
2395
|
+
*
|
|
2396
|
+
* When this is defined, when an element is created, these properties will
|
|
2397
|
+
* be used.
|
|
2398
|
+
*/
|
|
2399
|
+
hProperties?: Properties | undefined;
|
|
2400
|
+
}
|
|
2401
|
+
}
|
|
2402
|
+
//#endregion
|
|
2403
|
+
//#region src/types.d.ts
|
|
2404
|
+
interface TabsOptions {
|
|
2405
|
+
containerClass?: string;
|
|
2406
|
+
}
|
|
2407
|
+
interface TabsListNode {
|
|
2408
|
+
type: "tabsList";
|
|
2409
|
+
depth: number;
|
|
2410
|
+
containerClass?: string;
|
|
2411
|
+
groupId: string;
|
|
2412
|
+
blockId: string;
|
|
2413
|
+
children: TabsItemNode[];
|
|
2414
|
+
data?: {
|
|
2415
|
+
attrsRole?: string;
|
|
2416
|
+
hProperties?: Properties;
|
|
2417
|
+
};
|
|
2418
|
+
}
|
|
2419
|
+
interface TabsItemNode {
|
|
2420
|
+
type: "tabsItem";
|
|
2421
|
+
depth: number;
|
|
2422
|
+
label: PhrasingContent[];
|
|
2423
|
+
labelText: string;
|
|
2424
|
+
open: boolean;
|
|
2425
|
+
children: Array<BlockContent | DefinitionContent | TabsListNode>;
|
|
2426
|
+
data?: {
|
|
2427
|
+
attrsRole?: string;
|
|
2428
|
+
attrsTitle?: PhrasingContent[];
|
|
2429
|
+
attrsItemTitle?: boolean;
|
|
2430
|
+
hProperties?: Properties;
|
|
2431
|
+
};
|
|
2432
|
+
}
|
|
2433
|
+
declare module "mdast" {
|
|
2434
|
+
interface RootContentMap {
|
|
2435
|
+
tabsList: TabsListNode;
|
|
2436
|
+
tabsItem: TabsItemNode;
|
|
2437
|
+
}
|
|
2438
|
+
interface BlockContentMap {
|
|
2439
|
+
tabsList: TabsListNode;
|
|
2440
|
+
}
|
|
2441
|
+
} //# sourceMappingURL=types.d.ts.map
|
|
2442
|
+
//#endregion
|
|
2443
|
+
//#region src/index.d.ts
|
|
2444
|
+
declare const remarkTabs: Plugin<[TabsOptions?], Root>;
|
|
2445
|
+
declare const tabsHastHandlers: {
|
|
2446
|
+
readonly tabsList: (state: State, node: TabsListNode) => ElementContent;
|
|
2447
|
+
};
|
|
2448
|
+
//#endregion
|
|
2449
|
+
export { type TabsOptions, remarkTabs, tabsHastHandlers };
|
|
2450
|
+
//# sourceMappingURL=index.d.mts.map
|