-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.errors.ts
874 lines (789 loc) · 20.9 KB
/
index.errors.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
import { InterpolationOptions, configureHydrateText, hydrateText } from "..";
// Test Id: 538c85cdc1d3a5cf2ae0077f35e2637b
// THROWS Expected 1-3 arguments, but got 0.
hydrateText();
// Test Id: c0b9f39290ad14fc77623be376dfaac2
hydrateText(
"Hello, {username}!",
// THROWS Argument of type '{}' is not assignable to parameter of type 'Record<"username", ValueType>'.
{},
);
// Test Id: 58a3497c15b738181ef24073d786f7d9
hydrateText("Hello, {username}!", {
// THROWS Type 'undefined' is not assignable to type 'ValueType'.
username: undefined,
});
// Test Id: fe4f227e4972390d9994afb20a31710e
hydrateText("Hello, {username}!", {
// THROWS Type 'null' is not assignable to type 'ValueType'.
username: null,
});
// Test Id: fcab2ac81409176546edb81215cb36e3
hydrateText("Hello, {username}!", {
// THROWS Argument of type '{ USER_NAME: string; }' is not assignable to parameter of type 'Record<"username", ValueType>'.
USER_NAME: "John",
});
// Test Id: 4a15b9e240f46eba186c41d0f4664e96
hydrateText("Hello, {username}!", {
username: "John",
// THROWS Argument of type '{ username: string; id: number; }' is not assignable to parameter of type 'Record<"username", ValueType>'.
id: 42,
});
// Test Id: 432b9aa3ca520135b7c26882b8673e3a
hydrateText(
"{firstName} {lastName}",
// THROWS Argument of type '{ firstName: string; }' is not assignable to parameter of type 'Record<"firstName" | "lastName", ValueType>'.
{
firstName: "John",
},
);
// Test Id: 126b3de3b75053ad49d66743f0c8f274
hydrateText(
"{firstName} {lastName}",
// THROWS Argument of type '{ lastName: string; }' is not assignable to parameter of type 'Record<"firstName" | "lastName", ValueType>'.
{
lastName: "Doe",
},
);
// Test Id: ebd0a6612f82a8ed0031d9e059ef0615
hydrateText(
"Active: {isActive}",
// THROWS Argument of type '{}' is not assignable to parameter of type 'Record<"isActive", ValueType>'.
{},
);
// Test Id: 03cb3b83ce958f1812469d094b6cdfae
hydrateText("Active: {isActive}", {
// THROWS Argument of type '{ IS_ACTIVE: boolean; }' is not assignable to parameter of type 'Record<"isActive", ValueType>'.
IS_ACTIVE: true,
});
// Test Id: 0b3f978b784258a5f01b26fc805f9c6e
hydrateText("Active: {isActive}", {
isActive: true,
// THROWS Argument of type '{ isActive: true; id: number; }' is not assignable to parameter of type 'Record<"isActive", ValueType>'.
id: 42,
});
// Test Id: b857c06caab24cdc873168a7aff76206
hydrateText(
"Seconds: {seconds}",
// THROWS Argument of type '{}' is not assignable to parameter of type 'Record<"seconds", ValueType>'.
{},
);
// Test Id: 8e59d5c4458f80f22cc1bb24502ffc99
hydrateText("Seconds: {seconds}", {
// THROWS Argument of type '{ SECONDS: number; }' is not assignable to parameter of type 'Record<"seconds", ValueType>'.
SECONDS: 1_000_000,
});
// Test Id: d92b0750a9e4c02c76844b6744ee2573
hydrateText("Seconds: {seconds}", {
seconds: 1_000_000,
// THROWS Argument of type '{ seconds: number; id: number; }' is not assignable to parameter of type 'Record<"seconds", ValueType>'.
id: 42,
});
// Test Id: 306c99b7df15ec74284c55546c12a78f
hydrateText(
"milliseconds: {milliseconds}",
// THROWS Argument of type '{}' is not assignable to parameter of type 'Record<"milliseconds", ValueType>'.
{},
);
// Test Id: 560e0c8cadd217f0ae283e385ae3c3af
hydrateText("milliseconds: {milliseconds}", {
// THROWS Argument of type '{ MILLISECONDS: bigint; }' is not assignable to parameter of type 'Record<"milliseconds", ValueType>'.
MILLISECONDS: BigInt(9007199254740991),
});
// Test Id: 6f33cc35f75acf0daf730f245d5feb1b
hydrateText("milliseconds: {milliseconds}", {
milliseconds: BigInt(9007199254740991),
// THROWS Argument of type '{ milliseconds: bigint; id: number; }' is not assignable to parameter of type 'Record<"milliseconds", ValueType>'.
id: 42,
});
// Test Id: 3c30106444675dad01d6e308ea5298e5
hydrateText(
"Hello, {{username}}!",
// THROWS Argument of type '{}' is not assignable to parameter of type 'Record<"username", ValueType>'.
{},
);
// Test Id: c8259b5a3f9405752fb2b709ed4fcbc9
hydrateText("Hello, {{username}}!", {
// THROWS Argument of type '{ USER_NAME: string; }' is not assignable to parameter of type 'Record<"username", ValueType>'.
USER_NAME: "John",
});
// Test Id: 600317192a267b2cd4f60e4b75e6ef1e
hydrateText("Hello, {{username}}!", {
username: "John",
// THROWS Argument of type '{ username: string; id: number; }' is not assignable to parameter of type 'Record<"username", ValueType>'.
id: 42,
});
// Test Id: 48795b7f39073c2426d99a61682ae5e7
hydrateText(
"Hello, {username}!",
// THROWS Argument of type '{}' is not assignable to parameter of type 'Record<"username", ValueType>'.
{},
{},
);
// Test Id: a914816d90fad99932117e5456a21aaf
hydrateText(
"Hello, {username}!",
{
username: "John",
},
// THROWS Argument of type '{}' is not assignable to parameter of type 'InterpolationOptions<"{", "}">'.
{},
);
// Test Id: f950113749305f4c4de6fd839b3b1369
hydrateText(
"Hello, undefinedusernameundefined!",
{
username: "John",
},
// THROWS Argument of type '{}' is not assignable to parameter of type 'InterpolationOptions<"{", "}">'.
{},
);
// Test Id: 57e4397507e57f28d1e35f53434bbf37
hydrateText(
"Hello, {username}!",
{
username: "John",
},
// THROWS Argument of type '{ prefix: "{"; }' is not assignable to parameter of type 'InterpolationOptions<"{", "}">'.
{
prefix: "{",
},
);
// Test Id: ad24b69c8825b9b8e1589b644b2a210f
hydrateText(
"Hello, {usernameundefined!",
{
username: "John",
},
// THROWS Argument of type '{ prefix: "{"; }' is not assignable to parameter of type 'InterpolationOptions<"{", "}">'.
{
prefix: "{",
},
);
// Test Id: 09850c180d83e1aad23c5c71759bf52a
hydrateText(
"Hello, {username}!",
{
username: "John",
},
// THROWS Argument of type '{ suffix: "}"; }' is not assignable to parameter of type 'InterpolationOptions<"{", "}">'.
{
suffix: "}",
},
);
// Test Id: f2c4500d7b81642533ff7937559d4c1d
hydrateText(
"Hello, undefinedusername}!",
{
username: "John",
},
// THROWS Argument of type '{ suffix: "}"; }' is not assignable to parameter of type 'InterpolationOptions<"{", "}">'.
{
suffix: "}",
},
);
// Test Id: 0f446ad7b42fc3094ab94e1941a60a7b
hydrateText(
"Hello, {username}!",
// THROWS Argument of type '{}' is not assignable to parameter of type 'Record<"username", ValueType>'.
{},
{
prefix: "{",
suffix: "}",
},
);
// Test Id: 8e5661fb387b52bd5735f01a74973d96
hydrateText(
"Hello, {username}!",
{
// THROWS Argument of type '{ USER_NAME: string; }' is not assignable to parameter of type 'Record<"username", ValueType>'.
USER_NAME: "John",
},
{
prefix: "{",
suffix: "}",
},
);
// Test Id: 5742652cc6a193a17e668bb472a4ff00
hydrateText(
"Hello, {username}!",
{
username: "John",
// THROWS Argument of type '{ username: string; id: number; }' is not assignable to parameter of type 'Record<"username", ValueType>'.
id: 42,
},
{
prefix: "{",
suffix: "}",
},
);
// Test Id: 70c1cba604a5c4ea8eaffc5c732c963b
hydrateText(
"Hello, {{username}}!",
// THROWS Argument of type '{}' is not assignable to parameter of type 'Record<"username", ValueType>'.
{},
{
prefix: "{{",
suffix: "}}",
},
);
// Test Id: 6dc30b8715b383edc7da72be0f0c39bc
hydrateText(
"Hello, {{username}}!",
{
// THROWS Argument of type '{ USER_NAME: string; }' is not assignable to parameter of type 'Record<"username", ValueType>'.
USER_NAME: "John",
},
{
prefix: "{{",
suffix: "}}",
},
);
// Test Id: d1322ac7a747e94a5b2d1a6644261813
hydrateText(
"Hello, {{username}}!",
{
username: "John",
// THROWS Argument of type '{ username: string; id: number; }' is not assignable to parameter of type 'Record<"username", ValueType>'.
id: 42,
},
{
prefix: "{{",
suffix: "}}",
},
);
// Test Id: 019d348956f4a1c679ac5412cd1abf60
hydrateText(
"Hello, ${username}!",
// THROWS Argument of type '{}' is not assignable to parameter of type 'Record<"username", ValueType>'.
{},
{
prefix: "${",
suffix: "}",
},
);
// Test Id: 2b54c91bd343d5dc6844dbeb24600b21
hydrateText(
"Hello, ${username}!",
{
// THROWS Argument of type '{ USER_NAME: string; }' is not assignable to parameter of type 'Record<"username", ValueType>'.
USER_NAME: "John",
},
{
prefix: "${",
suffix: "}",
},
);
// Test Id: fd6dd1e7a9bf66cf8f0033bf0070e175
hydrateText(
"Hello, ${username}!",
{
username: "John",
// THROWS Argument of type '{ username: string; id: number; }' is not assignable to parameter of type 'Record<"username", ValueType>'.
id: 42,
},
{
prefix: "${",
suffix: "}",
},
);
// Test Id: 12a32a5b6289285455b978bccb3160ca
hydrateText(
":firstName: :lastName:",
// THROWS Argument of type '{}' is not assignable to parameter of type 'Record<"firstName" | "lastName", ValueType>'.
{},
{
prefix: ":",
suffix: ":",
},
);
// Test Id: 8fbb51b6cb87f8efaccbf1efe4e40792
hydrateText(
":firstName: :lastName:",
// THROWS Argument of type '{ firstName: string; }' is not assignable to parameter of type 'Record<"firstName" | "lastName", ValueType>'.
{
firstName: "John",
},
{
prefix: ":",
suffix: ":",
},
);
// Test Id: e27328ae9324195ae0d56f654846f8df
hydrateText(
":firstName: :lastName:",
// THROWS Argument of type '{ lastName: string; }' is not assignable to parameter of type 'Record<"firstName" | "lastName", ValueType>'.
{
lastName: "Doe",
},
{
prefix: ":",
suffix: ":",
},
);
// Test Id: 93b1ffde814c82af41354cbb408fe758
hydrateText(
":firstName: :lastName:",
{
firstName: "John",
lastName: "Doe",
// THROWS Argument of type '{ firstName: string; lastName: string; id: number; }' is not assignable to parameter of type 'Record<"firstName" | "lastName", ValueType>'.
id: 42,
},
{
prefix: ":",
suffix: ":",
},
);
// Test Id: dca4da146c2a1a3151758d3a489cf625
hydrateText(
"/user/:id",
// THROWS Argument of type '{}' is not assignable to parameter of type 'Record<"id", ValueType>'.
{},
{
prefix: ":",
suffix: "",
},
);
// Test Id: f24a61461b3a53a54c3f8be983a36e9b
hydrateText(
"/user/:id",
{
// THROWS Argument of type '{ ID: number; }' is not assignable to parameter of type 'Record<"id", ValueType>'.
ID: 42,
},
{
prefix: ":",
suffix: "",
},
);
// Test Id: 23d33d2b73409e7e0ad781c6fe9d2f0f
hydrateText(
"/user/:id",
{
id: 42,
// THROWS Argument of type '{ id: number; username: string; }' is not assignable to parameter of type 'Record<"id", ValueType>'.
username: "John",
},
{
prefix: ":",
suffix: "",
},
);
// Test Id: 2fc2c3180c1d6d00f46b61de4da70490
hydrateText(
"/user/:id:username",
// THROWS Argument of type '{}' is not assignable to parameter of type 'Record<"username" | "id", ValueType>'.
{},
{
prefix: ":",
suffix: "",
},
);
// Test Id: 3cd3cb9b568dfc4278706a1b9a3569be
hydrateText(
"/user/:id:username",
// THROWS Argument of type '{ id: number; }' is not assignable to parameter of type 'Record<"username" | "id", ValueType>'.
{
id: 42,
},
{
prefix: ":",
suffix: "",
},
);
// Test Id: 77fe5fa145abed7db81f53a7bcfef672
hydrateText(
"/user/:id:username",
// THROWS Argument of type '{ username: string; }' is not assignable to parameter of type 'Record<"username" | "id", ValueType>'.
{
username: "John",
},
{
prefix: ":",
suffix: "",
},
);
// Test Id: c2fc6a631abb5bc533ffa79ce8c424d3
hydrateText(
"/user/:id:username",
{
id: 42,
username: "John",
// THROWS Argument of type '{ id: number; username: string; isActive: boolean; }' is not assignable to parameter of type 'Record<"username" | "id", ValueType>'.
isActive: true,
},
{
prefix: ":",
suffix: "",
},
);
// Test Id: f8c0e7dfd3c704d8d2cbf87ea79eb7f3
hydrateText(
"username: - Software Engineer",
// THROWS Argument of type '{}' is not assignable to parameter of type 'Record<"username", ValueType>'.
{},
{
prefix: "",
suffix: ":",
},
);
// Test Id: 5d64c1ca0bd22edf1fbd4ee4082851aa
hydrateText(
"username: - Software Engineer",
{
// THROWS Argument of type '{ USER_NAME: string; }' is not assignable to parameter of type 'Record<"username", ValueType>'.
USER_NAME: "John",
},
{
prefix: "",
suffix: ":",
},
);
// Test Id: 2799c5011a9c8c8ce494f684c2363a62
hydrateText(
"username: - Software Engineer",
{
username: "John",
// THROWS Argument of type '{ username: string; id: number; }' is not assignable to parameter of type 'Record<"username", ValueType>'.
id: 42,
},
{
prefix: "",
suffix: ":",
},
);
// Test Id: f15576c900a23aece67b8790f75d5c5b
hydrateText(
"user",
// THROWS Argument of type '{}' is not assignable to parameter of type 'Record<"u" | "s" | "e" | "r", ValueType>'.
{},
{
prefix: "",
suffix: "",
},
);
// Test Id: b4395ed60e6df24fcaf8c64a73506564
hydrateText(
"user",
// THROWS Argument of type '{ u: string; }' is not assignable to parameter of type 'Record<"u" | "s" | "e" | "r", ValueType>'.
{
u: "{U}",
},
{
prefix: "",
suffix: "",
},
);
// Test Id: 5301902ac4bc03f4d189138ff78aa7dd
hydrateText(
"user",
// THROWS Argument of type '{ u: string; s: string; }' is not assignable to parameter of type 'Record<"u" | "s" | "e" | "r", ValueType>'.
{
u: "{U}",
s: "<S>",
},
{
prefix: "",
suffix: "",
},
);
// Test Id: 629e103c775ff70bf24e4ce8d895dfc6
hydrateText(
"user",
{
u: "{U}",
s: "<S>",
e: "(E)",
r: "[R]",
// THROWS Argument of type '{ u: string; s: string; e: string; r: string; x: string; }' is not assignable to parameter of type 'Record<"u" | "s" | "e" | "r", ValueType>'.
x: "-X-",
},
{
prefix: "",
suffix: "",
},
);
// Test Id: 62f126044c723f6c33cf0b3e4b49cd1e
hydrateText<"/user/:id/:username/", ":", "/">(
"/user/:id/:username/",
// THROWS Argument of type '{}' is not assignable to parameter of type 'Record<"username" | "id", ValueType>'.
{},
{
prefix: ":",
suffix: "",
},
);
// Test Id: 9e145f684808799c252a3b9dcc83b0a8
hydrateText<"/user/:id/:username/", ":", "/">(
"/user/:id/:username/",
// THROWS Argument of type '{ id: number; }' is not assignable to parameter of type 'Record<"username" | "id", ValueType>'.
{
id: 42,
},
{
prefix: ":",
suffix: "",
},
);
// Test Id: 1d183b36f9bebd6611286603ac6ea03f
hydrateText<"/user/:id/:username/", ":", "/">(
"/user/:id/:username/",
// THROWS Argument of type '{ username: string; }' is not assignable to parameter of type 'Record<"username" | "id", ValueType>'.
{
username: "John",
},
{
prefix: ":",
suffix: "",
},
);
// Test Id: b4b07415edd487c532b4390271acba48
hydrateText<"/user/:id/:username/", ":", "/">(
"/user/:id/:username/",
{
id: 42,
username: "John",
// THROWS Argument of type '{ id: number; username: string; isActive: boolean; }' is not assignable to parameter of type 'Record<"username" | "id", ValueType>'.
isActive: true,
},
{
prefix: ":",
suffix: "",
},
);
// Test Id: 262e61bc664f60e8aeb5b3112da513a1
hydrateText<"/user/:id/:username/", ":", "/">(
"/user/:id/:username/",
{
id: 42,
username: "John",
},
{
prefix: ":",
// THROWS Type '""' is not assignable to type '"/"'.
suffix: "",
},
);
// Test Id: bea0800f7db8cac5f8bc89cf890f8c98
hydrateText<"/user/:id/:username/", ":", "/">(
"/user/:id/:username/",
// THROWS Argument of type '{}' is not assignable to parameter of type 'Record<"username" | "id", ValueType>'.
{},
{
prefix: ":",
suffix: "",
} as unknown as InterpolationOptions<":", "/">,
);
// Test Id: 210ad704a05d205283be9bd851ee9da8
hydrateText<"/user/:id/:username/", ":", "/">(
"/user/:id/:username/",
// THROWS Argument of type '{ id: number; }' is not assignable to parameter of type 'Record<"username" | "id", ValueType>'.
{
id: 42,
},
{
prefix: ":",
suffix: "",
} as unknown as InterpolationOptions<":", "/">,
);
// Test Id: b7e74a2db86e541d3dad8fdb361b73d5
hydrateText<"/user/:id/:username/", ":", "/">(
"/user/:id/:username/",
// THROWS Argument of type '{ username: string; }' is not assignable to parameter of type 'Record<"username" | "id", ValueType>'.
{
username: "John",
},
{
prefix: ":",
suffix: "",
} as unknown as InterpolationOptions<":", "/">,
);
// Test Id: cd001933ed729c3509d23b847c266c75
hydrateText<"/user/:id/:username/", ":", "/">(
"/user/:id/:username/",
{
id: 42,
username: "John",
// THROWS Argument of type '{ id: number; username: string; isActive: boolean; }' is not assignable to parameter of type 'Record<"username" | "id", ValueType>'.
isActive: true,
},
{
prefix: ":",
suffix: "",
} as unknown as InterpolationOptions<":", "/">,
);
const hydrateRoute = configureHydrateText({
prefix: ":",
suffix: "",
});
// Test Id: 318796ae08e53e90f10ed2d5dfa737f6
// THROWS Expected 1-3 arguments, but got 0.
hydrateRoute();
// Test Id: 4f4fd053c4fea88c9b5986fa6e78571c
hydrateRoute(
"/user/:id",
// THROWS Argument of type '{}' is not assignable to parameter of type 'Record<"id", ValueType>'.
{},
);
// Test Id: bbd65218fd0703080e2709b24364df2b
hydrateRoute("/user/:id", {
// THROWS Argument of type '{ ID: number; }' is not assignable to parameter of type 'Record<"id", ValueType>'.
ID: 42,
});
// Test Id: 6cd689e4ed7bc823683d994ebb393757
hydrateRoute("/user/:id", {
id: 42,
// THROWS Argument of type '{ id: number; username: string; }' is not assignable to parameter of type 'Record<"id", ValueType>'.
username: "John",
});
// Test Id: e95f207e9eaa2b21feaff941f6cd7038
hydrateRoute(
"/user/:id:username",
// THROWS Argument of type '{}' is not assignable to parameter of type 'Record<"username" | "id", ValueType>'.
{},
);
// Test Id: ea721ecccc2112a68ad21d47d240777a
hydrateRoute(
"/user/:id:username",
// THROWS Argument of type '{ username: string; }' is not assignable to parameter of type 'Record<"username" | "id", ValueType>'.
{
username: "John",
},
);
// Test Id: 38bb62fb4be465bc27a6bd5c0299bb52
hydrateRoute(
"/user/:id:username",
// THROWS Argument of type '{ id: number; }' is not assignable to parameter of type 'Record<"username" | "id", ValueType>'.
{
id: 42,
},
);
// Test Id: 8a1ca67b89dab1a7bdbd3a1cd1b0d1ed
hydrateRoute("/user/:id:username", {
id: 42,
username: "John",
// THROWS Argument of type '{ id: number; username: string; isActive: boolean; }' is not assignable to parameter of type 'Record<"username" | "id", ValueType>'.
isActive: true,
});
// Test Id: 92b41b81af940608db31d005741a6c6c
hydrateRoute(
"/user/(id)",
// THROWS Argument of type '{}' is not assignable to parameter of type 'Record<"id", ValueType>'.
{},
{
prefix: "(",
suffix: ")",
},
);
// Test Id: 823c18ebf1669a4d28a85355c563c3c3
hydrateRoute(
"/user/(id)",
{
// THROWS Argument of type '{ ID: number; }' is not assignable to parameter of type 'Record<"id", ValueType>'.
ID: 42,
},
{
prefix: "(",
suffix: ")",
},
);
// Test Id: 5e49f161e48aa13c6360ca4cc3bf535d
hydrateRoute(
"/user/(id)",
{
id: 42,
// THROWS Argument of type '{ id: number; username: string; }' is not assignable to parameter of type 'Record<"id", ValueType>'.
username: "John",
},
{
prefix: "(",
suffix: ")",
},
);
// Test Id: d7e87174c35b0a36b6edf7683372eccd
hydrateRoute(
"/user/(id",
{
id: 42,
},
// THROWS Argument of type '{ prefix: "("; }' is not assignable to parameter of type 'InterpolationOptions<"(", "">'.
{
prefix: "(",
},
);
// Test Id: dea3dc9c2eed148b9535cbdde3835a43
hydrateRoute(
"/user/(idundefined",
{
// THROWS Argument of type '{ id: number; }' is not assignable to parameter of type 'Record<"idundefined", ValueType>'.
id: 42,
},
{
prefix: "(",
},
);
// Test Id: 0715c3ceaa37e39b9b2d9ebf4c5b6c76
hydrateRoute(
"/user/:id)",
{
id: 42,
},
// THROWS Argument of type '{ suffix: ")"; }' is not assignable to parameter of type 'InterpolationOptions<":", ")">'.
{
suffix: ")",
},
);
// Test Id: 844652a9cccbb162634eedc03161bcae
hydrateRoute(
"/user/undefinedid)",
{
id: 42,
},
// THROWS Argument of type '{ suffix: ")"; }' is not assignable to parameter of type 'InterpolationOptions<":", ")">'.
{
suffix: ")",
},
);
const replaceLetters = configureHydrateText({
prefix: "",
suffix: "",
});
// Test Id: bf02495a5023dea7a9f35e7849b2ba1c
replaceLetters(
"user",
// THROWS Argument of type '{}' is not assignable to parameter of type 'Record<"u" | "s" | "e" | "r", ValueType>'.
{},
);
// Test Id: f4460942636b17ae0beaa197dc5cb8ab
replaceLetters(
"user",
// THROWS Argument of type '{ u: string; }' is not assignable to parameter of type 'Record<"u" | "s" | "e" | "r", ValueType>'.
{
u: "{U}",
},
);
// Test Id: e90c03a47d7cbc56fb2f5dd44bebe162
replaceLetters(
"user",
// THROWS Argument of type '{ u: string; s: string; }' is not assignable to parameter of type 'Record<"u" | "s" | "e" | "r", ValueType>'.
{
u: "{U}",
s: "<S>",
},
);
// Test Id: 6001dba4f00a338fc6409af6788b0879
replaceLetters("user", {
u: "{U}",
s: "<S>",
e: "(E)",
r: "[R]",
// THROWS Argument of type '{ u: string; s: string; e: string; r: string; x: string; }' is not assignable to parameter of type 'Record<"u" | "s" | "e" | "r", ValueType>'.
x: "-X-",
});
// Test Id: 0c34709647d14c5f9a00631b75fbbfe1
replaceLetters(
"{s}{o}{m}{e}{ }{v}{er}{y}{,}{ v}{ery}{ l}{on}{g}{ t}{ex}{t}",
// THROWS Argument of type '{}' is not assignable to parameter of type 'Record<"{" | "}" | "g" | " " | "s" | "e" | "r" | "x" | "o" | "m" | "v" | "y" | "," | "l" | "n" | "t", ValueType>'.
{},
);