@eslint-react/shared 1.40.0-next.3 → 1.40.1-next.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/dist/index.d.mts CHANGED
@@ -1,3 +1,5 @@
1
+ import * as valibot from 'valibot';
2
+ import { InferOutput } from 'valibot';
1
3
  import { _ } from '@eslint-react/eff';
2
4
 
3
5
  /**
@@ -25,1440 +27,32 @@ declare const getId: () => string;
25
27
 
26
28
  declare function getReactVersion(fallback?: string): string;
27
29
 
28
- /**
29
- * Fallback type.
30
- */
31
- type Fallback<TSchema extends BaseSchema<unknown, unknown, BaseIssue<unknown>>> = MaybeReadonly<InferOutput<TSchema>> | ((dataset?: OutputDataset<InferOutput<TSchema>, InferIssue<TSchema>>, config?: Config<InferIssue<TSchema>>) => MaybeReadonly<InferOutput<TSchema>>);
32
- /**
33
- * Schema with fallback type.
34
- */
35
- type SchemaWithFallback<TSchema extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, TFallback extends Fallback<TSchema>> = TSchema & {
36
- /**
37
- * The fallback value.
38
- */
39
- readonly fallback: TFallback;
40
- };
41
-
42
- /**
43
- * Fallback async type.
44
- */
45
- type FallbackAsync<TSchema extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>> = MaybeReadonly<InferOutput<TSchema>> | ((dataset?: OutputDataset<InferOutput<TSchema>, InferIssue<TSchema>>, config?: Config<InferIssue<TSchema>>) => MaybePromise<MaybeReadonly<InferOutput<TSchema>>>);
46
- /**
47
- * Schema with fallback async type.
48
- */
49
- type SchemaWithFallbackAsync<TSchema extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, TFallback extends FallbackAsync<TSchema>> = Omit<TSchema, 'async' | '~standard' | '~run'> & {
50
- /**
51
- * The fallback value.
52
- */
53
- readonly fallback: TFallback;
54
- /**
55
- * Whether it's async.
56
- */
57
- readonly async: true;
58
- /**
59
- * The Standard Schema properties.
60
- *
61
- * @internal
62
- */
63
- readonly '~standard': StandardProps<InferInput<TSchema>, InferOutput<TSchema>>;
64
- /**
65
- * Parses unknown input values.
66
- *
67
- * @param dataset The input dataset.
68
- * @param config The configuration.
69
- *
70
- * @returns The output dataset.
71
- *
72
- * @internal
73
- */
74
- readonly '~run': (dataset: UnknownDataset, config: Config<BaseIssue<unknown>>) => Promise<OutputDataset<InferOutput<TSchema>, InferIssue<TSchema>>>;
75
- };
76
-
77
- /**
78
- * Schema with pipe type.
79
- */
80
- type SchemaWithPipe<TPipe extends readonly [
81
- BaseSchema<unknown, unknown, BaseIssue<unknown>>,
82
- ...PipeItem<any, unknown, BaseIssue<unknown>>[]
83
- ]> = Omit<FirstTupleItem<TPipe>, '~standard' | '~run' | '~types'> & {
84
- /**
85
- * The pipe items.
86
- */
87
- readonly pipe: TPipe;
88
- /**
89
- * The Standard Schema properties.
90
- *
91
- * @internal
92
- */
93
- readonly '~standard': StandardProps<InferInput<FirstTupleItem<TPipe>>, InferOutput<LastTupleItem<TPipe>>>;
94
- /**
95
- * Parses unknown input values.
96
- *
97
- * @param dataset The input dataset.
98
- * @param config The configuration.
99
- *
100
- * @returns The output dataset.
101
- *
102
- * @internal
103
- */
104
- readonly '~run': (dataset: UnknownDataset, config: Config<BaseIssue<unknown>>) => OutputDataset<InferOutput<LastTupleItem<TPipe>>, InferIssue<TPipe[number]>>;
105
- /**
106
- * The input, output and issue type.
107
- *
108
- * @internal
109
- */
110
- readonly '~types'?: {
111
- readonly input: InferInput<FirstTupleItem<TPipe>>;
112
- readonly output: InferOutput<LastTupleItem<TPipe>>;
113
- readonly issue: InferIssue<TPipe[number]>;
114
- } | undefined;
115
- };
116
-
117
- /**
118
- * Schema with pipe async type.
119
- */
120
- type SchemaWithPipeAsync<TPipe extends readonly [
121
- (BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>),
122
- ...(PipeItem<any, unknown, BaseIssue<unknown>> | PipeItemAsync<any, unknown, BaseIssue<unknown>>)[]
123
- ]> = Omit<FirstTupleItem<TPipe>, 'async' | '~standard' | '~run' | '~types'> & {
124
- /**
125
- * The pipe items.
126
- */
127
- readonly pipe: TPipe;
128
- /**
129
- * Whether it's async.
130
- */
131
- readonly async: true;
132
- /**
133
- * The Standard Schema properties.
134
- *
135
- * @internal
136
- */
137
- readonly '~standard': StandardProps<InferInput<FirstTupleItem<TPipe>>, InferOutput<LastTupleItem<TPipe>>>;
138
- /**
139
- * Parses unknown input values.
140
- *
141
- * @param dataset The input dataset.
142
- * @param config The configuration.
143
- *
144
- * @returns The output dataset.
145
- *
146
- * @internal
147
- */
148
- readonly '~run': (dataset: UnknownDataset, config: Config<BaseIssue<unknown>>) => Promise<OutputDataset<InferOutput<LastTupleItem<TPipe>>, InferIssue<TPipe[number]>>>;
149
- /**
150
- * The input, output and issue type.
151
- *
152
- * @internal
153
- */
154
- readonly '~types'?: {
155
- readonly input: InferInput<FirstTupleItem<TPipe>>;
156
- readonly output: InferOutput<LastTupleItem<TPipe>>;
157
- readonly issue: InferIssue<TPipe[number]>;
158
- } | undefined;
159
- };
160
-
161
- /**
162
- * Base metadata interface.
163
- */
164
- interface BaseMetadata<TInput> {
165
- /**
166
- * The object kind.
167
- */
168
- readonly kind: 'metadata';
169
- /**
170
- * The metadata type.
171
- */
172
- readonly type: string;
173
- /**
174
- * The metadata reference.
175
- */
176
- readonly reference: (...args: any[]) => BaseMetadata<any>;
177
- /**
178
- * The input, output and issue type.
179
- *
180
- * @internal
181
- */
182
- readonly '~types'?: {
183
- readonly input: TInput;
184
- readonly output: TInput;
185
- readonly issue: never;
186
- } | undefined;
187
- }
188
-
189
- /**
190
- * Unknown dataset interface.
191
- */
192
- interface UnknownDataset {
193
- /**
194
- * Whether is's typed.
195
- */
196
- typed?: false;
197
- /**
198
- * The dataset value.
199
- */
200
- value: unknown;
201
- /**
202
- * The dataset issues.
203
- */
204
- issues?: undefined;
205
- }
206
- /**
207
- * Success dataset interface.
208
- */
209
- interface SuccessDataset<TValue> {
210
- /**
211
- * Whether is's typed.
212
- */
213
- typed: true;
214
- /**
215
- * The dataset value.
216
- */
217
- value: TValue;
218
- /**
219
- * The dataset issues.
220
- */
221
- issues?: undefined;
222
- }
223
- /**
224
- * Partial dataset interface.
225
- */
226
- interface PartialDataset<TValue, TIssue extends BaseIssue<unknown>> {
227
- /**
228
- * Whether is's typed.
229
- */
230
- typed: true;
231
- /**
232
- * The dataset value.
233
- */
234
- value: TValue;
235
- /**
236
- * The dataset issues.
237
- */
238
- issues: [TIssue, ...TIssue[]];
239
- }
240
- /**
241
- * Failure dataset interface.
242
- */
243
- interface FailureDataset<TIssue extends BaseIssue<unknown>> {
244
- /**
245
- * Whether is's typed.
246
- */
247
- typed: false;
248
- /**
249
- * The dataset value.
250
- */
251
- value: unknown;
252
- /**
253
- * The dataset issues.
254
- */
255
- issues: [TIssue, ...TIssue[]];
256
- }
257
- /**
258
- * Output dataset type.
259
- */
260
- type OutputDataset<TValue, TIssue extends BaseIssue<unknown>> = SuccessDataset<TValue> | PartialDataset<TValue, TIssue> | FailureDataset<TIssue>;
261
-
262
- /**
263
- * The Standard Schema properties interface.
264
- */
265
- interface StandardProps<TInput, TOutput> {
266
- /**
267
- * The version number of the standard.
268
- */
269
- readonly version: 1;
270
- /**
271
- * The vendor name of the schema library.
272
- */
273
- readonly vendor: 'valibot';
274
- /**
275
- * Validates unknown input values.
276
- */
277
- readonly validate: (value: unknown) => StandardResult<TOutput> | Promise<StandardResult<TOutput>>;
278
- /**
279
- * Inferred types associated with the schema.
280
- */
281
- readonly types?: StandardTypes<TInput, TOutput> | undefined;
282
- }
283
- /**
284
- * The result interface of the validate function.
285
- */
286
- type StandardResult<TOutput> = StandardSuccessResult<TOutput> | StandardFailureResult;
287
- /**
288
- * The result interface if validation succeeds.
289
- */
290
- interface StandardSuccessResult<TOutput> {
291
- /**
292
- * The typed output value.
293
- */
294
- readonly value: TOutput;
295
- /**
296
- * The non-existent issues.
297
- */
298
- readonly issues?: undefined;
299
- }
300
- /**
301
- * The result interface if validation fails.
302
- */
303
- interface StandardFailureResult {
304
- /**
305
- * The issues of failed validation.
306
- */
307
- readonly issues: readonly StandardIssue[];
308
- }
309
- /**
310
- * The issue interface of the failure output.
311
- */
312
- interface StandardIssue {
313
- /**
314
- * The error message of the issue.
315
- */
316
- readonly message: string;
317
- /**
318
- * The path of the issue, if any.
319
- */
320
- readonly path?: readonly (PropertyKey | StandardPathItem)[] | undefined;
321
- }
322
- /**
323
- * The path item interface of the issue.
324
- */
325
- interface StandardPathItem {
326
- /**
327
- * The key of the path item.
328
- */
329
- readonly key: PropertyKey;
330
- }
331
- /**
332
- * The Standard Schema types interface.
333
- */
334
- interface StandardTypes<TInput, TOutput> {
335
- /**
336
- * The input type of the schema.
337
- */
338
- readonly input: TInput;
339
- /**
340
- * The output type of the schema.
341
- */
342
- readonly output: TOutput;
343
- }
344
-
345
- /**
346
- * Base schema interface.
347
- */
348
- interface BaseSchema<TInput, TOutput, TIssue extends BaseIssue<unknown>> {
349
- /**
350
- * The object kind.
351
- */
352
- readonly kind: 'schema';
353
- /**
354
- * The schema type.
355
- */
356
- readonly type: string;
357
- /**
358
- * The schema reference.
359
- */
360
- readonly reference: (...args: any[]) => BaseSchema<unknown, unknown, BaseIssue<unknown>>;
361
- /**
362
- * The expected property.
363
- */
364
- readonly expects: string;
365
- /**
366
- * Whether it's async.
367
- */
368
- readonly async: false;
369
- /**
370
- * The Standard Schema properties.
371
- *
372
- * @internal
373
- */
374
- readonly '~standard': StandardProps<TInput, TOutput>;
375
- /**
376
- * Parses unknown input values.
377
- *
378
- * @param dataset The input dataset.
379
- * @param config The configuration.
380
- *
381
- * @returns The output dataset.
382
- *
383
- * @internal
384
- */
385
- readonly '~run': (dataset: UnknownDataset, config: Config<BaseIssue<unknown>>) => OutputDataset<TOutput, TIssue>;
386
- /**
387
- * The input, output and issue type.
388
- *
389
- * @internal
390
- */
391
- readonly '~types'?: {
392
- readonly input: TInput;
393
- readonly output: TOutput;
394
- readonly issue: TIssue;
395
- } | undefined;
396
- }
397
- /**
398
- * Base schema async interface.
399
- */
400
- interface BaseSchemaAsync<TInput, TOutput, TIssue extends BaseIssue<unknown>> extends Omit<BaseSchema<TInput, TOutput, TIssue>, 'reference' | 'async' | '~run'> {
401
- /**
402
- * The schema reference.
403
- */
404
- readonly reference: (...args: any[]) => BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>;
405
- /**
406
- * Whether it's async.
407
- */
408
- readonly async: true;
409
- /**
410
- * Parses unknown input values.
411
- *
412
- * @param dataset The input dataset.
413
- * @param config The configuration.
414
- *
415
- * @returns The output dataset.
416
- *
417
- * @internal
418
- */
419
- readonly '~run': (dataset: UnknownDataset, config: Config<BaseIssue<unknown>>) => Promise<OutputDataset<TOutput, TIssue>>;
420
- }
421
-
422
- /**
423
- * Base transformation interface.
424
- */
425
- interface BaseTransformation<TInput, TOutput, TIssue extends BaseIssue<unknown>> {
426
- /**
427
- * The object kind.
428
- */
429
- readonly kind: 'transformation';
430
- /**
431
- * The transformation type.
432
- */
433
- readonly type: string;
434
- /**
435
- * The transformation reference.
436
- */
437
- readonly reference: (...args: any[]) => BaseTransformation<any, any, BaseIssue<unknown>>;
438
- /**
439
- * Whether it's async.
440
- */
441
- readonly async: false;
442
- /**
443
- * Transforms known input values.
444
- *
445
- * @param dataset The input dataset.
446
- * @param config The configuration.
447
- *
448
- * @returns The output dataset.
449
- *
450
- * @internal
451
- */
452
- readonly '~run': (dataset: SuccessDataset<TInput>, config: Config<BaseIssue<unknown>>) => OutputDataset<TOutput, BaseIssue<unknown> | TIssue>;
453
- /**
454
- * The input, output and issue type.
455
- *
456
- * @internal
457
- */
458
- readonly '~types'?: {
459
- readonly input: TInput;
460
- readonly output: TOutput;
461
- readonly issue: TIssue;
462
- } | undefined;
463
- }
464
- /**
465
- * Base transformation async interface.
466
- */
467
- interface BaseTransformationAsync<TInput, TOutput, TIssue extends BaseIssue<unknown>> extends Omit<BaseTransformation<TInput, TOutput, TIssue>, 'reference' | 'async' | '~run'> {
468
- /**
469
- * The transformation reference.
470
- */
471
- readonly reference: (...args: any[]) => BaseTransformation<any, any, BaseIssue<unknown>> | BaseTransformationAsync<any, any, BaseIssue<unknown>>;
472
- /**
473
- * Whether it's async.
474
- */
475
- readonly async: true;
476
- /**
477
- * Transforms known input values.
478
- *
479
- * @param dataset The input dataset.
480
- * @param config The configuration.
481
- *
482
- * @returns The output dataset.
483
- *
484
- * @internal
485
- */
486
- readonly '~run': (dataset: SuccessDataset<TInput>, config: Config<BaseIssue<unknown>>) => Promise<OutputDataset<TOutput, BaseIssue<unknown> | TIssue>>;
487
- }
488
-
489
- /**
490
- * Base validation interface.
491
- */
492
- interface BaseValidation<TInput, TOutput, TIssue extends BaseIssue<unknown>> {
493
- /**
494
- * The object kind.
495
- */
496
- readonly kind: 'validation';
497
- /**
498
- * The validation type.
499
- */
500
- readonly type: string;
501
- /**
502
- * The validation reference.
503
- */
504
- readonly reference: (...args: any[]) => BaseValidation<any, any, BaseIssue<unknown>>;
505
- /**
506
- * The expected property.
507
- */
508
- readonly expects: string | null;
509
- /**
510
- * Whether it's async.
511
- */
512
- readonly async: false;
513
- /**
514
- * Validates known input values.
515
- *
516
- * @param dataset The input dataset.
517
- * @param config The configuration.
518
- *
519
- * @returns The output dataset.
520
- *
521
- * @internal
522
- */
523
- readonly '~run': (dataset: OutputDataset<TInput, BaseIssue<unknown>>, config: Config<BaseIssue<unknown>>) => OutputDataset<TOutput, BaseIssue<unknown> | TIssue>;
524
- /**
525
- * The input, output and issue type.
526
- *
527
- * @internal
528
- */
529
- readonly '~types'?: {
530
- readonly input: TInput;
531
- readonly output: TOutput;
532
- readonly issue: TIssue;
533
- } | undefined;
534
- }
535
- /**
536
- * Base validation async interface.
537
- */
538
- interface BaseValidationAsync<TInput, TOutput, TIssue extends BaseIssue<unknown>> extends Omit<BaseValidation<TInput, TOutput, TIssue>, 'reference' | 'async' | '~run'> {
539
- /**
540
- * The validation reference.
541
- */
542
- readonly reference: (...args: any[]) => BaseValidation<any, any, BaseIssue<unknown>> | BaseValidationAsync<any, any, BaseIssue<unknown>>;
543
- /**
544
- * Whether it's async.
545
- */
546
- readonly async: true;
547
- /**
548
- * Validates known input values.
549
- *
550
- * @param dataset The input dataset.
551
- * @param config The configuration.
552
- *
553
- * @returns The output dataset.
554
- *
555
- * @internal
556
- */
557
- readonly '~run': (dataset: OutputDataset<TInput, BaseIssue<unknown>>, config: Config<BaseIssue<unknown>>) => Promise<OutputDataset<TOutput, BaseIssue<unknown> | TIssue>>;
558
- }
559
-
560
- /**
561
- * Infer input type.
562
- */
563
- type InferInput<TItem extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>> | BaseValidation<any, unknown, BaseIssue<unknown>> | BaseValidationAsync<any, unknown, BaseIssue<unknown>> | BaseTransformation<any, unknown, BaseIssue<unknown>> | BaseTransformationAsync<any, unknown, BaseIssue<unknown>> | BaseMetadata<any>> = NonNullable<TItem['~types']>['input'];
564
- /**
565
- * Infer output type.
566
- */
567
- type InferOutput<TItem extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>> | BaseValidation<any, unknown, BaseIssue<unknown>> | BaseValidationAsync<any, unknown, BaseIssue<unknown>> | BaseTransformation<any, unknown, BaseIssue<unknown>> | BaseTransformationAsync<any, unknown, BaseIssue<unknown>> | BaseMetadata<any>> = NonNullable<TItem['~types']>['output'];
568
- /**
569
- * Infer issue type.
570
- */
571
- type InferIssue<TItem extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>> | BaseValidation<any, unknown, BaseIssue<unknown>> | BaseValidationAsync<any, unknown, BaseIssue<unknown>> | BaseTransformation<any, unknown, BaseIssue<unknown>> | BaseTransformationAsync<any, unknown, BaseIssue<unknown>> | BaseMetadata<any>> = NonNullable<TItem['~types']>['issue'];
572
- /**
573
- * Constructs a type that is maybe readonly.
574
- */
575
- type MaybeReadonly<TValue> = TValue | Readonly<TValue>;
576
- /**
577
- * Constructs a type that is maybe a promise.
578
- */
579
- type MaybePromise<TValue> = TValue | Promise<TValue>;
580
- /**
581
- * Prettifies a type for better readability.
582
- *
583
- * Hint: This type has no effect and is only used so that TypeScript displays
584
- * the final type in the preview instead of the utility types used.
585
- */
586
- type Prettify<TObject> = {
587
- [TKey in keyof TObject]: TObject[TKey];
588
- } & {};
589
- /**
590
- * Marks specific keys as optional.
591
- */
592
- type MarkOptional<TObject, TKeys extends keyof TObject> = Partial<TObject> & Required<Omit<TObject, TKeys>>;
593
- /**
594
- * Extracts first tuple item.
595
- *
596
- */
597
- type FirstTupleItem<TTuple extends readonly [unknown, ...unknown[]]> = TTuple[0];
598
- /**
599
- * Extracts last tuple item.
600
- *
601
- */
602
- type LastTupleItem<TTuple extends readonly [unknown, ...unknown[]]> = TTuple[TTuple extends readonly [unknown, ...infer TRest] ? TRest['length'] : never];
603
-
604
- /**
605
- * Error message type.
606
- */
607
- type ErrorMessage<TIssue extends BaseIssue<unknown>> = ((issue: TIssue) => string) | string;
608
- /**
609
- * Default type.
610
- */
611
- type Default<TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, TInput extends null | undefined> = MaybeReadonly<InferInput<TWrapped> | TInput> | ((dataset?: UnknownDataset, config?: Config<InferIssue<TWrapped>>) => MaybeReadonly<InferInput<TWrapped> | TInput>) | undefined;
612
- /**
613
- * Default async type.
614
- */
615
- type DefaultAsync<TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, TInput extends null | undefined> = MaybeReadonly<InferInput<TWrapped> | TInput> | ((dataset?: UnknownDataset, config?: Config<InferIssue<TWrapped>>) => MaybePromise<MaybeReadonly<InferInput<TWrapped> | TInput>>) | undefined;
616
- /**
617
- * Default value type.
618
- */
619
- type DefaultValue<TDefault extends Default<BaseSchema<unknown, unknown, BaseIssue<unknown>>, null | undefined> | DefaultAsync<BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, null | undefined>> = TDefault extends DefaultAsync<infer TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, infer TInput> ? TDefault extends (dataset?: UnknownDataset, config?: Config<InferIssue<TWrapped>>) => MaybePromise<InferInput<TWrapped> | TInput> ? Awaited<ReturnType<TDefault>> : TDefault : never;
620
-
621
- /**
622
- * Optional entry schema type.
623
- */
624
- type OptionalEntrySchema = ExactOptionalSchema<BaseSchema<unknown, unknown, BaseIssue<unknown>>, unknown> | NullishSchema<BaseSchema<unknown, unknown, BaseIssue<unknown>>, unknown> | OptionalSchema<BaseSchema<unknown, unknown, BaseIssue<unknown>>, unknown>;
625
- /**
626
- * Optional entry schema async type.
627
- */
628
- type OptionalEntrySchemaAsync = ExactOptionalSchemaAsync<BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, unknown> | NullishSchemaAsync<BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, unknown> | OptionalSchemaAsync<BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, unknown>;
629
- /**
630
- * Object entries interface.
631
- */
632
- interface ObjectEntries {
633
- [key: string]: BaseSchema<unknown, unknown, BaseIssue<unknown>> | SchemaWithFallback<BaseSchema<unknown, unknown, BaseIssue<unknown>>, unknown> | OptionalEntrySchema;
634
- }
635
- /**
636
- * Object entries async interface.
637
- */
638
- interface ObjectEntriesAsync {
639
- [key: string]: BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>> | SchemaWithFallback<BaseSchema<unknown, unknown, BaseIssue<unknown>>, unknown> | SchemaWithFallbackAsync<BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, unknown> | OptionalEntrySchema | OptionalEntrySchemaAsync;
640
- }
641
- /**
642
- * Infer entries input type.
643
- */
644
- type InferEntriesInput<TEntries extends ObjectEntries | ObjectEntriesAsync> = {
645
- -readonly [TKey in keyof TEntries]: InferInput<TEntries[TKey]>;
646
- };
647
- /**
648
- * Infer entries output type.
649
- */
650
- type InferEntriesOutput<TEntries extends ObjectEntries | ObjectEntriesAsync> = {
651
- -readonly [TKey in keyof TEntries]: InferOutput<TEntries[TKey]>;
652
- };
653
- /**
654
- * Optional input keys type.
655
- */
656
- type OptionalInputKeys<TEntries extends ObjectEntries | ObjectEntriesAsync> = {
657
- [TKey in keyof TEntries]: TEntries[TKey] extends OptionalEntrySchema | OptionalEntrySchemaAsync ? TKey : never;
658
- }[keyof TEntries];
659
- /**
660
- * Optional output keys type.
661
- */
662
- type OptionalOutputKeys<TEntries extends ObjectEntries | ObjectEntriesAsync> = {
663
- [TKey in keyof TEntries]: TEntries[TKey] extends OptionalEntrySchema | OptionalEntrySchemaAsync ? undefined extends TEntries[TKey]['default'] ? TKey : never : never;
664
- }[keyof TEntries];
665
- /**
666
- * Input with question marks type.
667
- */
668
- type InputWithQuestionMarks<TEntries extends ObjectEntries | ObjectEntriesAsync, TObject extends InferEntriesInput<TEntries>> = MarkOptional<TObject, OptionalInputKeys<TEntries>>;
669
- /**
670
- * Output with question marks type.
671
- */
672
- type OutputWithQuestionMarks<TEntries extends ObjectEntries | ObjectEntriesAsync, TObject extends InferEntriesOutput<TEntries>> = MarkOptional<TObject, OptionalOutputKeys<TEntries>>;
673
- /**
674
- * Readonly output keys type.
675
- */
676
- type ReadonlyOutputKeys<TEntries extends ObjectEntries | ObjectEntriesAsync> = {
677
- [TKey in keyof TEntries]: TEntries[TKey] extends SchemaWithPipe<infer TPipe> | SchemaWithPipeAsync<infer TPipe> ? ReadonlyAction<any> extends TPipe[number] ? TKey : never : never;
678
- }[keyof TEntries];
679
- /**
680
- * Output with readonly type.
681
- */
682
- type OutputWithReadonly<TEntries extends ObjectEntries | ObjectEntriesAsync, TObject extends OutputWithQuestionMarks<TEntries, InferEntriesOutput<TEntries>>> = Readonly<TObject> & Pick<TObject, Exclude<keyof TObject, ReadonlyOutputKeys<TEntries>>>;
683
- /**
684
- * Infer object input type.
685
- */
686
- type InferObjectInput<TEntries extends ObjectEntries | ObjectEntriesAsync> = Prettify<InputWithQuestionMarks<TEntries, InferEntriesInput<TEntries>>>;
687
- /**
688
- * Infer object output type.
689
- */
690
- type InferObjectOutput<TEntries extends ObjectEntries | ObjectEntriesAsync> = Prettify<OutputWithReadonly<TEntries, OutputWithQuestionMarks<TEntries, InferEntriesOutput<TEntries>>>>;
691
- /**
692
- * Infer object issue type.
693
- */
694
- type InferObjectIssue<TEntries extends ObjectEntries | ObjectEntriesAsync> = InferIssue<TEntries[keyof TEntries]>;
695
-
696
- /**
697
- * Array path item interface.
698
- */
699
- interface ArrayPathItem {
700
- /**
701
- * The path item type.
702
- */
703
- readonly type: 'array';
704
- /**
705
- * The path item origin.
706
- */
707
- readonly origin: 'value';
708
- /**
709
- * The path item input.
710
- */
711
- readonly input: MaybeReadonly<unknown[]>;
712
- /**
713
- * The path item key.
714
- */
715
- readonly key: number;
716
- /**
717
- * The path item value.
718
- */
719
- readonly value: unknown;
720
- }
721
- /**
722
- * Map path item interface.
723
- */
724
- interface MapPathItem {
725
- /**
726
- * The path item type.
727
- */
728
- readonly type: 'map';
729
- /**
730
- * The path item origin.
731
- */
732
- readonly origin: 'key' | 'value';
733
- /**
734
- * The path item input.
735
- */
736
- readonly input: Map<unknown, unknown>;
737
- /**
738
- * The path item key.
739
- */
740
- readonly key: unknown;
741
- /**
742
- * The path item value.
743
- */
744
- readonly value: unknown;
745
- }
746
- /**
747
- * Object path item interface.
748
- */
749
- interface ObjectPathItem {
750
- /**
751
- * The path item type.
752
- */
753
- readonly type: 'object';
754
- /**
755
- * The path item origin.
756
- */
757
- readonly origin: 'key' | 'value';
758
- /**
759
- * The path item input.
760
- */
761
- readonly input: Record<string, unknown>;
762
- /**
763
- * The path item key.
764
- */
765
- readonly key: string;
766
- /**
767
- * The path item value.
768
- */
769
- readonly value: unknown;
770
- }
771
- /**
772
- * Set path item interface.
773
- */
774
- interface SetPathItem {
775
- /**
776
- * The path item type.
777
- */
778
- readonly type: 'set';
779
- /**
780
- * The path item origin.
781
- */
782
- readonly origin: 'value';
783
- /**
784
- * The path item input.
785
- */
786
- readonly input: Set<unknown>;
787
- /**
788
- * The path item key.
789
- */
790
- readonly key: null;
791
- /**
792
- * The path item key.
793
- */
794
- readonly value: unknown;
795
- }
796
- /**
797
- * Unknown path item interface.
798
- */
799
- interface UnknownPathItem {
800
- /**
801
- * The path item type.
802
- */
803
- readonly type: 'unknown';
804
- /**
805
- * The path item origin.
806
- */
807
- readonly origin: 'key' | 'value';
808
- /**
809
- * The path item input.
810
- */
811
- readonly input: unknown;
812
- /**
813
- * The path item key.
814
- */
815
- readonly key: unknown;
816
- /**
817
- * The path item value.
818
- */
819
- readonly value: unknown;
820
- }
821
- /**
822
- * Issue path item type.
823
- */
824
- type IssuePathItem = ArrayPathItem | MapPathItem | ObjectPathItem | SetPathItem | UnknownPathItem;
825
- /**
826
- * Base issue interface.
827
- */
828
- interface BaseIssue<TInput> extends Config<BaseIssue<TInput>> {
829
- /**
830
- * The issue kind.
831
- */
832
- readonly kind: 'schema' | 'validation' | 'transformation';
833
- /**
834
- * The issue type.
835
- */
836
- readonly type: string;
837
- /**
838
- * The raw input data.
839
- */
840
- readonly input: TInput;
841
- /**
842
- * The expected property.
843
- */
844
- readonly expected: string | null;
845
- /**
846
- * The received property.
847
- */
848
- readonly received: string;
849
- /**
850
- * The error message.
851
- */
852
- readonly message: string;
853
- /**
854
- * The input requirement.
855
- */
856
- readonly requirement?: unknown | undefined;
857
- /**
858
- * The issue path.
859
- */
860
- readonly path?: [IssuePathItem, ...IssuePathItem[]] | undefined;
861
- /**
862
- * The sub issues.
863
- */
864
- readonly issues?: [BaseIssue<TInput>, ...BaseIssue<TInput>[]] | undefined;
865
- }
866
-
867
- /**
868
- * Config interface.
869
- */
870
- interface Config<TIssue extends BaseIssue<unknown>> {
871
- /**
872
- * The selected language.
873
- */
874
- readonly lang?: string | undefined;
875
- /**
876
- * The error message.
877
- */
878
- readonly message?: ErrorMessage<TIssue> | undefined;
879
- /**
880
- * Whether it should be aborted early.
881
- */
882
- readonly abortEarly?: boolean | undefined;
883
- /**
884
- * Whether a pipe should be aborted early.
885
- */
886
- readonly abortPipeEarly?: boolean | undefined;
887
- }
888
-
889
- /**
890
- * Pipe action type.
891
- */
892
- type PipeAction<TInput, TOutput, TIssue extends BaseIssue<unknown>> = BaseValidation<TInput, TOutput, TIssue> | BaseTransformation<TInput, TOutput, TIssue> | BaseMetadata<TInput>;
893
- /**
894
- * Pipe action async type.
895
- */
896
- type PipeActionAsync<TInput, TOutput, TIssue extends BaseIssue<unknown>> = BaseValidationAsync<TInput, TOutput, TIssue> | BaseTransformationAsync<TInput, TOutput, TIssue>;
897
- /**
898
- * Pipe item type.
899
- */
900
- type PipeItem<TInput, TOutput, TIssue extends BaseIssue<unknown>> = BaseSchema<TInput, TOutput, TIssue> | PipeAction<TInput, TOutput, TIssue>;
901
- /**
902
- * Pipe item async type.
903
- */
904
- type PipeItemAsync<TInput, TOutput, TIssue extends BaseIssue<unknown>> = BaseSchemaAsync<TInput, TOutput, TIssue> | PipeActionAsync<TInput, TOutput, TIssue>;
905
-
906
- /**
907
- * Array issue interface.
908
- */
909
- interface ArrayIssue extends BaseIssue<unknown> {
910
- /**
911
- * The issue kind.
912
- */
913
- readonly kind: 'schema';
914
- /**
915
- * The issue type.
916
- */
917
- readonly type: 'array';
918
- /**
919
- * The expected property.
920
- */
921
- readonly expected: 'Array';
922
- }
923
-
924
- /**
925
- * Array schema interface.
926
- */
927
- interface ArraySchema<TItem extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, TMessage extends ErrorMessage<ArrayIssue> | undefined> extends BaseSchema<InferInput<TItem>[], InferOutput<TItem>[], ArrayIssue | InferIssue<TItem>> {
928
- /**
929
- * The schema type.
930
- */
931
- readonly type: 'array';
932
- /**
933
- * The schema reference.
934
- */
935
- readonly reference: typeof array;
936
- /**
937
- * The expected property.
938
- */
939
- readonly expects: 'Array';
940
- /**
941
- * The array item schema.
942
- */
943
- readonly item: TItem;
944
- /**
945
- * The error message.
946
- */
947
- readonly message: TMessage;
948
- }
949
- /**
950
- * Creates an array schema.
951
- *
952
- * @param item The item schema.
953
- *
954
- * @returns An array schema.
955
- */
956
- declare function array<const TItem extends BaseSchema<unknown, unknown, BaseIssue<unknown>>>(item: TItem): ArraySchema<TItem, undefined>;
957
- /**
958
- * Creates an array schema.
959
- *
960
- * @param item The item schema.
961
- * @param message The error message.
962
- *
963
- * @returns An array schema.
964
- */
965
- declare function array<const TItem extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, const TMessage extends ErrorMessage<ArrayIssue> | undefined>(item: TItem, message: TMessage): ArraySchema<TItem, TMessage>;
966
-
967
- /**
968
- * Boolean issue interface.
969
- */
970
- interface BooleanIssue extends BaseIssue<unknown> {
971
- /**
972
- * The issue kind.
973
- */
974
- readonly kind: 'schema';
975
- /**
976
- * The issue type.
977
- */
978
- readonly type: 'boolean';
979
- /**
980
- * The expected property.
981
- */
982
- readonly expected: 'boolean';
983
- }
984
- /**
985
- * Boolean schema interface.
986
- */
987
- interface BooleanSchema<TMessage extends ErrorMessage<BooleanIssue> | undefined> extends BaseSchema<boolean, boolean, BooleanIssue> {
988
- /**
989
- * The schema type.
990
- */
991
- readonly type: 'boolean';
992
- /**
993
- * The schema reference.
994
- */
995
- readonly reference: typeof boolean;
996
- /**
997
- * The expected property.
998
- */
999
- readonly expects: 'boolean';
1000
- /**
1001
- * The error message.
1002
- */
1003
- readonly message: TMessage;
1004
- }
1005
- /**
1006
- * Creates a boolean schema.
1007
- *
1008
- * @returns A boolean schema.
1009
- */
1010
- declare function boolean(): BooleanSchema<undefined>;
1011
- /**
1012
- * Creates a boolean schema.
1013
- *
1014
- * @param message The error message.
1015
- *
1016
- * @returns A boolean schema.
1017
- */
1018
- declare function boolean<const TMessage extends ErrorMessage<BooleanIssue> | undefined>(message: TMessage): BooleanSchema<TMessage>;
1019
-
1020
- /**
1021
- * Exact optional schema interface.
1022
- */
1023
- interface ExactOptionalSchema<TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, TDefault extends Default<TWrapped, never>> extends BaseSchema<InferInput<TWrapped>, InferOutput<TWrapped>, InferIssue<TWrapped>> {
1024
- /**
1025
- * The schema type.
1026
- */
1027
- readonly type: 'exact_optional';
1028
- /**
1029
- * The schema reference.
1030
- */
1031
- readonly reference: typeof exactOptional;
1032
- /**
1033
- * The expected property.
1034
- */
1035
- readonly expects: TWrapped['expects'];
1036
- /**
1037
- * The wrapped schema.
1038
- */
1039
- readonly wrapped: TWrapped;
1040
- /**
1041
- * The default value.
1042
- */
1043
- readonly default: TDefault;
1044
- }
1045
- /**
1046
- * Creates an exact optional schema.
1047
- *
1048
- * @param wrapped The wrapped schema.
1049
- *
1050
- * @returns An exact optional schema.
1051
- */
1052
- declare function exactOptional<const TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>>>(wrapped: TWrapped): ExactOptionalSchema<TWrapped, undefined>;
1053
- /**
1054
- * Creates an exact optional schema.
1055
- *
1056
- * @param wrapped The wrapped schema.
1057
- * @param default_ The default value.
1058
- *
1059
- * @returns An exact optional schema.
1060
- */
1061
- declare function exactOptional<const TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, const TDefault extends Default<TWrapped, never>>(wrapped: TWrapped, default_: TDefault): ExactOptionalSchema<TWrapped, TDefault>;
1062
-
1063
- /**
1064
- * Exact optional schema async interface.
1065
- */
1066
- interface ExactOptionalSchemaAsync<TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, TDefault extends DefaultAsync<TWrapped, never>> extends BaseSchemaAsync<InferInput<TWrapped>, InferOutput<TWrapped>, InferIssue<TWrapped>> {
1067
- /**
1068
- * The schema type.
1069
- */
1070
- readonly type: 'exact_optional';
1071
- /**
1072
- * The schema reference.
1073
- */
1074
- readonly reference: typeof exactOptional | typeof exactOptionalAsync;
1075
- /**
1076
- * The expected property.
1077
- */
1078
- readonly expects: TWrapped['expects'];
1079
- /**
1080
- * The wrapped schema.
1081
- */
1082
- readonly wrapped: TWrapped;
1083
- /**
1084
- * The default value.
1085
- */
1086
- readonly default: TDefault;
1087
- }
1088
- /**
1089
- * Creates an exact optional schema.
1090
- *
1091
- * @param wrapped The wrapped schema.
1092
- *
1093
- * @returns An exact optional schema.
1094
- */
1095
- declare function exactOptionalAsync<const TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>>(wrapped: TWrapped): ExactOptionalSchemaAsync<TWrapped, undefined>;
1096
- /**
1097
- * Creates an exact optional schema.
1098
- *
1099
- * @param wrapped The wrapped schema.
1100
- * @param default_ The default value.
1101
- *
1102
- * @returns An exact optional schema.
1103
- */
1104
- declare function exactOptionalAsync<const TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, const TDefault extends DefaultAsync<TWrapped, never>>(wrapped: TWrapped, default_: TDefault): ExactOptionalSchemaAsync<TWrapped, TDefault>;
1105
-
1106
- /**
1107
- * Infer nullish output type.
1108
- */
1109
- type InferNullishOutput<TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, TDefault extends DefaultAsync<TWrapped, null | undefined>> = undefined extends TDefault ? InferOutput<TWrapped> | null | undefined : InferOutput<TWrapped> | Extract<DefaultValue<TDefault>, null | undefined>;
1110
-
1111
- /**
1112
- * Nullish schema interface.
1113
- */
1114
- interface NullishSchema<TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, TDefault extends Default<TWrapped, null | undefined>> extends BaseSchema<InferInput<TWrapped> | null | undefined, InferNullishOutput<TWrapped, TDefault>, InferIssue<TWrapped>> {
1115
- /**
1116
- * The schema type.
1117
- */
1118
- readonly type: 'nullish';
1119
- /**
1120
- * The schema reference.
1121
- */
1122
- readonly reference: typeof nullish;
1123
- /**
1124
- * The expected property.
1125
- */
1126
- readonly expects: `(${TWrapped['expects']} | null | undefined)`;
1127
- /**
1128
- * The wrapped schema.
1129
- */
1130
- readonly wrapped: TWrapped;
1131
- /**
1132
- * The default value.
1133
- */
1134
- readonly default: TDefault;
1135
- }
1136
- /**
1137
- * Creates a nullish schema.
1138
- *
1139
- * @param wrapped The wrapped schema.
1140
- *
1141
- * @returns A nullish schema.
1142
- */
1143
- declare function nullish<const TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>>>(wrapped: TWrapped): NullishSchema<TWrapped, undefined>;
1144
- /**
1145
- * Creates a nullish schema.
1146
- *
1147
- * @param wrapped The wrapped schema.
1148
- * @param default_ The default value.
1149
- *
1150
- * @returns A nullish schema.
1151
- */
1152
- declare function nullish<const TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, const TDefault extends Default<TWrapped, null | undefined>>(wrapped: TWrapped, default_: TDefault): NullishSchema<TWrapped, TDefault>;
1153
-
1154
- /**
1155
- * Nullish schema async interface.
1156
- */
1157
- interface NullishSchemaAsync<TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, TDefault extends DefaultAsync<TWrapped, null | undefined>> extends BaseSchemaAsync<InferInput<TWrapped> | null | undefined, InferNullishOutput<TWrapped, TDefault>, InferIssue<TWrapped>> {
1158
- /**
1159
- * The schema type.
1160
- */
1161
- readonly type: 'nullish';
1162
- /**
1163
- * The schema reference.
1164
- */
1165
- readonly reference: typeof nullish | typeof nullishAsync;
1166
- /**
1167
- * The expected property.
1168
- */
1169
- readonly expects: `(${TWrapped['expects']} | null | undefined)`;
1170
- /**
1171
- * The wrapped schema.
1172
- */
1173
- readonly wrapped: TWrapped;
1174
- /**
1175
- * The default value.
1176
- */
1177
- readonly default: TDefault;
1178
- }
1179
- /**
1180
- * Creates a nullish schema.
1181
- *
1182
- * @param wrapped The wrapped schema.
1183
- *
1184
- * @returns A nullish schema.
1185
- */
1186
- declare function nullishAsync<const TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>>(wrapped: TWrapped): NullishSchemaAsync<TWrapped, undefined>;
1187
- /**
1188
- * Creates a nullish schema.
1189
- *
1190
- * @param wrapped The wrapped schema.
1191
- * @param default_ The default value.
1192
- *
1193
- * @returns A nullish schema.
1194
- */
1195
- declare function nullishAsync<const TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, const TDefault extends DefaultAsync<TWrapped, null | undefined>>(wrapped: TWrapped, default_: TDefault): NullishSchemaAsync<TWrapped, TDefault>;
1196
-
1197
- /**
1198
- * Object issue interface.
1199
- */
1200
- interface ObjectIssue extends BaseIssue<unknown> {
1201
- /**
1202
- * The issue kind.
1203
- */
1204
- readonly kind: 'schema';
1205
- /**
1206
- * The issue type.
1207
- */
1208
- readonly type: 'object';
1209
- /**
1210
- * The expected property.
1211
- */
1212
- readonly expected: 'Object' | `"${string}"`;
1213
- }
1214
-
1215
- /**
1216
- * Object schema interface.
1217
- */
1218
- interface ObjectSchema<TEntries extends ObjectEntries, TMessage extends ErrorMessage<ObjectIssue> | undefined> extends BaseSchema<InferObjectInput<TEntries>, InferObjectOutput<TEntries>, ObjectIssue | InferObjectIssue<TEntries>> {
1219
- /**
1220
- * The schema type.
1221
- */
1222
- readonly type: 'object';
1223
- /**
1224
- * The schema reference.
1225
- */
1226
- readonly reference: typeof object;
1227
- /**
1228
- * The expected property.
1229
- */
1230
- readonly expects: 'Object';
1231
- /**
1232
- * The entries schema.
1233
- */
1234
- readonly entries: TEntries;
1235
- /**
1236
- * The error message.
1237
- */
1238
- readonly message: TMessage;
1239
- }
1240
- /**
1241
- * Creates an object schema.
1242
- *
1243
- * Hint: This schema removes unknown entries. The output will only include the
1244
- * entries you specify. To include unknown entries, use `looseObject`. To
1245
- * return an issue for unknown entries, use `strictObject`. To include and
1246
- * validate unknown entries, use `objectWithRest`.
1247
- *
1248
- * @param entries The entries schema.
1249
- *
1250
- * @returns An object schema.
1251
- */
1252
- declare function object<const TEntries extends ObjectEntries>(entries: TEntries): ObjectSchema<TEntries, undefined>;
1253
- /**
1254
- * Creates an object schema.
1255
- *
1256
- * Hint: This schema removes unknown entries. The output will only include the
1257
- * entries you specify. To include unknown entries, use `looseObject`. To
1258
- * return an issue for unknown entries, use `strictObject`. To include and
1259
- * validate unknown entries, use `objectWithRest`.
1260
- *
1261
- * @param entries The entries schema.
1262
- * @param message The error message.
1263
- *
1264
- * @returns An object schema.
1265
- */
1266
- declare function object<const TEntries extends ObjectEntries, const TMessage extends ErrorMessage<ObjectIssue> | undefined>(entries: TEntries, message: TMessage): ObjectSchema<TEntries, TMessage>;
1267
-
1268
- /**
1269
- * Infer optional output type.
1270
- */
1271
- type InferOptionalOutput<TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, TDefault extends DefaultAsync<TWrapped, undefined>> = undefined extends TDefault ? InferOutput<TWrapped> | undefined : InferOutput<TWrapped> | Extract<DefaultValue<TDefault>, undefined>;
1272
-
1273
- /**
1274
- * Optional schema interface.
1275
- */
1276
- interface OptionalSchema<TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, TDefault extends Default<TWrapped, undefined>> extends BaseSchema<InferInput<TWrapped> | undefined, InferOptionalOutput<TWrapped, TDefault>, InferIssue<TWrapped>> {
1277
- /**
1278
- * The schema type.
1279
- */
1280
- readonly type: 'optional';
1281
- /**
1282
- * The schema reference.
1283
- */
1284
- readonly reference: typeof optional;
1285
- /**
1286
- * The expected property.
1287
- */
1288
- readonly expects: `(${TWrapped['expects']} | undefined)`;
1289
- /**
1290
- * The wrapped schema.
1291
- */
1292
- readonly wrapped: TWrapped;
1293
- /**
1294
- * The default value.
1295
- */
1296
- readonly default: TDefault;
1297
- }
1298
- /**
1299
- * Creates an optional schema.
1300
- *
1301
- * @param wrapped The wrapped schema.
1302
- *
1303
- * @returns An optional schema.
1304
- */
1305
- declare function optional<const TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>>>(wrapped: TWrapped): OptionalSchema<TWrapped, undefined>;
1306
- /**
1307
- * Creates an optional schema.
1308
- *
1309
- * @param wrapped The wrapped schema.
1310
- * @param default_ The default value.
1311
- *
1312
- * @returns An optional schema.
1313
- */
1314
- declare function optional<const TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, const TDefault extends Default<TWrapped, undefined>>(wrapped: TWrapped, default_: TDefault): OptionalSchema<TWrapped, TDefault>;
1315
-
1316
- /**
1317
- * Optional schema async interface.
1318
- */
1319
- interface OptionalSchemaAsync<TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, TDefault extends DefaultAsync<TWrapped, undefined>> extends BaseSchemaAsync<InferInput<TWrapped> | undefined, InferOptionalOutput<TWrapped, TDefault>, InferIssue<TWrapped>> {
1320
- /**
1321
- * The schema type.
1322
- */
1323
- readonly type: 'optional';
1324
- /**
1325
- * The schema reference.
1326
- */
1327
- readonly reference: typeof optional | typeof optionalAsync;
1328
- /**
1329
- * The expected property.
1330
- */
1331
- readonly expects: `(${TWrapped['expects']} | undefined)`;
1332
- /**
1333
- * The wrapped schema.
1334
- */
1335
- readonly wrapped: TWrapped;
1336
- /**
1337
- * The default value.
1338
- */
1339
- readonly default: TDefault;
1340
- }
1341
- /**
1342
- * Creates an optional schema.
1343
- *
1344
- * @param wrapped The wrapped schema.
1345
- *
1346
- * @returns An optional schema.
1347
- */
1348
- declare function optionalAsync<const TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>>(wrapped: TWrapped): OptionalSchemaAsync<TWrapped, undefined>;
1349
- /**
1350
- * Creates an optional schema.
1351
- *
1352
- * @param wrapped The wrapped schema.
1353
- * @param default_ The default value.
1354
- *
1355
- * @returns An optional schema.
1356
- */
1357
- declare function optionalAsync<const TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, const TDefault extends DefaultAsync<TWrapped, undefined>>(wrapped: TWrapped, default_: TDefault): OptionalSchemaAsync<TWrapped, TDefault>;
1358
-
1359
- /**
1360
- * String issue interface.
1361
- */
1362
- interface StringIssue extends BaseIssue<unknown> {
1363
- /**
1364
- * The issue kind.
1365
- */
1366
- readonly kind: 'schema';
1367
- /**
1368
- * The issue type.
1369
- */
1370
- readonly type: 'string';
1371
- /**
1372
- * The expected property.
1373
- */
1374
- readonly expected: 'string';
1375
- }
1376
- /**
1377
- * String schema interface.
1378
- */
1379
- interface StringSchema<TMessage extends ErrorMessage<StringIssue> | undefined> extends BaseSchema<string, string, StringIssue> {
1380
- /**
1381
- * The schema type.
1382
- */
1383
- readonly type: 'string';
1384
- /**
1385
- * The schema reference.
1386
- */
1387
- readonly reference: typeof string;
1388
- /**
1389
- * The expected property.
1390
- */
1391
- readonly expects: 'string';
1392
- /**
1393
- * The error message.
1394
- */
1395
- readonly message: TMessage;
1396
- }
1397
- /**
1398
- * Creates a string schema.
1399
- *
1400
- * @returns A string schema.
1401
- */
1402
- declare function string(): StringSchema<undefined>;
1403
- /**
1404
- * Creates a string schema.
1405
- *
1406
- * @param message The error message.
1407
- *
1408
- * @returns A string schema.
1409
- */
1410
- declare function string<const TMessage extends ErrorMessage<StringIssue> | undefined>(message: TMessage): StringSchema<TMessage>;
1411
-
1412
- /**
1413
- * Readonly output type.
1414
- */
1415
- type ReadonlyOutput<TInput> = TInput extends Map<infer TKey, infer TValue> ? ReadonlyMap<TKey, TValue> : TInput extends Set<infer TValue> ? ReadonlySet<TValue> : Readonly<TInput>;
1416
- /**
1417
- * Readonly action interface.
1418
- */
1419
- interface ReadonlyAction<TInput> extends BaseTransformation<TInput, ReadonlyOutput<TInput>, never> {
1420
- /**
1421
- * The action type.
1422
- */
1423
- readonly type: 'readonly';
1424
- /**
1425
- * The action reference.
1426
- */
1427
- readonly reference: typeof readonly;
1428
- }
1429
- /**
1430
- * Creates a readonly transformation action.
1431
- *
1432
- * @returns A readonly action.
1433
- */
1434
- declare function readonly<TInput>(): ReadonlyAction<TInput>;
1435
-
1436
- declare const CustomComponentPropSchema: ObjectSchema<{
30
+ declare const CustomComponentPropSchema: valibot.ObjectSchema<{
1437
31
  /**
1438
32
  * The name of the prop in the user-defined component.
1439
33
  * @example
1440
34
  * "to"
1441
35
  */
1442
- readonly name: StringSchema<undefined>;
36
+ readonly name: valibot.StringSchema<undefined>;
1443
37
  /**
1444
38
  * The name of the prop in the built-in component.
1445
39
  * @example
1446
40
  * "href"
1447
41
  */
1448
- readonly as: OptionalSchema<StringSchema<undefined>, undefined>;
42
+ readonly as: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
1449
43
  /**
1450
44
  * Whether the prop is controlled or not in the user-defined component.
1451
45
  * @internal
1452
46
  * @example
1453
47
  * `true`
1454
48
  */
1455
- readonly controlled: OptionalSchema<BooleanSchema<undefined>, undefined>;
49
+ readonly controlled: valibot.OptionalSchema<valibot.BooleanSchema<undefined>, undefined>;
1456
50
  /**
1457
51
  * The default value of the prop in the user-defined component.
1458
52
  * @example
1459
53
  * `"/"`
1460
54
  */
1461
- readonly defaultValue: OptionalSchema<StringSchema<undefined>, undefined>;
55
+ readonly defaultValue: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
1462
56
  }, undefined>;
1463
57
  /**
1464
58
  * @description
@@ -1466,50 +60,50 @@ declare const CustomComponentPropSchema: ObjectSchema<{
1466
60
  * For example:
1467
61
  * Which prop is used as the `href` prop for the user-defined `Link` component that represents the built-in `a` element.
1468
62
  */
1469
- declare const CustomComponentSchema: ObjectSchema<{
63
+ declare const CustomComponentSchema: valibot.ObjectSchema<{
1470
64
  /**
1471
65
  * The name of the user-defined component.
1472
66
  * @example
1473
67
  * "Link"
1474
68
  */
1475
- readonly name: StringSchema<undefined>;
69
+ readonly name: valibot.StringSchema<undefined>;
1476
70
  /**
1477
71
  * The name of the built-in component that the user-defined component represents.
1478
72
  * @example
1479
73
  * "a"
1480
74
  */
1481
- readonly as: OptionalSchema<StringSchema<undefined>, undefined>;
75
+ readonly as: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
1482
76
  /**
1483
77
  * Attributes mapping between the user-defined component and the built-in component.
1484
78
  * @example
1485
79
  * `Link` component has a `to` attribute that represents the `href` attribute in the built-in `a` element with a default value of `"/"`.
1486
80
  */
1487
- readonly attributes: OptionalSchema<ArraySchema<ObjectSchema<{
81
+ readonly attributes: valibot.OptionalSchema<valibot.ArraySchema<valibot.ObjectSchema<{
1488
82
  /**
1489
83
  * The name of the prop in the user-defined component.
1490
84
  * @example
1491
85
  * "to"
1492
86
  */
1493
- readonly name: StringSchema<undefined>;
87
+ readonly name: valibot.StringSchema<undefined>;
1494
88
  /**
1495
89
  * The name of the prop in the built-in component.
1496
90
  * @example
1497
91
  * "href"
1498
92
  */
1499
- readonly as: OptionalSchema<StringSchema<undefined>, undefined>;
93
+ readonly as: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
1500
94
  /**
1501
95
  * Whether the prop is controlled or not in the user-defined component.
1502
96
  * @internal
1503
97
  * @example
1504
98
  * `true`
1505
99
  */
1506
- readonly controlled: OptionalSchema<BooleanSchema<undefined>, undefined>;
100
+ readonly controlled: valibot.OptionalSchema<valibot.BooleanSchema<undefined>, undefined>;
1507
101
  /**
1508
102
  * The default value of the prop in the user-defined component.
1509
103
  * @example
1510
104
  * `"/"`
1511
105
  */
1512
- readonly defaultValue: OptionalSchema<StringSchema<undefined>, undefined>;
106
+ readonly defaultValue: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
1513
107
  }, undefined>, undefined>, undefined>;
1514
108
  /**
1515
109
  * The ESQuery selector to select the component precisely.
@@ -1517,151 +111,151 @@ declare const CustomComponentSchema: ObjectSchema<{
1517
111
  * @example
1518
112
  * `JSXElement:has(JSXAttribute[name.name='component'][value.value='a'])`
1519
113
  */
1520
- readonly selector: OptionalSchema<StringSchema<undefined>, undefined>;
114
+ readonly selector: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
1521
115
  }, undefined>;
1522
- declare const CustomHooksSchema: ObjectSchema<{
1523
- readonly use: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1524
- readonly useActionState: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1525
- readonly useCallback: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1526
- readonly useContext: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1527
- readonly useDebugValue: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1528
- readonly useDeferredValue: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1529
- readonly useEffect: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1530
- readonly useFormStatus: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1531
- readonly useId: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1532
- readonly useImperativeHandle: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1533
- readonly useInsertionEffect: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1534
- readonly useLayoutEffect: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1535
- readonly useMemo: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1536
- readonly useOptimistic: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1537
- readonly useReducer: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1538
- readonly useRef: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1539
- readonly useState: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1540
- readonly useSyncExternalStore: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1541
- readonly useTransition: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
116
+ declare const CustomHooksSchema: valibot.ObjectSchema<{
117
+ readonly use: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
118
+ readonly useActionState: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
119
+ readonly useCallback: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
120
+ readonly useContext: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
121
+ readonly useDebugValue: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
122
+ readonly useDeferredValue: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
123
+ readonly useEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
124
+ readonly useFormStatus: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
125
+ readonly useId: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
126
+ readonly useImperativeHandle: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
127
+ readonly useInsertionEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
128
+ readonly useLayoutEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
129
+ readonly useMemo: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
130
+ readonly useOptimistic: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
131
+ readonly useReducer: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
132
+ readonly useRef: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
133
+ readonly useState: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
134
+ readonly useSyncExternalStore: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
135
+ readonly useTransition: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
1542
136
  }, undefined>;
1543
137
  /**
1544
138
  * @internal
1545
139
  */
1546
- declare const ESLintReactSettingsSchema: ObjectSchema<{
140
+ declare const ESLintReactSettingsSchema: valibot.ObjectSchema<{
1547
141
  /**
1548
142
  * The source where React is imported from.
1549
143
  * @description This allows to specify a custom import location for React when not using the official distribution.
1550
144
  * @default `"react"`
1551
145
  * @example `"@pika/react"`
1552
146
  */
1553
- readonly importSource: OptionalSchema<StringSchema<undefined>, undefined>;
147
+ readonly importSource: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
1554
148
  /**
1555
149
  * The identifier that's used for JSX Element creation.
1556
150
  * @default `"createElement"`
1557
151
  * @deprecated
1558
152
  */
1559
- readonly jsxPragma: OptionalSchema<StringSchema<undefined>, undefined>;
153
+ readonly jsxPragma: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
1560
154
  /**
1561
155
  * The identifier that's used for JSX fragment elements.
1562
156
  * @description This should not be a member expression (i.e. use "Fragment" instead of "React.Fragment").
1563
157
  * @default `"Fragment"`
1564
158
  * @deprecated
1565
159
  */
1566
- readonly jsxPragmaFrag: OptionalSchema<StringSchema<undefined>, undefined>;
160
+ readonly jsxPragmaFrag: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
1567
161
  /**
1568
162
  * The name of the prop that is used for polymorphic components.
1569
163
  * @description This is used to determine the type of the component.
1570
164
  * @example `"as"`
1571
165
  */
1572
- readonly polymorphicPropName: OptionalSchema<StringSchema<undefined>, undefined>;
166
+ readonly polymorphicPropName: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
1573
167
  /**
1574
168
  * @internal
1575
169
  */
1576
- readonly strict: OptionalSchema<BooleanSchema<undefined>, false>;
170
+ readonly strict: valibot.OptionalSchema<valibot.BooleanSchema<undefined>, false>;
1577
171
  /**
1578
172
  * Check both the shape and the import to determine if an API is from React.
1579
173
  * @description This can prevent false positives when using a irrelevant third-party library that has similar APIs to React.
1580
174
  * @default `true`
1581
175
  */
1582
- readonly skipImportCheck: OptionalSchema<BooleanSchema<undefined>, true>;
176
+ readonly skipImportCheck: valibot.OptionalSchema<valibot.BooleanSchema<undefined>, true>;
1583
177
  /**
1584
178
  * React version to use, "detect" means auto detect React version from the project's dependencies.
1585
179
  * If `importSource` is specified, an equivalent version of React should be provided here.
1586
180
  * @example `"18.3.1"`
1587
181
  * @default `"detect"`
1588
182
  */
1589
- readonly version: OptionalSchema<StringSchema<undefined>, undefined>;
183
+ readonly version: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
1590
184
  /**
1591
185
  * A object to define additional hooks that are equivalent to the built-in React Hooks.
1592
186
  * @description ESLint React will recognize these aliases as equivalent to the built-in hooks in all its rules.
1593
187
  * @example `{ useEffect: ["useIsomorphicLayoutEffect"] }`
1594
188
  */
1595
- readonly additionalHooks: OptionalSchema<ObjectSchema<{
1596
- readonly use: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1597
- readonly useActionState: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1598
- readonly useCallback: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1599
- readonly useContext: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1600
- readonly useDebugValue: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1601
- readonly useDeferredValue: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1602
- readonly useEffect: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1603
- readonly useFormStatus: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1604
- readonly useId: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1605
- readonly useImperativeHandle: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1606
- readonly useInsertionEffect: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1607
- readonly useLayoutEffect: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1608
- readonly useMemo: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1609
- readonly useOptimistic: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1610
- readonly useReducer: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1611
- readonly useRef: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1612
- readonly useState: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1613
- readonly useSyncExternalStore: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1614
- readonly useTransition: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
189
+ readonly additionalHooks: valibot.OptionalSchema<valibot.ObjectSchema<{
190
+ readonly use: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
191
+ readonly useActionState: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
192
+ readonly useCallback: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
193
+ readonly useContext: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
194
+ readonly useDebugValue: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
195
+ readonly useDeferredValue: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
196
+ readonly useEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
197
+ readonly useFormStatus: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
198
+ readonly useId: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
199
+ readonly useImperativeHandle: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
200
+ readonly useInsertionEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
201
+ readonly useLayoutEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
202
+ readonly useMemo: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
203
+ readonly useOptimistic: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
204
+ readonly useReducer: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
205
+ readonly useRef: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
206
+ readonly useState: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
207
+ readonly useSyncExternalStore: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
208
+ readonly useTransition: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
1615
209
  }, undefined>, undefined>;
1616
210
  /**
1617
211
  * An array of user-defined components
1618
212
  * @description This is used to inform the ESLint React plugins how to treat these components during checks.
1619
213
  * @example `[{ name: "Link", as: "a", attributes: [{ name: "to", as: "href" }, { name: "rel", defaultValue: "noopener noreferrer" }] }]`
1620
214
  */
1621
- readonly additionalComponents: OptionalSchema<ArraySchema<ObjectSchema<{
215
+ readonly additionalComponents: valibot.OptionalSchema<valibot.ArraySchema<valibot.ObjectSchema<{
1622
216
  /**
1623
217
  * The name of the user-defined component.
1624
218
  * @example
1625
219
  * "Link"
1626
220
  */
1627
- readonly name: StringSchema<undefined>;
221
+ readonly name: valibot.StringSchema<undefined>;
1628
222
  /**
1629
223
  * The name of the built-in component that the user-defined component represents.
1630
224
  * @example
1631
225
  * "a"
1632
226
  */
1633
- readonly as: OptionalSchema<StringSchema<undefined>, undefined>;
227
+ readonly as: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
1634
228
  /**
1635
229
  * Attributes mapping between the user-defined component and the built-in component.
1636
230
  * @example
1637
231
  * `Link` component has a `to` attribute that represents the `href` attribute in the built-in `a` element with a default value of `"/"`.
1638
232
  */
1639
- readonly attributes: OptionalSchema<ArraySchema<ObjectSchema<{
233
+ readonly attributes: valibot.OptionalSchema<valibot.ArraySchema<valibot.ObjectSchema<{
1640
234
  /**
1641
235
  * The name of the prop in the user-defined component.
1642
236
  * @example
1643
237
  * "to"
1644
238
  */
1645
- readonly name: StringSchema<undefined>;
239
+ readonly name: valibot.StringSchema<undefined>;
1646
240
  /**
1647
241
  * The name of the prop in the built-in component.
1648
242
  * @example
1649
243
  * "href"
1650
244
  */
1651
- readonly as: OptionalSchema<StringSchema<undefined>, undefined>;
245
+ readonly as: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
1652
246
  /**
1653
247
  * Whether the prop is controlled or not in the user-defined component.
1654
248
  * @internal
1655
249
  * @example
1656
250
  * `true`
1657
251
  */
1658
- readonly controlled: OptionalSchema<BooleanSchema<undefined>, undefined>;
252
+ readonly controlled: valibot.OptionalSchema<valibot.BooleanSchema<undefined>, undefined>;
1659
253
  /**
1660
254
  * The default value of the prop in the user-defined component.
1661
255
  * @example
1662
256
  * `"/"`
1663
257
  */
1664
- readonly defaultValue: OptionalSchema<StringSchema<undefined>, undefined>;
258
+ readonly defaultValue: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
1665
259
  }, undefined>, undefined>, undefined>;
1666
260
  /**
1667
261
  * The ESQuery selector to select the component precisely.
@@ -1669,132 +263,132 @@ declare const ESLintReactSettingsSchema: ObjectSchema<{
1669
263
  * @example
1670
264
  * `JSXElement:has(JSXAttribute[name.name='component'][value.value='a'])`
1671
265
  */
1672
- readonly selector: OptionalSchema<StringSchema<undefined>, undefined>;
266
+ readonly selector: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
1673
267
  }, undefined>, undefined>, undefined>;
1674
268
  }, undefined>;
1675
269
  /**
1676
270
  * @internal
1677
271
  */
1678
- declare const ESLintSettingsSchema: OptionalSchema<ObjectSchema<{
1679
- readonly "react-x": OptionalSchema<ObjectSchema<{
272
+ declare const ESLintSettingsSchema: valibot.OptionalSchema<valibot.ObjectSchema<{
273
+ readonly "react-x": valibot.OptionalSchema<valibot.ObjectSchema<{
1680
274
  /**
1681
275
  * The source where React is imported from.
1682
276
  * @description This allows to specify a custom import location for React when not using the official distribution.
1683
277
  * @default `"react"`
1684
278
  * @example `"@pika/react"`
1685
279
  */
1686
- readonly importSource: OptionalSchema<StringSchema<undefined>, undefined>;
280
+ readonly importSource: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
1687
281
  /**
1688
282
  * The identifier that's used for JSX Element creation.
1689
283
  * @default `"createElement"`
1690
284
  * @deprecated
1691
285
  */
1692
- readonly jsxPragma: OptionalSchema<StringSchema<undefined>, undefined>;
286
+ readonly jsxPragma: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
1693
287
  /**
1694
288
  * The identifier that's used for JSX fragment elements.
1695
289
  * @description This should not be a member expression (i.e. use "Fragment" instead of "React.Fragment").
1696
290
  * @default `"Fragment"`
1697
291
  * @deprecated
1698
292
  */
1699
- readonly jsxPragmaFrag: OptionalSchema<StringSchema<undefined>, undefined>;
293
+ readonly jsxPragmaFrag: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
1700
294
  /**
1701
295
  * The name of the prop that is used for polymorphic components.
1702
296
  * @description This is used to determine the type of the component.
1703
297
  * @example `"as"`
1704
298
  */
1705
- readonly polymorphicPropName: OptionalSchema<StringSchema<undefined>, undefined>;
299
+ readonly polymorphicPropName: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
1706
300
  /**
1707
301
  * @internal
1708
302
  */
1709
- readonly strict: OptionalSchema<BooleanSchema<undefined>, false>;
303
+ readonly strict: valibot.OptionalSchema<valibot.BooleanSchema<undefined>, false>;
1710
304
  /**
1711
305
  * Check both the shape and the import to determine if an API is from React.
1712
306
  * @description This can prevent false positives when using a irrelevant third-party library that has similar APIs to React.
1713
307
  * @default `true`
1714
308
  */
1715
- readonly skipImportCheck: OptionalSchema<BooleanSchema<undefined>, true>;
309
+ readonly skipImportCheck: valibot.OptionalSchema<valibot.BooleanSchema<undefined>, true>;
1716
310
  /**
1717
311
  * React version to use, "detect" means auto detect React version from the project's dependencies.
1718
312
  * If `importSource` is specified, an equivalent version of React should be provided here.
1719
313
  * @example `"18.3.1"`
1720
314
  * @default `"detect"`
1721
315
  */
1722
- readonly version: OptionalSchema<StringSchema<undefined>, undefined>;
316
+ readonly version: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
1723
317
  /**
1724
318
  * A object to define additional hooks that are equivalent to the built-in React Hooks.
1725
319
  * @description ESLint React will recognize these aliases as equivalent to the built-in hooks in all its rules.
1726
320
  * @example `{ useEffect: ["useIsomorphicLayoutEffect"] }`
1727
321
  */
1728
- readonly additionalHooks: OptionalSchema<ObjectSchema<{
1729
- readonly use: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1730
- readonly useActionState: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1731
- readonly useCallback: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1732
- readonly useContext: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1733
- readonly useDebugValue: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1734
- readonly useDeferredValue: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1735
- readonly useEffect: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1736
- readonly useFormStatus: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1737
- readonly useId: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1738
- readonly useImperativeHandle: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1739
- readonly useInsertionEffect: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1740
- readonly useLayoutEffect: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1741
- readonly useMemo: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1742
- readonly useOptimistic: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1743
- readonly useReducer: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1744
- readonly useRef: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1745
- readonly useState: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1746
- readonly useSyncExternalStore: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1747
- readonly useTransition: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
322
+ readonly additionalHooks: valibot.OptionalSchema<valibot.ObjectSchema<{
323
+ readonly use: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
324
+ readonly useActionState: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
325
+ readonly useCallback: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
326
+ readonly useContext: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
327
+ readonly useDebugValue: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
328
+ readonly useDeferredValue: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
329
+ readonly useEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
330
+ readonly useFormStatus: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
331
+ readonly useId: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
332
+ readonly useImperativeHandle: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
333
+ readonly useInsertionEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
334
+ readonly useLayoutEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
335
+ readonly useMemo: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
336
+ readonly useOptimistic: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
337
+ readonly useReducer: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
338
+ readonly useRef: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
339
+ readonly useState: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
340
+ readonly useSyncExternalStore: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
341
+ readonly useTransition: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
1748
342
  }, undefined>, undefined>;
1749
343
  /**
1750
344
  * An array of user-defined components
1751
345
  * @description This is used to inform the ESLint React plugins how to treat these components during checks.
1752
346
  * @example `[{ name: "Link", as: "a", attributes: [{ name: "to", as: "href" }, { name: "rel", defaultValue: "noopener noreferrer" }] }]`
1753
347
  */
1754
- readonly additionalComponents: OptionalSchema<ArraySchema<ObjectSchema<{
348
+ readonly additionalComponents: valibot.OptionalSchema<valibot.ArraySchema<valibot.ObjectSchema<{
1755
349
  /**
1756
350
  * The name of the user-defined component.
1757
351
  * @example
1758
352
  * "Link"
1759
353
  */
1760
- readonly name: StringSchema<undefined>;
354
+ readonly name: valibot.StringSchema<undefined>;
1761
355
  /**
1762
356
  * The name of the built-in component that the user-defined component represents.
1763
357
  * @example
1764
358
  * "a"
1765
359
  */
1766
- readonly as: OptionalSchema<StringSchema<undefined>, undefined>;
360
+ readonly as: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
1767
361
  /**
1768
362
  * Attributes mapping between the user-defined component and the built-in component.
1769
363
  * @example
1770
364
  * `Link` component has a `to` attribute that represents the `href` attribute in the built-in `a` element with a default value of `"/"`.
1771
365
  */
1772
- readonly attributes: OptionalSchema<ArraySchema<ObjectSchema<{
366
+ readonly attributes: valibot.OptionalSchema<valibot.ArraySchema<valibot.ObjectSchema<{
1773
367
  /**
1774
368
  * The name of the prop in the user-defined component.
1775
369
  * @example
1776
370
  * "to"
1777
371
  */
1778
- readonly name: StringSchema<undefined>;
372
+ readonly name: valibot.StringSchema<undefined>;
1779
373
  /**
1780
374
  * The name of the prop in the built-in component.
1781
375
  * @example
1782
376
  * "href"
1783
377
  */
1784
- readonly as: OptionalSchema<StringSchema<undefined>, undefined>;
378
+ readonly as: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
1785
379
  /**
1786
380
  * Whether the prop is controlled or not in the user-defined component.
1787
381
  * @internal
1788
382
  * @example
1789
383
  * `true`
1790
384
  */
1791
- readonly controlled: OptionalSchema<BooleanSchema<undefined>, undefined>;
385
+ readonly controlled: valibot.OptionalSchema<valibot.BooleanSchema<undefined>, undefined>;
1792
386
  /**
1793
387
  * The default value of the prop in the user-defined component.
1794
388
  * @example
1795
389
  * `"/"`
1796
390
  */
1797
- readonly defaultValue: OptionalSchema<StringSchema<undefined>, undefined>;
391
+ readonly defaultValue: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
1798
392
  }, undefined>, undefined>, undefined>;
1799
393
  /**
1800
394
  * The ESQuery selector to select the component precisely.
@@ -1802,129 +396,129 @@ declare const ESLintSettingsSchema: OptionalSchema<ObjectSchema<{
1802
396
  * @example
1803
397
  * `JSXElement:has(JSXAttribute[name.name='component'][value.value='a'])`
1804
398
  */
1805
- readonly selector: OptionalSchema<StringSchema<undefined>, undefined>;
399
+ readonly selector: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
1806
400
  }, undefined>, undefined>, undefined>;
1807
401
  }, undefined>, undefined>;
1808
402
  /** @deprecated Use `react-x` instead */
1809
- readonly reactOptions: OptionalSchema<ObjectSchema<{
403
+ readonly reactOptions: valibot.OptionalSchema<valibot.ObjectSchema<{
1810
404
  /**
1811
405
  * The source where React is imported from.
1812
406
  * @description This allows to specify a custom import location for React when not using the official distribution.
1813
407
  * @default `"react"`
1814
408
  * @example `"@pika/react"`
1815
409
  */
1816
- readonly importSource: OptionalSchema<StringSchema<undefined>, undefined>;
410
+ readonly importSource: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
1817
411
  /**
1818
412
  * The identifier that's used for JSX Element creation.
1819
413
  * @default `"createElement"`
1820
414
  * @deprecated
1821
415
  */
1822
- readonly jsxPragma: OptionalSchema<StringSchema<undefined>, undefined>;
416
+ readonly jsxPragma: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
1823
417
  /**
1824
418
  * The identifier that's used for JSX fragment elements.
1825
419
  * @description This should not be a member expression (i.e. use "Fragment" instead of "React.Fragment").
1826
420
  * @default `"Fragment"`
1827
421
  * @deprecated
1828
422
  */
1829
- readonly jsxPragmaFrag: OptionalSchema<StringSchema<undefined>, undefined>;
423
+ readonly jsxPragmaFrag: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
1830
424
  /**
1831
425
  * The name of the prop that is used for polymorphic components.
1832
426
  * @description This is used to determine the type of the component.
1833
427
  * @example `"as"`
1834
428
  */
1835
- readonly polymorphicPropName: OptionalSchema<StringSchema<undefined>, undefined>;
429
+ readonly polymorphicPropName: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
1836
430
  /**
1837
431
  * @internal
1838
432
  */
1839
- readonly strict: OptionalSchema<BooleanSchema<undefined>, false>;
433
+ readonly strict: valibot.OptionalSchema<valibot.BooleanSchema<undefined>, false>;
1840
434
  /**
1841
435
  * Check both the shape and the import to determine if an API is from React.
1842
436
  * @description This can prevent false positives when using a irrelevant third-party library that has similar APIs to React.
1843
437
  * @default `true`
1844
438
  */
1845
- readonly skipImportCheck: OptionalSchema<BooleanSchema<undefined>, true>;
439
+ readonly skipImportCheck: valibot.OptionalSchema<valibot.BooleanSchema<undefined>, true>;
1846
440
  /**
1847
441
  * React version to use, "detect" means auto detect React version from the project's dependencies.
1848
442
  * If `importSource` is specified, an equivalent version of React should be provided here.
1849
443
  * @example `"18.3.1"`
1850
444
  * @default `"detect"`
1851
445
  */
1852
- readonly version: OptionalSchema<StringSchema<undefined>, undefined>;
446
+ readonly version: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
1853
447
  /**
1854
448
  * A object to define additional hooks that are equivalent to the built-in React Hooks.
1855
449
  * @description ESLint React will recognize these aliases as equivalent to the built-in hooks in all its rules.
1856
450
  * @example `{ useEffect: ["useIsomorphicLayoutEffect"] }`
1857
451
  */
1858
- readonly additionalHooks: OptionalSchema<ObjectSchema<{
1859
- readonly use: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1860
- readonly useActionState: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1861
- readonly useCallback: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1862
- readonly useContext: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1863
- readonly useDebugValue: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1864
- readonly useDeferredValue: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1865
- readonly useEffect: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1866
- readonly useFormStatus: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1867
- readonly useId: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1868
- readonly useImperativeHandle: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1869
- readonly useInsertionEffect: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1870
- readonly useLayoutEffect: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1871
- readonly useMemo: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1872
- readonly useOptimistic: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1873
- readonly useReducer: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1874
- readonly useRef: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1875
- readonly useState: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1876
- readonly useSyncExternalStore: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
1877
- readonly useTransition: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
452
+ readonly additionalHooks: valibot.OptionalSchema<valibot.ObjectSchema<{
453
+ readonly use: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
454
+ readonly useActionState: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
455
+ readonly useCallback: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
456
+ readonly useContext: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
457
+ readonly useDebugValue: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
458
+ readonly useDeferredValue: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
459
+ readonly useEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
460
+ readonly useFormStatus: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
461
+ readonly useId: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
462
+ readonly useImperativeHandle: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
463
+ readonly useInsertionEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
464
+ readonly useLayoutEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
465
+ readonly useMemo: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
466
+ readonly useOptimistic: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
467
+ readonly useReducer: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
468
+ readonly useRef: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
469
+ readonly useState: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
470
+ readonly useSyncExternalStore: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
471
+ readonly useTransition: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
1878
472
  }, undefined>, undefined>;
1879
473
  /**
1880
474
  * An array of user-defined components
1881
475
  * @description This is used to inform the ESLint React plugins how to treat these components during checks.
1882
476
  * @example `[{ name: "Link", as: "a", attributes: [{ name: "to", as: "href" }, { name: "rel", defaultValue: "noopener noreferrer" }] }]`
1883
477
  */
1884
- readonly additionalComponents: OptionalSchema<ArraySchema<ObjectSchema<{
478
+ readonly additionalComponents: valibot.OptionalSchema<valibot.ArraySchema<valibot.ObjectSchema<{
1885
479
  /**
1886
480
  * The name of the user-defined component.
1887
481
  * @example
1888
482
  * "Link"
1889
483
  */
1890
- readonly name: StringSchema<undefined>;
484
+ readonly name: valibot.StringSchema<undefined>;
1891
485
  /**
1892
486
  * The name of the built-in component that the user-defined component represents.
1893
487
  * @example
1894
488
  * "a"
1895
489
  */
1896
- readonly as: OptionalSchema<StringSchema<undefined>, undefined>;
490
+ readonly as: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
1897
491
  /**
1898
492
  * Attributes mapping between the user-defined component and the built-in component.
1899
493
  * @example
1900
494
  * `Link` component has a `to` attribute that represents the `href` attribute in the built-in `a` element with a default value of `"/"`.
1901
495
  */
1902
- readonly attributes: OptionalSchema<ArraySchema<ObjectSchema<{
496
+ readonly attributes: valibot.OptionalSchema<valibot.ArraySchema<valibot.ObjectSchema<{
1903
497
  /**
1904
498
  * The name of the prop in the user-defined component.
1905
499
  * @example
1906
500
  * "to"
1907
501
  */
1908
- readonly name: StringSchema<undefined>;
502
+ readonly name: valibot.StringSchema<undefined>;
1909
503
  /**
1910
504
  * The name of the prop in the built-in component.
1911
505
  * @example
1912
506
  * "href"
1913
507
  */
1914
- readonly as: OptionalSchema<StringSchema<undefined>, undefined>;
508
+ readonly as: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
1915
509
  /**
1916
510
  * Whether the prop is controlled or not in the user-defined component.
1917
511
  * @internal
1918
512
  * @example
1919
513
  * `true`
1920
514
  */
1921
- readonly controlled: OptionalSchema<BooleanSchema<undefined>, undefined>;
515
+ readonly controlled: valibot.OptionalSchema<valibot.BooleanSchema<undefined>, undefined>;
1922
516
  /**
1923
517
  * The default value of the prop in the user-defined component.
1924
518
  * @example
1925
519
  * `"/"`
1926
520
  */
1927
- readonly defaultValue: OptionalSchema<StringSchema<undefined>, undefined>;
521
+ readonly defaultValue: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
1928
522
  }, undefined>, undefined>, undefined>;
1929
523
  /**
1930
524
  * The ESQuery selector to select the component precisely.
@@ -1932,7 +526,7 @@ declare const ESLintSettingsSchema: OptionalSchema<ObjectSchema<{
1932
526
  * @example
1933
527
  * `JSXElement:has(JSXAttribute[name.name='component'][value.value='a'])`
1934
528
  */
1935
- readonly selector: OptionalSchema<StringSchema<undefined>, undefined>;
529
+ readonly selector: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
1936
530
  }, undefined>, undefined>, undefined>;
1937
531
  }, undefined>, undefined>;
1938
532
  }, undefined>, {}>;
@@ -2807,7 +1401,7 @@ declare function getSettingsFromContext(context: {
2807
1401
  declare const defineSettings: (settings: ESLintReactSettings) => ESLintReactSettings;
2808
1402
  declare module "@typescript-eslint/utils/ts-eslint" {
2809
1403
  interface SharedConfigurationSettings {
2810
- "react-x"?: Partial<ESLintReactSettings>;
1404
+ ["react-x"]?: Partial<ESLintReactSettings>;
2811
1405
  }
2812
1406
  }
2813
1407