@let-value/translate-extract-static 1.1.2 → 1.1.6-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,17 +1,9 @@
1
- //#region ../translate/dist/index.d.ts
2
-
3
- //#region src/locales.d.ts
4
- type PluralFormsLocale = "ach" | "af" | "ak" | "am" | "an" | "ar" | "arn" | "ast" | "ay" | "az" | "be" | "bg" | "bn" | "bo" | "br" | "brx" | "bs" | "ca" | "cgg" | "cs" | "csb" | "cy" | "da" | "de" | "doi" | "dz" | "el" | "en" | "eo" | "es" | "et" | "eu" | "fa" | "ff" | "fi" | "fil" | "fo" | "fr" | "fur" | "fy" | "ga" | "gd" | "gl" | "gu" | "gun" | "ha" | "he" | "hi" | "hne" | "hr" | "hu" | "hy" | "id" | "is" | "it" | "ja" | "jbo" | "jv" | "ka" | "kab" | "kk" | "km" | "kn" | "ko" | "ku" | "kw" | "ky" | "lb" | "ln" | "lo" | "lt" | "lv" | "mai" | "mfe" | "mg" | "mi" | "mk" | "ml" | "mn" | "mni" | "mnk" | "mr" | "ms" | "mt" | "my" | "nah" | "nap" | "nb" | "ne" | "nl" | "nn" | "no" | "nso" | "oc" | "or" | "pa" | "pap" | "pl" | "pms" | "ps" | "pt" | "rm" | "ro" | "ru" | "rw" | "sah" | "sat" | "sco" | "sd" | "se" | "si" | "sk" | "sl" | "so" | "son" | "sq" | "sr" | "su" | "sv" | "sw" | "ta" | "te" | "tg" | "th" | "ti" | "tk" | "tr" | "tt" | "ug" | "uk" | "ur" | "uz" | "vi" | "wa" | "wo" | "yo" | "zh";
5
- //#endregion
6
- //#region src/config.d.ts
7
- //#endregion
8
- //#region ../node_modules/loglevel/index.d.ts
1
+ //#region ../node_modules/.pnpm/loglevel@1.9.2/node_modules/loglevel/index.d.ts
9
2
  // Originally from Definitely Typed, see:
10
3
  // https://github.com/DefinitelyTyped/DefinitelyTyped/blob/b4683d7/types/loglevel/index.d.ts
11
4
  // Original definitions by: Stefan Profanter <https://github.com/Pro>
12
5
  // Gabor Szmetanko <https://github.com/szmeti>
13
6
  // Christian Rackerseder <https://github.com/screendriver>
14
-
15
7
  declare const log: log.RootLogger;
16
8
  declare namespace log {
17
9
  /**
@@ -25,12 +17,10 @@ declare namespace log {
25
17
  ERROR: 4;
26
18
  SILENT: 5;
27
19
  }
28
-
29
20
  /**
30
21
  * Possible log level numbers.
31
22
  */
32
23
  type LogLevelNumbers = LogLevel[keyof LogLevel];
33
-
34
24
  /**
35
25
  * Possible log level descriptors, may be string, lower or upper case, or number.
36
26
  */
@@ -46,7 +36,6 @@ declare namespace log {
46
36
  * returns the loglevel object, which you can then bind to another name yourself.
47
37
  */
48
38
  noConflict(): any;
49
-
50
39
  /**
51
40
  * This gets you a new logger object that works exactly like the root log object, but can have its level and
52
41
  * logging methods set independently. All loggers must have a name (which is a non-empty string or a symbol)
@@ -60,14 +49,12 @@ declare namespace log {
60
49
  * @param name The name of the produced logger
61
50
  */
62
51
  getLogger(name: string | symbol): Logger;
63
-
64
52
  /**
65
53
  * This will return you the dictionary of all loggers created with getLogger, keyed off of their names.
66
54
  */
67
55
  getLoggers(): {
68
56
  [name: string]: Logger;
69
57
  };
70
-
71
58
  /**
72
59
  * A .default property for ES6 default import compatibility
73
60
  */
@@ -78,7 +65,6 @@ declare namespace log {
78
65
  * Available log levels.
79
66
  */
80
67
  readonly levels: LogLevel;
81
-
82
68
  /**
83
69
  * Plugin API entry point. This will be called for each enabled method each time the level is set
84
70
  * (including initially), and should return a MethodFactory to be used for the given log method, at the given level,
@@ -86,7 +72,6 @@ declare namespace log {
86
72
  * recommended that this wraps the initially provided value of log.methodFactory
87
73
  */
88
74
  methodFactory: MethodFactory;
89
-
90
75
  /**
91
76
  * Output trace message to console.
92
77
  * This will also include a full stack trace
@@ -94,42 +79,36 @@ declare namespace log {
94
79
  * @param msg any data to log to the console
95
80
  */
96
81
  trace(...msg: any[]): void;
97
-
98
82
  /**
99
83
  * Output debug message to console including appropriate icons
100
84
  *
101
85
  * @param msg any data to log to the console
102
86
  */
103
87
  debug(...msg: any[]): void;
104
-
105
88
  /**
106
89
  * Output debug message to console including appropriate icons
107
90
  *
108
91
  * @param msg any data to log to the console
109
92
  */
110
93
  log(...msg: any[]): void;
111
-
112
94
  /**
113
95
  * Output info message to console including appropriate icons
114
96
  *
115
97
  * @param msg any data to log to the console
116
98
  */
117
99
  info(...msg: any[]): void;
118
-
119
100
  /**
120
101
  * Output warn message to console including appropriate icons
121
102
  *
122
103
  * @param msg any data to log to the console
123
104
  */
124
105
  warn(...msg: any[]): void;
125
-
126
106
  /**
127
107
  * Output error message to console including appropriate icons
128
108
  *
129
109
  * @param msg any data to log to the console
130
110
  */
131
111
  error(...msg: any[]): void;
132
-
133
112
  /**
134
113
  * This disables all logging below the given level, so that after a log.setLevel("warn") call log.warn("something")
135
114
  * or log.error("something") will output messages, but log.info("something") will not.
@@ -140,7 +119,6 @@ declare namespace log {
140
119
  * false as the optional 'persist' second argument, persistence will be skipped.
141
120
  */
142
121
  setLevel(level: LogLevelDesc, persist?: boolean): void;
143
-
144
122
  /**
145
123
  * Returns the current logging level, as a value from LogLevel.
146
124
  * It's very unlikely you'll need to use this for normal application logging; it's provided partly to help plugin
@@ -149,7 +127,6 @@ declare namespace log {
149
127
  * on your code and you have hard numbers telling you that your log data generation is a real performance problem.
150
128
  */
151
129
  getLevel(): LogLevel[keyof LogLevel];
152
-
153
130
  /**
154
131
  * This sets the current log level only if one has not been persisted and can’t be loaded. This is useful when
155
132
  * initializing scripts; if a developer or user has previously called setLevel(), this won’t alter their settings.
@@ -164,13 +141,11 @@ declare namespace log {
164
141
  * @param level as a string, like 'error' (case-insensitive) or as a number from 0 to 5 (or as log.levels. values)
165
142
  */
166
143
  setDefaultLevel(level: LogLevelDesc): void;
167
-
168
144
  /**
169
145
  * This resets the current log level to the default level (or `warn` if no explicit default was set) and clears
170
146
  * the persisted level if one was previously persisted.
171
147
  */
172
148
  resetLevel(): void;
173
-
174
149
  /**
175
150
  * This enables all log messages, and is equivalent to log.setLevel("trace").
176
151
  *
@@ -179,7 +154,6 @@ declare namespace log {
179
154
  * false as the optional 'persist' second argument, persistence will be skipped.
180
155
  */
181
156
  enableAll(persist?: boolean): void;
182
-
183
157
  /**
184
158
  * This disables all log messages, and is equivalent to log.setLevel("silent").
185
159
  *
@@ -188,7 +162,6 @@ declare namespace log {
188
162
  * false as the optional 'persist' second argument, persistence will be skipped.
189
163
  */
190
164
  disableAll(persist?: boolean): void;
191
-
192
165
  /**
193
166
  * Rebuild the logging methods on this logger and its child loggers.
194
167
  *
@@ -200,1050 +173,19 @@ declare namespace log {
200
173
  }
201
174
  }
202
175
  //#endregion
203
- //#region ../extract/src/logger.d.ts
176
+ //#region ../translate/dist/index.d.mts
177
+ //#region src/locales.d.ts
178
+ type PluralFormsLocale = "ach" | "af" | "ak" | "am" | "an" | "ar" | "arn" | "ast" | "ay" | "az" | "be" | "bg" | "bn" | "bo" | "br" | "brx" | "bs" | "ca" | "cgg" | "cs" | "csb" | "cy" | "da" | "de" | "doi" | "dz" | "el" | "en" | "eo" | "es" | "et" | "eu" | "fa" | "ff" | "fi" | "fil" | "fo" | "fr" | "fur" | "fy" | "ga" | "gd" | "gl" | "gu" | "gun" | "ha" | "he" | "hi" | "hne" | "hr" | "hu" | "hy" | "id" | "is" | "it" | "ja" | "jbo" | "jv" | "ka" | "kab" | "kk" | "km" | "kn" | "ko" | "ku" | "kw" | "ky" | "lb" | "ln" | "lo" | "lt" | "lv" | "mai" | "mfe" | "mg" | "mi" | "mk" | "ml" | "mn" | "mni" | "mnk" | "mr" | "ms" | "mt" | "my" | "nah" | "nap" | "nb" | "ne" | "nl" | "nn" | "no" | "nso" | "oc" | "or" | "pa" | "pap" | "pl" | "pms" | "ps" | "pt" | "rm" | "ro" | "ru" | "rw" | "sah" | "sat" | "sco" | "sd" | "se" | "si" | "sk" | "sl" | "so" | "son" | "sq" | "sr" | "su" | "sv" | "sw" | "ta" | "te" | "tg" | "th" | "ti" | "tk" | "tr" | "tt" | "ug" | "uk" | "ur" | "uz" | "vi" | "wa" | "wo" | "yo" | "zh"; //#endregion
179
+ //#region src/config.d.ts
180
+ //#endregion
181
+ //#region ../extract/dist/configuration-oHJyypq5.d.mts
182
+ //#region src/logger.d.ts
204
183
  type Logger$1 = log.Logger;
205
184
  type LogLevelNames$1 = log.LogLevelNames;
206
- type LogLevel$1 = LogLevelNames$1;
207
- //#endregion
208
- //#region ../extract/src/plugins/cleanup/cleanup.d.ts
209
- declare function cleanup$1(): Plugin;
210
- //#endregion
211
- //#region ../node_modules/@keqingmoe/tree-sitter/tree-sitter.d.ts
212
- /** @module */
213
- declare module "@keqingmoe/tree-sitter" {
214
- class Parser {
215
- /**
216
- * Parse UTF8 text into a syntax tree.
217
- *
218
- * @param input - The text to parse, either as a string or a custom input function
219
- * that provides text chunks. If providing a function, it should return text chunks
220
- * based on byte index and position.
221
- *
222
- * @param oldTree - An optional previous syntax tree from the same document.
223
- * If provided and the document has changed, you must first edit this tree using
224
- * {@link Parser.Tree.edit} to match the new text.
225
- *
226
- * @param options - Optional parsing settings:
227
- * - bufferSize: Size of internal parsing buffer
228
- * - includedRanges: Array of ranges to parse within the input
229
- *
230
- * @returns A syntax tree representing the parsed text
231
- *
232
- * @throws May return null or fail if:
233
- * - No language has been set via {@link Parser.setLanguage}
234
- * - The parsing timeout (set via {@link Parser.setTimeoutMicros}) was reached
235
- * - Parsing was cancelled via cancellation flag
236
- */
237
- parse(input: string | Parser.Input, oldTree?: Parser.Tree | null, options?: Parser.Options): Parser.Tree;
238
-
239
- /**
240
- * Get the ranges of text that the parser will include when parsing.
241
- *
242
- * @returns An array of ranges that will be included in parsing
243
- */
244
- getIncludedRanges(): Parser.Range[];
245
-
246
- /**
247
- * Get the duration in microseconds that parsing is allowed to take.
248
- *
249
- * This timeout can be set via {@link Parser.setTimeoutMicros}.
250
- *
251
- * @returns The parsing timeout in microseconds
252
- */
253
- getTimeoutMicros(): number;
254
-
255
- /**
256
- * Set the maximum duration that parsing is allowed to take before halting.
257
- *
258
- * If parsing takes longer than this, it will halt early, returning null.
259
- *
260
- * @param timeout - The maximum parsing duration in microseconds
261
- */
262
- setTimeoutMicros(timeout: number): void;
263
-
264
- /**
265
- * Instruct the parser to start the next parse from the beginning.
266
- *
267
- * If the parser previously failed because of a timeout or cancellation,
268
- * it will resume where it left off on the next parse by default.
269
- * Call this method if you want to parse a different document instead
270
- * of resuming.
271
- */
272
- reset(): void;
273
-
274
- /**
275
- * Get the parser's current language
276
- */
277
- getLanguage(): Parser.Language;
278
-
279
- /**
280
- * Set the language that the parser should use for parsing.
281
- *
282
- * The language must be compatible with the version of tree-sitter
283
- * being used. A version mismatch will prevent the language from
284
- * being assigned successfully.
285
- *
286
- * @param language - The language to use for parsing
287
- */
288
- setLanguage(language?: Parser.Language): void;
289
-
290
- /**
291
- * Get the parser's current logger
292
- *
293
- * @returns The current logging callback
294
- */
295
- getLogger(): Parser.Logger;
296
-
297
- /**
298
- * Set the logging callback that the parser should use during parsing.
299
- *
300
- * @param logFunc - The logging callback to use, or null/false to disable logging
301
- */
302
- setLogger(logFunc?: Parser.Logger | string | false | null): void;
303
-
304
- /**
305
- * Set the destination to which the parser should write debugging graphs during parsing.
306
- *
307
- * The graphs are formatted in the DOT language. You may want to pipe these graphs
308
- * directly to a 'dot' process to generate SVG output.
309
- *
310
- * @param enabled - Whether to enable or disable graph output
311
- * @param fd - Optional file descriptor for the output
312
- */
313
- printDotGraphs(enabled?: boolean, fd?: number): void;
314
- }
315
- namespace Parser {
316
- /** Configuration options for parsing */
317
- export type Options = {
318
- /** Size of the internal parsing buffer */
319
- bufferSize?: number;
320
-
321
- /** Array of ranges to include when parsing the input */
322
- includedRanges?: Range[];
323
- };
324
-
325
- /**
326
- * A position in a multi-line text document, in terms of rows and columns.
327
- * Both values are zero-based.
328
- */
329
- export type Point = {
330
- /** Zero-based row number */
331
- row: number;
332
-
333
- /** Zero-based column number */
334
- column: number;
335
- };
336
-
337
- /**
338
- * A range of positions in a multi-line text document, specified both in
339
- * terms of byte offsets and row/column positions.
340
- */
341
- export type Range = {
342
- /** The byte offset of the start of the range */
343
- startIndex: number;
344
-
345
- /** The byte offset of the end of the range */
346
- endIndex: number;
347
-
348
- /** The row and column where the range starts */
349
- startPosition: Point;
350
-
351
- /** The row and column where the range ends */
352
- endPosition: Point;
353
- };
354
-
355
- /**
356
- * A summary of a change to a text document
357
- */
358
- export type Edit = {
359
- /** The byte offset where the edit starts */
360
- startIndex: number;
361
-
362
- /** The byte offset where the edit ends in the old document */
363
- oldEndIndex: number;
364
-
365
- /** The byte offset where the edit ends in the new document */
366
- newEndIndex: number;
367
-
368
- /** The row and column where the edit starts */
369
- startPosition: Point;
370
-
371
- /** The row and column where the edit ends in the old document */
372
- oldEndPosition: Point;
373
-
374
- /** The row and column where the edit ends in the new document */
375
- newEndPosition: Point;
376
- };
377
-
378
- /**
379
- * A callback that receives log messages during parser.
380
- *
381
- * @param message - The log message
382
- * @param params - Parameters associated with the log message
383
- * @param type - The type of log message
384
- */
385
- export type Logger = (message: string, params: {
386
- [param: string]: string;
387
- }, type: "parse" | "lex") => void;
388
-
389
- /** A function that provides text content for parsing based on byte index and position */
390
- export interface Input {
391
- /**
392
- * Get a chunk of text at the given byte offset.
393
- *
394
- * @param index - The byte index into the text
395
- * @param position - Optional position in the text as {row, column}
396
- * @returns A string chunk, or null/undefined if no text at this index
397
- */
398
- (index: number, position?: Point): string | null | undefined | {};
399
- }
400
-
401
- /** The syntax tree that contains this node */
402
- export interface SyntaxNode {
403
- /** The syntax tree that contains this node */
404
- tree: Tree;
405
-
406
- /**
407
- * A unique numeric identifier for this node.
408
- * Within a given syntax tree, no two nodes have the same id.
409
- * If a new tree is created based on an older tree and reuses
410
- * a node, that node will have the same id in both trees.
411
- */
412
- id: number;
413
-
414
- /**
415
- * This node's type as a numeric id
416
- */
417
- typeId: number;
418
-
419
- /**
420
- * This node's type as a numeric id as it appears in the grammar,
421
- * ignoring aliases
422
- */
423
- grammarId: number;
424
-
425
- /**
426
- * This node's type as a string
427
- */
428
- type: string;
429
-
430
- /**
431
- * This node's symbol name as it appears in the grammar,
432
- * ignoring aliases
433
- */
434
- grammarType: string;
435
-
436
- /**
437
- * Whether this node is named.
438
- * Named nodes correspond to named rules in the grammar,
439
- * whereas anonymous nodes correspond to string literals in the grammar.
440
- */
441
- isNamed: boolean;
442
-
443
- /**
444
- * Whether this node is missing.
445
- * Missing nodes are inserted by the parser in order to
446
- * recover from certain kinds of syntax errors.
447
- */
448
- isMissing: boolean;
449
-
450
- /**
451
- * Whether this node is extra.
452
- * Extra nodes represent things like comments, which are not
453
- * required by the grammar but can appear anywhere.
454
- */
455
- isExtra: boolean;
456
-
457
- /**
458
- * Whether this node has been edited
459
- */
460
- hasChanges: boolean;
461
-
462
- /**
463
- * Whether this node represents a syntax error or contains
464
- * any syntax errors within it
465
- */
466
- hasError: boolean;
467
-
468
- /**
469
- * Whether this node represents a syntax error.
470
- * Syntax errors represent parts of the code that could not
471
- * be incorporated into a valid syntax tree.
472
- */
473
- isError: boolean;
474
-
475
- /** The text content for this node from the source code */
476
- text: string;
477
-
478
- /** The parse state of this node */
479
- parseState: number;
480
-
481
- /** The parse state that follows this node */
482
- nextParseState: number;
483
-
484
- /** The position where this node starts in terms of rows and columns */
485
- startPosition: Point;
486
-
487
- /** The position where this node ends in terms of rows and columns */
488
- endPosition: Point;
489
-
490
- /** The byte offset where this node starts */
491
- startIndex: number;
492
-
493
- /** The byte offset where this node ends */
494
- endIndex: number;
495
-
496
- /**
497
- * This node's immediate parent.
498
- * For iterating over ancestors, prefer using {@link childWithDescendant}
499
- */
500
- parent: SyntaxNode | null;
501
-
502
- /** Array of all child nodes */
503
- children: Array<SyntaxNode>;
504
-
505
- /** Array of all named child nodes */
506
- namedChildren: Array<SyntaxNode>;
507
-
508
- /** The number of children this node has */
509
- childCount: number;
510
-
511
- /**
512
- * The number of named children this node has.
513
- * @see {@link isNamed}
514
- */
515
- namedChildCount: number;
516
-
517
- /** The first child of this node */
518
- firstChild: SyntaxNode | null;
519
-
520
- /** The first named child of this node */
521
- firstNamedChild: SyntaxNode | null;
522
-
523
- /** The last child of this node */
524
- lastChild: SyntaxNode | null;
525
-
526
- /** The last child of this node */
527
- lastNamedChild: SyntaxNode | null;
528
-
529
- /** This node's next sibling */
530
- nextSibling: SyntaxNode | null;
531
-
532
- /** This node's next named sibling */
533
- nextNamedSibling: SyntaxNode | null;
534
-
535
- /** This node's previous sibling */
536
- previousSibling: SyntaxNode | null;
537
-
538
- /** This node's previous named sibling */
539
- previousNamedSibling: SyntaxNode | null;
540
-
541
- /**
542
- * The number of descendants this node has, including itself
543
- */
544
- descendantCount: number;
545
-
546
- /**
547
- * Convert this node to its string representation
548
- */
549
- toString(): string;
550
-
551
- /**
552
- * Get the node's child at the given index, where zero represents the first child.
553
- *
554
- * Note: While fairly fast, this method's cost is technically log(i).
555
- * For iterating over many children, prefer using the children array.
556
- *
557
- * @param index - Zero-based index of the child to retrieve
558
- * @returns The child node, or null if none exists at the given index
559
- */
560
- child(index: number): SyntaxNode | null;
561
-
562
- /**
563
- * Get this node's named child at the given index.
564
- *
565
- * Note: While fairly fast, this method's cost is technically log(i).
566
- * For iterating over many children, prefer using the namedChildren array.
567
- *
568
- * @param index - Zero-based index of the named child to retrieve
569
- * @returns The named child node, or null if none exists at the given index
570
- */
571
- namedChild(index: number): SyntaxNode | null;
572
-
573
- /**
574
- * Get the first child with the given field name.
575
- *
576
- * For fields that may have multiple children, use childrenForFieldName instead.
577
- *
578
- * @param fieldName - The field name to search for
579
- * @returns The child node, or null if no child has the given field name
580
- */
581
- childForFieldName(fieldName: string): SyntaxNode | null;
582
-
583
- /**
584
- * Get this node's child with the given numerical field id.
585
- *
586
- * Field IDs can be obtained from field names using the parser's language object.
587
- *
588
- * @param fieldId - The field ID to search for
589
- * @returns The child node, or null if no child has the given field ID
590
- */
591
- childForFieldId(fieldId: number): SyntaxNode | null;
592
-
593
- /**
594
- * Get the field name of the child at the given index
595
- *
596
- * @param childIndex - Zero-based index of the child
597
- * @returns The field name, or null if the child has no field name
598
- */
599
- fieldNameForChild(childIndex: number): string | null;
600
-
601
- /**
602
- * Get the field name of the named child at the given index
603
- *
604
- * @param namedChildIndex - Zero-based index of the named child
605
- * @returns The field name, or null if the named child has no field name
606
- */
607
- fieldNameForNamedChild(namedChildIndex: number): string | null;
608
-
609
- /**
610
- * Get all children that have the given field name
611
- *
612
- * @param fieldName - The field name to search for
613
- * @returns Array of child nodes with the given field name
614
- */
615
- childrenForFieldName(fieldName: string): Array<SyntaxNode>;
616
-
617
- /**
618
- * Get all children that have the given field ID
619
- *
620
- * @param fieldId - The field ID to search for
621
- * @returns Array of child nodes with the given field ID
622
- */
623
- childrenForFieldId(fieldId: number): Array<SyntaxNode>;
624
-
625
- /**
626
- * Get the node's first child that extends beyond the given byte offset
627
- *
628
- * @param index - The byte offset to search from
629
- * @returns The first child extending beyond the offset, or null if none found
630
- */
631
- firstChildForIndex(index: number): SyntaxNode | null;
632
-
633
- /**
634
- * Get the node's first named child that extends beyond the given byte offset
635
- *
636
- * @param index - The byte offset to search from
637
- * @returns The first named child extending beyond the offset, or null if none found
638
- */
639
- firstNamedChildForIndex(index: number): SyntaxNode | null;
640
-
641
- /**
642
- * Get the immediate child that contains the given descendant node.
643
- * Note that this can return the descendant itself if it is an immediate child.
644
- *
645
- * @param descendant - The descendant node to find the parent of
646
- * @returns The child containing the descendant, or null if not found
647
- */
648
- childWithDescendant(descendant: SyntaxNode): SyntaxNode | null;
649
-
650
- /**
651
- * Get the smallest node within this node that spans the given byte offset.
652
- *
653
- * @param index - The byte offset to search for
654
- * @returns The smallest node spanning the offset
655
- */
656
- descendantForIndex(index: number): SyntaxNode;
657
-
658
- /**
659
- * Get the smallest node within this node that spans the given byte range.
660
- *
661
- * @param startIndex - The starting byte offset
662
- * @param endIndex - The ending byte offset
663
- * @returns The smallest node spanning the range
664
- */
665
- descendantForIndex(startIndex: number, endIndex: number): SyntaxNode;
666
-
667
- /**
668
- * Get the smallest named node within this node that spans the given byte offset.
669
- *
670
- * @param index - The byte offset to search for
671
- * @returns The smallest named node spanning the offset
672
- */
673
- namedDescendantForIndex(index: number): SyntaxNode;
674
-
675
- /**
676
- * Get the smallest named node within this node that spans the given byte range.
677
- *
678
- * @param startIndex - The starting byte offset
679
- * @param endIndex - The ending byte offset
680
- * @returns The smallest named node spanning the range
681
- */
682
- namedDescendantForIndex(startIndex: number, endIndex: number): SyntaxNode;
683
-
684
- /**
685
- * Get the smallest node within this node that spans the given position.
686
- * When only one position is provided, it's used as both start and end.
687
- *
688
- * @param position - The point to search for
689
- * @returns The smallest node spanning the position
690
- */
691
- descendantForPosition(position: Point): SyntaxNode;
692
-
693
- /**
694
- * Get the smallest node within this node that spans the given position range.
695
- *
696
- * @param startPosition - The starting position
697
- * @param endPosition - The ending position
698
- * @returns The smallest node spanning the range
699
- */
700
- descendantForPosition(startPosition: Point, endPosition: Point): SyntaxNode;
701
-
702
- /**
703
- * Get the smallest named node within this node that spans the given position.
704
- * When only one position is provided, it's used as both start and end.
705
- *
706
- * @param position - The point to search for
707
- * @returns The smallest named node spanning the position
708
- */
709
- namedDescendantForPosition(position: Point): SyntaxNode;
710
-
711
- /**
712
- * Get the smallest named node within this node that spans the given position range.
713
- *
714
- * @param startPosition - The starting position
715
- * @param endPosition - The ending position
716
- * @returns The smallest named node spanning the range
717
- */
718
- namedDescendantForPosition(startPosition: Point, endPosition: Point): SyntaxNode;
719
-
720
- /**
721
- * Get all descendants of this node that have the given type(s)
722
- *
723
- * @param types - A string or array of strings of node types to find
724
- * @param startPosition - Optional starting position to search from
725
- * @param endPosition - Optional ending position to search to
726
- * @returns Array of descendant nodes matching the given types
727
- */
728
- descendantsOfType(types: String | Array<String>, startPosition?: Point, endPosition?: Point): Array<SyntaxNode>;
729
-
730
- /**
731
- * Find the closest ancestor of the current node that matches the given type(s).
732
- *
733
- * Starting from the node's parent, walks up the tree until it finds a node
734
- * whose type matches any of the given types.
735
- *
736
- * @example
737
- * const property = tree.rootNode.descendantForIndex(5);
738
- * // Find closest unary expression ancestor
739
- * const unary = property.closest('unary_expression');
740
- * // Find closest binary or call expression ancestor
741
- * const expr = property.closest(['binary_expression', 'call_expression']);
742
- *
743
- * @param types - A string or array of strings representing the node types to search for
744
- * @returns The closest matching ancestor node, or null if none found
745
- * @throws If the argument is not a string or array of strings
746
- */
747
- closest(types: String | Array<String>): SyntaxNode | null;
748
-
749
- /**
750
- * Create a new TreeCursor starting from this node.
751
- *
752
- * @returns A new cursor positioned at this node
753
- */
754
- walk(): TreeCursor;
755
- }
756
-
757
- /** A stateful object for walking a syntax {@link Tree} efficiently */
758
- export interface TreeCursor {
759
- /** The type of the current node as a string */
760
- nodeType: string;
761
-
762
- /** The type of the current node as a numeric ID */
763
- nodeTypeId: number;
764
-
765
- /** The parse state of the current node */
766
- nodeStateId: number;
767
-
768
- /** The text of the current node */
769
- nodeText: string;
770
-
771
- /** Whether the current node is named */
772
- nodeIsNamed: boolean;
773
-
774
- /** Whether the current node is missing from the source code */
775
- nodeIsMissing: boolean;
776
-
777
- /** The start position of the current node */
778
- startPosition: Point;
779
-
780
- /** The end position of the current node */
781
- endPosition: Point;
782
-
783
- /** The start byte index of the current node */
784
- startIndex: number;
785
-
786
- /** The end byte index of the current node */
787
- endIndex: number;
788
-
789
- /** The current node that the cursor is pointing to */
790
- readonly currentNode: SyntaxNode;
791
-
792
- /** The field name of the current node */
793
- readonly currentFieldName: string;
794
-
795
- /** The numerical field ID of the current node */
796
- readonly currentFieldId: number;
797
-
798
- /** The depth of the current node relative to the node where the cursor was created */
799
- readonly currentDepth: number;
800
-
801
- /** The index of the current node among all descendants of the original node */
802
- readonly currentDescendantIndex: number;
803
-
804
- /**
805
- * Re-initialize this cursor to start at a new node
806
- *
807
- * @param node - The node to start from
808
- */
809
- reset(node: SyntaxNode): void;
810
-
811
- /**
812
- * Re-initialize this cursor to the same position as another cursor.
813
- * Unlike reset(), this will not lose parent information and allows
814
- * reusing already created cursors.
815
- *
816
- * @param cursor - The cursor to copy the position from
817
- */
818
- resetTo(cursor: TreeCursor): void;
819
-
820
- /**
821
- * Move this cursor to the parent of its current node.
822
- *
823
- * @returns true if cursor successfully moved, false if there was no parent
824
- * (cursor was already at the root node)
825
- */
826
- gotoParent(): boolean;
827
-
828
- /**
829
- * Move this cursor to the first child of its current node.
830
- *
831
- * @returns true if cursor successfully moved, false if there were no children
832
- */
833
- gotoFirstChild(): boolean;
834
-
835
- /**
836
- * Move this cursor to the last child of its current node.
837
- * Note: This may be slower than gotoFirstChild() as it needs to iterate
838
- * through all children to compute the position.
839
- *
840
- * @returns true if cursor successfully moved, false if there were no children
841
- */
842
- gotoLastChild(): boolean;
843
-
844
- /**
845
- * Move this cursor to the first child that extends beyond the given byte offset
846
- *
847
- * @param goalIndex - The byte offset to search for
848
- * @returns true if a child was found and cursor moved, false otherwise
849
- */
850
- gotoFirstChildForIndex(goalIndex: number): boolean;
851
-
852
- /**
853
- * Move this cursor to the first child that extends beyond the given position
854
- *
855
- * @param goalPosition - The position to search for
856
- * @returns true if a child was found and cursor moved, false otherwise
857
- */
858
- gotoFirstChildForPosition(goalPosition: Point): boolean;
859
-
860
- /**
861
- * Move this cursor to the next sibling of its current node
862
- *
863
- * @returns true if cursor successfully moved, false if there was no next sibling
864
- */
865
- gotoNextSibling(): boolean;
866
-
867
- /**
868
- * Move this cursor to the previous sibling of its current node.
869
- * Note: This may be slower than gotoNextSibling() due to how node positions
870
- * are stored. In the worst case, it will need to iterate through all previous
871
- * siblings to recalculate positions.
872
- *
873
- * @returns true if cursor successfully moved, false if there was no previous sibling
874
- */
875
- gotoPreviousSibling(): boolean;
876
-
877
- /**
878
- * Move the cursor to the descendant node at the given index, where zero
879
- * represents the original node the cursor was created with.
880
- *
881
- * @param goalDescendantIndex - The index of the descendant to move to
882
- */
883
- gotoDescendant(goalDescendantIndex: number): void;
884
- }
885
-
886
- /**
887
- * A tree that represents the syntactic structure of a source code file.
888
- */
889
- export interface Tree {
890
- /**
891
- * The root node of the syntax tree
892
- */
893
- readonly rootNode: SyntaxNode;
894
-
895
- /**
896
- * Get the root node of the syntax tree, but with its position shifted
897
- * forward by the given offset.
898
- *
899
- * @param offsetBytes - The number of bytes to shift by
900
- * @param offsetExtent - The number of rows/columns to shift by
901
- * @returns The root node with its position offset
902
- */
903
- rootNodeWithOffset(offsetBytes: number, offsetExtent: Point): SyntaxNode;
904
-
905
- /**
906
- * Edit the syntax tree to keep it in sync with source code that has been edited.
907
- * The edit must be described both in terms of byte offsets and in terms of
908
- * row/column coordinates.
909
- *
910
- * @param edit - The edit to apply to the tree
911
- * @returns The edited tree
912
- */
913
- edit(edit: Edit): Tree;
914
-
915
- /**
916
- * Create a new TreeCursor starting from the root of the tree.
917
- *
918
- * @returns A new cursor positioned at the root node
919
- */
920
- walk(): TreeCursor;
921
-
922
- /**
923
- * Get the text for a node within this tree
924
- *
925
- * @param node - The syntax node to get text for
926
- * @returns The source text for the node
927
- */
928
- getText(node: SyntaxNode): string;
929
-
930
- /**
931
- * Compare this edited syntax tree to a new syntax tree representing the
932
- * same document, returning ranges whose syntactic structure has changed.
933
- *
934
- * For this to work correctly, this tree must have been edited to match
935
- * the new tree's ranges. Generally, you'll want to call this right after
936
- * parsing, using the old tree that was passed to parse and the new tree
937
- * that was returned.
938
- *
939
- * @param other - The new tree to compare against
940
- * @returns Array of ranges that have changed
941
- */
942
- getChangedRanges(other: Tree): Range[];
943
-
944
- /**
945
- * Get the ranges that were included when parsing this syntax tree
946
- *
947
- * @returns Array of included ranges
948
- */
949
- getIncludedRanges(): Range[];
950
-
951
- /**
952
- * Get the range that was edited in this tree
953
- *
954
- * @returns The edited range
955
- */
956
- getEditedRange(): Range;
957
-
958
- /**
959
- * Print a graph of the tree in the DOT language.
960
- * You may want to pipe this to a 'dot' process to generate SVG output.
961
- *
962
- * @param fd - Optional file descriptor for the output
963
- */
964
- printDotGraph(fd?: number): void;
965
- }
966
-
967
- /**
968
- * A particular syntax node that was captured by a named pattern in a query.
969
- */
970
- export interface QueryCapture {
971
- /** The name that was used to capture the node in the query */
972
- name: string;
973
-
974
- /** The captured syntax node */
975
- node: SyntaxNode;
976
- }
977
-
978
- /**
979
- * A match of a {@link Query} to a particular set of {@link SyntaxNode}s.
980
- */
981
- export interface QueryMatch {
982
- /**
983
- * The index of the pattern that was matched.
984
- * Each pattern in a query is assigned a numeric index in sequence.
985
- */
986
- pattern: number;
987
-
988
- /** Array of nodes that were captured in the pattern match */
989
- captures: QueryCapture[];
990
- }
991
- export type QueryOptions = {
992
- /** The starting row/column position in which the query will be executed. */
993
- startPosition?: Point;
994
-
995
- /** The ending row/column position in which the query will be executed. */
996
- endPosition?: Point;
997
-
998
- /** The starting byte offset in which the query will be executed. */
999
- startIndex?: number;
1000
-
1001
- /** The ending byte offset in which the query will be executed. */
1002
- endIndex?: number;
1003
-
1004
- /** The maximum number of in-progress matches for this cursor. The limit must be > 0 and <= 65536. */
1005
- matchLimit?: number;
1006
-
1007
- /**
1008
- * The maximum start depth for a query cursor.
1009
- *
1010
- * This prevents cursors from exploring children nodes at a certain depth.
1011
- * Note if a pattern includes many children, then they will still be
1012
- * checked.
1013
- *
1014
- * The zero max start depth value can be used as a special behavior and
1015
- * it helps to destructure a subtree by staying on a node and using
1016
- * captures for interested parts. Note that the zero max start depth
1017
- * only limit a search depth for a pattern's root node but other nodes
1018
- * that are parts of the pattern may be searched at any depth what
1019
- * defined by the pattern structure.
1020
- */
1021
- maxStartDepth?: number;
1022
-
1023
- /**
1024
- * The maximum duration in microseconds that query execution should be allowed to
1025
- * take before halting.
1026
- *
1027
- * If query execution takes longer than this, it will halt early, returning None.
1028
- */
1029
- timeoutMicros?: number;
1030
- };
1031
- export class Query {
1032
- /** The maximum number of in-progress matches for this cursor. */
1033
- readonly matchLimit: number;
1034
-
1035
- /**
1036
- * Create a new query from a string containing one or more S-expression
1037
- * patterns.
1038
- *
1039
- * The query is associated with a particular language, and can only be run
1040
- * on syntax nodes parsed with that language. References to Queries can be
1041
- * shared between multiple threads.
1042
- */
1043
- constructor(language: Language, source: string | Buffer);
1044
-
1045
- /**
1046
- * Iterate over all of the individual captures in the order that they
1047
- * appear.
1048
- *
1049
- * This is useful if you don't care about which pattern matched, and just
1050
- * want a single, ordered sequence of captures.
1051
- *
1052
- * @param node - The syntax node to query
1053
- * @param options - Optional query options
1054
- *
1055
- * @returns An array of captures
1056
- */
1057
- captures(node: SyntaxNode, options?: QueryOptions): QueryCapture[];
1058
-
1059
- /**
1060
- * Iterate over all of the matches in the order that they were found.
1061
- *
1062
- * Each match contains the index of the pattern that matched, and a list of
1063
- * captures. Because multiple patterns can match the same set of nodes,
1064
- * one match may contain captures that appear *before* some of the
1065
- * captures from a previous match.
1066
- *
1067
- * @param node - The syntax node to query
1068
- * @param options - Optional query options
1069
- *
1070
- * @returns An array of matches
1071
- */
1072
- matches(node: SyntaxNode, options?: QueryOptions): QueryMatch[];
1073
-
1074
- /**
1075
- * Disable a certain capture within a query.
1076
- *
1077
- * This prevents the capture from being returned in matches, and also
1078
- * avoids any resource usage associated with recording the capture.
1079
- *
1080
- * @param captureName - The name of the capture to disable
1081
- */
1082
- disableCapture(captureName: string): void;
1083
-
1084
- /**
1085
- * Disable a certain pattern within a query.
1086
- *
1087
- * This prevents the pattern from matching, and also avoids any resource
1088
- * usage associated with the pattern.
1089
- *
1090
- * @param patternIndex - The index of the pattern to disable
1091
- */
1092
- disablePattern(patternIndex: number): void;
1093
-
1094
- /**
1095
- * Check if a given step in a query is 'definite'.
1096
- *
1097
- * A query step is 'definite' if its parent pattern will be guaranteed to
1098
- * match successfully once it reaches the step.
1099
- *
1100
- * @param byteOffset - The byte offset of the step to check
1101
- */
1102
- isPatternGuaranteedAtStep(byteOffset: number): boolean;
1103
-
1104
- /**
1105
- * Check if a given pattern within a query has a single root node.
1106
- *
1107
- * @param patternIndex - The index of the pattern to check
1108
- */
1109
- isPatternRooted(patternIndex: number): boolean;
1110
-
1111
- /**
1112
- * Check if a given pattern within a query has a single root node.
1113
- *
1114
- * @param patternIndex - The index of the pattern to check
1115
- */
1116
- isPatternNonLocal(patternIndex: number): boolean;
1117
-
1118
- /**
1119
- * Get the byte offset where the given pattern starts in the query's
1120
- * source.
1121
- *
1122
- * @param patternIndex - The index of the pattern to check
1123
- *
1124
- * @returns The byte offset where the pattern starts
1125
- */
1126
- startIndexForPattern(patternIndex: number): number;
1127
-
1128
- /**
1129
- * Get the byte offset where the given pattern ends in the query's
1130
- * source.
1131
- *
1132
- * @param patternIndex - The index of the pattern to check
1133
- *
1134
- * @returns The byte offset where the pattern ends
1135
- */
1136
- endIndexForPattern(patternIndex: number): number;
1137
-
1138
- /**
1139
- * Check if, on its last execution, this cursor exceeded its maximum number
1140
- * of in-progress matches.
1141
- *
1142
- * @returns true if the cursor exceeded its match limit
1143
- */
1144
- didExceedMatchLimit(): boolean;
1145
- }
1146
- export class LookaheadIterator {
1147
- /** The current symbol of the lookahead iterator. */
1148
- readonly currentTypeId: number;
1149
- /** The current symbol name of the lookahead iterator. */
1150
- readonly currentType: string;
1151
-
1152
- /**
1153
- * Create a new lookahead iterator for this language and parse state.
1154
- *
1155
- * This returns `null` if the state is invalid for this language.
1156
- *
1157
- * Iterating {@link LookaheadIterator} will yield valid symbols in the given
1158
- * parse state. Newly created lookahead iterators will have {@link currentType}
1159
- * populated with the `ERROR` symbol.
1160
- *
1161
- * Lookahead iterators can be useful to generate suggestions and improve
1162
- * syntax error diagnostics. To get symbols valid in an ERROR node, use the
1163
- * lookahead iterator on its first leaf node state. For `MISSING` nodes, a
1164
- * lookahead iterator created on the previous non-extra leaf node may be
1165
- * appropriate.
1166
- *
1167
- * @param language - The language to use for the lookahead iterator
1168
- * @param state - The parse state to use for the lookahead iterator
1169
- */
1170
- constructor(language: Language, state: number);
1171
-
1172
- /**
1173
- * Reset the lookahead iterator.
1174
- *
1175
- * This returns `true` if the language was set successfully and `false`
1176
- * otherwise.
1177
- *
1178
- * @param language - The language to use for the lookahead iterator
1179
- * @param stateId - The parse state to use for the lookahead iterator
1180
- */
1181
- reset(language: Language, stateId: number): boolean;
1182
-
1183
- /**
1184
- * Reset the lookahead iterator to another state.
1185
- *
1186
- * This returns `true` if the iterator was reset to the given state and
1187
- * `false` otherwise.
1188
- *
1189
- * @param stateId - The parse state to reset the lookahead iterator to
1190
- */
1191
- resetState(stateId: number): boolean;
1192
-
1193
- /**
1194
- * Get an iterator for the lookahead iterator.
1195
- *
1196
- * This allows the lookahead iterator to be used in a for-of loop,
1197
- * iterating over the valid symbols in the current parse state.
1198
- *
1199
- * @returns An iterator over the symbol names
1200
- */
1201
- [Symbol.iterator](): Iterator<string>;
1202
- }
1203
-
1204
- /** The base node type */
1205
- type BaseNode = {
1206
- /** The node's type */
1207
- type: string;
1208
- /** Whether the node is named */
1209
- named: boolean;
1210
- };
1211
-
1212
- /** A child within a node */
1213
- type ChildNode = {
1214
- /** Whether the child is repeated */
1215
- multiple: boolean;
1216
- /** Whether the child is required */
1217
- required: boolean;
1218
- /** The child's type */
1219
- types: BaseNode[];
1220
- };
1221
-
1222
- /** Information about a language's node types */
1223
- type NodeInfo = (BaseNode & {
1224
- /** The subtypes of this node if it's a supertype */
1225
- subtypes: BaseNode[];
1226
- }) | (BaseNode & {
1227
- /** The fields within this node */
1228
- fields: {
1229
- [name: string]: ChildNode;
1230
- };
1231
- /** The child nodes of this node */
1232
- children: ChildNode[];
1233
- });
1234
-
1235
- /** Information about a language */
1236
- interface Language {
1237
- /** The inner language object */
1238
- language: unknown;
1239
- /** The node type information of the language */
1240
- nodeTypeInfo: NodeInfo[];
1241
- }
1242
- }
1243
- export = Parser;
1244
- }
1245
- //#endregion
1246
- //#region ../extract/src/plugins/core/queries/types.d.ts
185
+ type LogLevel$1 = LogLevelNames$1; //#endregion
186
+ //#region src/plugins/cleanup/cleanup.d.ts
187
+ declare function cleanup$1(): Plugin; //#endregion
188
+ //#region src/plugins/core/queries/types.d.ts
1247
189
  interface Comments {
1248
190
  translator?: string;
1249
191
  reference?: string;
@@ -1258,18 +200,14 @@ interface Translation {
1258
200
  message: string[];
1259
201
  comments?: Comments;
1260
202
  obsolete?: boolean;
1261
- }
1262
- //#endregion
1263
- //#region ../extract/src/plugins/core/core.d.ts
1264
- declare function core$1(): Plugin<string, Translation[]>;
1265
- //#endregion
1266
- //#region ../extract/src/plugins/po/po.d.ts
1267
- declare function po$1(): Plugin;
1268
- //#endregion
1269
- //#region ../extract/src/plugins/react/react.d.ts
1270
- declare function react$1(): Plugin<string, Translation[]>;
1271
- //#endregion
1272
- //#region ../extract/src/static.d.ts
203
+ } //#endregion
204
+ //#region src/plugins/core/core.d.ts
205
+ declare function core$1(): Plugin<string, Translation[]>; //#endregion
206
+ //#region src/plugins/po/po.d.ts
207
+ declare function po$1(): Plugin; //#endregion
208
+ //#region src/plugins/react/react.d.ts
209
+ declare function react$1(): Plugin<string, Translation[]>; //#endregion
210
+ //#region src/static.d.ts
1273
211
  declare function core(...props: Parameters<typeof core$1>): {
1274
212
  readonly static: {
1275
213
  readonly name: "core";
@@ -1294,9 +232,8 @@ declare function cleanup(...props: Parameters<typeof cleanup$1>): {
1294
232
  readonly props: [];
1295
233
  };
1296
234
  };
1297
- type StaticPlugin = ReturnType<typeof core> | ReturnType<typeof react> | ReturnType<typeof po> | ReturnType<typeof cleanup>;
1298
- //#endregion
1299
- //#region ../extract/src/plugin.d.ts
235
+ type StaticPlugin = ReturnType<typeof core> | ReturnType<typeof react> | ReturnType<typeof po> | ReturnType<typeof cleanup>; //#endregion
236
+ //#region src/plugin.d.ts
1300
237
  type MaybePromise<T> = T | Promise<T>;
1301
238
  interface Context {
1302
239
  config: ResolvedConfig;
@@ -1304,16 +241,23 @@ interface Context {
1304
241
  paths: Set<string>;
1305
242
  logger?: Logger$1;
1306
243
  }
244
+ interface ImportReference {
245
+ spec: string;
246
+ kind: "static" | "dynamic";
247
+ typeOnly: boolean;
248
+ }
1307
249
  interface ResolveArgs<TInput = unknown> {
1308
250
  entrypoint: string;
1309
251
  path: string;
1310
252
  namespace: string;
253
+ import?: ImportReference;
1311
254
  data?: TInput;
1312
255
  }
1313
256
  interface ResolveResult<TInput = unknown> {
1314
257
  entrypoint: string;
1315
258
  path: string;
1316
259
  namespace: string;
260
+ import?: ImportReference;
1317
261
  data?: TInput;
1318
262
  }
1319
263
  interface LoadArgs<TInput = unknown> {
@@ -1362,19 +306,32 @@ interface Plugin<TInput = unknown, TOutput = unknown> {
1362
306
  name: string;
1363
307
  setup(build: Build<TInput, TOutput>): void;
1364
308
  }
1365
- type UniversalPlugin = Plugin | StaticPlugin;
1366
- //#endregion
1367
- //#region ../extract/src/configuration.d.ts
309
+ type UniversalPlugin = Plugin | StaticPlugin; //#endregion
310
+ //#region src/exclude.d.ts
311
+ declare const defaultExclude: {
312
+ readonly modules: ({
313
+ path
314
+ }: ResolveArgs) => boolean;
315
+ readonly dist: ({
316
+ path
317
+ }: ResolveArgs) => boolean;
318
+ readonly build: ({
319
+ path
320
+ }: ResolveArgs) => boolean;
321
+ readonly types: ({
322
+ import: imp
323
+ }: ResolveArgs) => boolean;
324
+ };
325
+ type DefaultExclude = typeof defaultExclude; //#endregion
326
+ //#region src/configuration.d.ts
1368
327
  type DestinationFn = (args: {
1369
328
  locale: string;
1370
329
  entrypoint: string;
1371
330
  path: string;
1372
331
  }) => string;
1373
- type ExcludeFn = (args: {
1374
- entrypoint: string;
1375
- path: string;
1376
- }) => boolean;
332
+ type ExcludeFn = (args: ResolveArgs) => boolean;
1377
333
  type Exclude = RegExp | ExcludeFn;
334
+ type ExcludeConfig = RegExp | Exclude[] | ((defaultExclude: DefaultExclude) => Exclude[]);
1378
335
  declare const defaultPlugins: {
1379
336
  core: typeof core;
1380
337
  po: typeof po;
@@ -1392,7 +349,7 @@ interface EntrypointConfig {
1392
349
  destination?: DestinationFn;
1393
350
  obsolete?: ObsoleteStrategy;
1394
351
  walk?: boolean;
1395
- exclude?: Exclude | Exclude[];
352
+ exclude?: ExcludeConfig;
1396
353
  }
1397
354
  interface UserConfig {
1398
355
  /**
@@ -1446,7 +403,7 @@ interface UserConfig {
1446
403
  * @default [/node_modules/, /dist/, /build/]
1447
404
  * @see Can be overridden per entrypoint via `exclude` in {@link EntrypointConfig}.
1448
405
  */
1449
- exclude?: Exclude | Exclude[];
406
+ exclude?: ExcludeConfig;
1450
407
  /**
1451
408
  * Log level for the extraction process
1452
409
  * @default "info"
@@ -1471,6 +428,6 @@ interface ResolvedConfig {
1471
428
  * Type helper to make it easier to use translate.config.ts
1472
429
  * @param config - {@link UserConfig}.
1473
430
  */
1474
- declare function defineConfig(config: UserConfig): ResolvedConfig;
431
+ declare function defineConfig(config: UserConfig): ResolvedConfig; //#endregion
1475
432
  //#endregion
1476
- export { Build, Context, DestinationFn, EntrypointConfig, Exclude, ExcludeFn, Filter, LoadArgs, LoadHook, LoadResult, ObsoleteStrategy, Plugin, ProcessArgs, ProcessHook, ProcessResult, ResolveArgs, ResolveHook, ResolveResult, ResolvedConfig, ResolvedEntrypoint, StaticPlugin, UniversalPlugin, UserConfig, cleanup, core, defineConfig, po, react };
433
+ export { Build, Context, DestinationFn, EntrypointConfig, Exclude, ExcludeConfig, ExcludeFn, Filter, ImportReference, LoadArgs, LoadHook, LoadResult, ObsoleteStrategy, Plugin, ProcessArgs, ProcessHook, ProcessResult, ResolveArgs, ResolveHook, ResolveResult, ResolvedConfig, ResolvedEntrypoint, StaticPlugin, UniversalPlugin, UserConfig, cleanup, core, defineConfig, po, react };