File size: 161,808 Bytes
31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 31e8457 52e57a3 | 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 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 | import { RandomGenerator as RandomGenerator$1 } from "pure-rand/types/RandomGenerator";
import { JumpableRandomGenerator } from "pure-rand/types/JumpableRandomGenerator";
//#region src/check/precondition/Pre.d.ts
/**
* Add pre-condition checks inside a property execution
* @param expectTruthy - cancel the run whenever this value is falsy
* @remarks Since 1.3.0
* @public
*/
declare function pre(expectTruthy: boolean): asserts expectTruthy;
//#endregion
//#region src/random/generator/RandomGenerator.d.ts
interface RandomGenerator7x {
clone(): RandomGenerator7x;
next(): [number, RandomGenerator7x];
jump?(): RandomGenerator7x;
unsafeNext(): number;
unsafeJump?(): void;
getState(): readonly number[];
}
/**
* Merged type supporting both pure-rand v7 and v8 random generators.
* Keeping compatibility with v7 avoids a breaking API change and a new major version.
* @remarks Since 4.6.0
* @public
*/
type RandomGenerator = RandomGenerator7x | RandomGenerator$1 | JumpableRandomGenerator;
//#endregion
//#region src/random/generator/Random.d.ts
/**
* Wrapper around an instance of a `pure-rand`'s random number generator
* offering a simpler interface to deal with random with impure patterns
*
* @public
*/
declare class Random {
/**
* Create a mutable random number generator by cloning the passed one and mutate it
* @param sourceRng - Immutable random generator from pure-rand library, will not be altered (a clone will be)
*/
constructor(sourceRng: RandomGenerator);
/**
* Clone the random number generator
*/
clone(): Random;
/**
* Generate an integer having `bits` random bits
* @param bits - Number of bits to generate
* @deprecated Prefer {@link nextInt} with explicit bounds: `nextInt(0, (1 << bits) - 1)`
*/
next(bits: number): number;
/**
* Generate a random boolean
*/
nextBoolean(): boolean;
/**
* Generate a random integer (32 bits)
* @deprecated Prefer {@link nextInt} with explicit bounds: `nextInt(-2147483648, 2147483647)`
*/
nextInt(): number;
/**
* Generate a random integer between min (included) and max (included)
* @param min - Minimal integer value
* @param max - Maximal integer value
*/
nextInt(min: number, max: number): number;
/**
* Generate a random bigint between min (included) and max (included)
* @param min - Minimal bigint value
* @param max - Maximal bigint value
*/
nextBigInt(min: bigint, max: bigint): bigint;
/**
* Generate a random floating point number between 0.0 (included) and 1.0 (excluded)
*/
nextDouble(): number;
/**
* Extract the internal state of the internal RandomGenerator backing the current instance of Random
*/
getState(): readonly number[] | undefined;
}
//#endregion
//#region src/stream/Stream.d.ts
/**
* Wrapper around `IterableIterator` interface
* offering a set of helpers to deal with iterations in a simple way
*
* @remarks Since 0.0.7
* @public
*/
declare class Stream<T> implements IterableIterator<T> {
/** @internal */ private readonly g;
/**
* Create an empty stream of T
* @remarks Since 0.0.1
*/
static nil<T>(): Stream<T>;
/**
* Create a stream of T from a variable number of elements
*
* @param elements - Elements used to create the Stream
* @remarks Since 2.12.0
*/
static of<T>(...elements: T[]): Stream<T>;
/**
* Create a Stream based on `g`
* @param g - Underlying data of the Stream
*/
constructor(g: IterableIterator<T>);
next(): IteratorResult<T>;
[Symbol.iterator](): IterableIterator<T>;
/**
* Map all elements of the Stream using `f`
*
* WARNING: It closes the current stream
*
* @param f - Mapper function
* @remarks Since 0.0.1
*/
map<U>(f: (v: T) => U): Stream<U>;
/**
* Flat map all elements of the Stream using `f`
*
* WARNING: It closes the current stream
*
* @param f - Mapper function
* @remarks Since 0.0.1
*/
flatMap<U>(f: (v: T) => IterableIterator<U>): Stream<U>;
/**
* Drop elements from the Stream while `f(element) === true`
*
* WARNING: It closes the current stream
*
* @param f - Drop condition
* @remarks Since 0.0.1
*/
dropWhile(f: (v: T) => boolean): Stream<T>;
/**
* Drop `n` first elements of the Stream
*
* WARNING: It closes the current stream
*
* @param n - Number of elements to drop
* @remarks Since 0.0.1
*/
drop(n: number): Stream<T>;
/**
* Take elements from the Stream while `f(element) === true`
*
* WARNING: It closes the current stream
*
* @param f - Take condition
* @remarks Since 0.0.1
*/
takeWhile(f: (v: T) => boolean): Stream<T>;
/**
* Take `n` first elements of the Stream
*
* WARNING: It closes the current stream
*
* @param n - Number of elements to take
* @remarks Since 0.0.1
*/
take(n: number): Stream<T>;
/**
* Filter elements of the Stream
*
* WARNING: It closes the current stream
*
* @param f - Elements to keep
* @remarks Since 1.23.0
*/
filter<U extends T>(f: (v: T) => v is U): Stream<U>;
/**
* Filter elements of the Stream
*
* WARNING: It closes the current stream
*
* @param f - Elements to keep
* @remarks Since 0.0.1
*/
filter(f: (v: T) => boolean): Stream<T>;
/**
* Check whether all elements of the Stream are successful for `f`
*
* WARNING: It closes the current stream
*
* @param f - Condition to check
* @remarks Since 0.0.1
*/
every(f: (v: T) => boolean): boolean;
/**
* Check whether one of the elements of the Stream is successful for `f`
*
* WARNING: It closes the current stream
*
* @param f - Condition to check
* @remarks Since 0.0.1
*/
has(f: (v: T) => boolean): [boolean, T | null];
/**
* Join `others` Stream to the current Stream
*
* WARNING: It closes the current stream and the other ones (as soon as it iterates over them)
*
* @param others - Streams to join to the current Stream
* @remarks Since 0.0.1
*/
join(...others: IterableIterator<T>[]): Stream<T>;
/**
* Take the `nth` element of the Stream of the last (if it does not exist)
*
* WARNING: It closes the current stream
*
* @param nth - Position of the element to extract
* @remarks Since 0.0.12
*/
getNthOrLast(nth: number): T | null;
}
/**
* Create a Stream based on `g`
*
* @param g - Underlying data of the Stream
*
* @remarks Since 0.0.7
* @public
*/
declare function stream<T>(g: IterableIterator<T>): Stream<T>;
//#endregion
//#region src/check/arbitrary/definition/Value.d.ts
/**
* A `Value<T, TShrink = T>` holds an internal value of type `T`
* and its associated context
*
* @remarks Since 3.0.0 (previously called `NextValue` in 2.15.0)
* @public
*/
declare class Value<T> {
/**
* State storing the result of hasCloneMethod
* If `true` the value will be cloned each time it gets accessed
* @remarks Since 2.15.0
*/
readonly hasToBeCloned: boolean;
/**
* Safe value of the shrinkable
* Depending on `hasToBeCloned` it will either be `value_` or a clone of it
* @remarks Since 2.15.0
*/
readonly value: T;
/**
* Internal value of the shrinkable
* @remarks Since 2.15.0
*/
readonly value_: T;
/**
* Context for the generated value
* TODO - Do we want to clone it too?
* @remarks 2.15.0
*/
readonly context: unknown;
/**
* @param value_ - Internal value of the shrinkable
* @param context - Context associated to the generated value (useful for shrink)
* @param customGetValue - Limited to internal usages (to ease migration to next), it will be removed on next major
*/
constructor(value_: T, context: unknown, customGetValue?: () => T);
}
//#endregion
//#region src/check/arbitrary/definition/Arbitrary.d.ts
/**
* Abstract class able to generate values on type `T`
*
* The values generated by an instance of Arbitrary can be previewed - with {@link sample} - or classified - with {@link statistics}.
*
* @remarks Since 0.0.7
* @public
*/
declare abstract class Arbitrary<T> {
/**
* Generate a value of type `T` along with its context (if any)
* based on the provided random number generator
*
* @param mrng - Random number generator
* @param biasFactor - If taken into account 1 value over biasFactor must be biased. Either integer value greater or equal to 2 (bias) or undefined (no bias)
* @returns Random value of type `T` and its context
*
* @remarks Since 0.0.1 (return type changed in 3.0.0)
*/
abstract generate(mrng: Random, biasFactor: number | undefined): Value<T>;
/**
* Check if a given value could be pass to `shrink` without providing any context.
*
* In general, `canShrinkWithoutContext` is not designed to be called for each `shrink` but rather on very special cases.
* Its usage must be restricted to `canShrinkWithoutContext` or in the rare* contexts of a `shrink` method being called without
* any context. In this ill-formed case of `shrink`, `canShrinkWithoutContext` could be used or called if needed.
*
* *we fall in that case when fast-check is asked to shrink a value that has been provided manually by the user,
* in other words: a value not coming from a call to `generate` or a normal `shrink` with context.
*
* @param value - Value to be assessed
* @returns `true` if and only if the value could have been generated by this instance
*
* @remarks Since 3.0.0
*/
abstract canShrinkWithoutContext(value: unknown): value is T;
/**
* Shrink a value of type `T`, may rely on the context previously provided to shrink efficiently
*
* Must never be called with possibly invalid values and no context without ensuring that such call is legal
* by calling `canShrinkWithoutContext` first on the value.
*
* @param value - The value to shrink
* @param context - Its associated context (the one returned by generate) or `undefined` if no context but `canShrinkWithoutContext(value) === true`
* @returns Stream of shrinks for value based on context (if provided)
*
* @remarks Since 3.0.0
*/
abstract shrink(value: T, context: unknown | undefined): Stream<Value<T>>;
/**
* Create another arbitrary by filtering values against `predicate`
*
* All the values produced by the resulting arbitrary
* satisfy `predicate(value) == true`
*
* Be aware that using filter may highly impact the time required to generate a valid entry
*
* @example
* ```typescript
* const integerGenerator: Arbitrary<number> = ...;
* const evenIntegerGenerator: Arbitrary<number> = integerGenerator.filter(e => e % 2 === 0);
* // new Arbitrary only keeps even values
* ```
*
* @param refinement - Predicate, to test each produced element. Return true to keep the element, false otherwise
* @returns New arbitrary filtered using predicate
*
* @remarks Since 1.23.0
*/
filter<U extends T>(refinement: (t: T) => t is U): Arbitrary<U>;
/**
* Create another arbitrary by filtering values against `predicate`
*
* All the values produced by the resulting arbitrary
* satisfy `predicate(value) == true`
*
* Be aware that using filter may highly impact the time required to generate a valid entry
*
* @example
* ```typescript
* const integerGenerator: Arbitrary<number> = ...;
* const evenIntegerGenerator: Arbitrary<number> = integerGenerator.filter(e => e % 2 === 0);
* // new Arbitrary only keeps even values
* ```
*
* @param predicate - Predicate, to test each produced element. Return true to keep the element, false otherwise
* @returns New arbitrary filtered using predicate
*
* @remarks Since 0.0.1
*/
filter(predicate: (t: T) => boolean): Arbitrary<T>;
/**
* Create another arbitrary by mapping all produced values using the provided `mapper`
* Values produced by the new arbitrary are the result of applying `mapper` value by value
*
* @example
* ```typescript
* const rgbChannels: Arbitrary<{r:number,g:number,b:number}> = ...;
* const color: Arbitrary<string> = rgbChannels.map(ch => `#${(ch.r*65536 + ch.g*256 + ch.b).toString(16).padStart(6, '0')}`);
* // transform an Arbitrary producing {r,g,b} integers into an Arbitrary of '#rrggbb'
* ```
*
* @param mapper - Map function, to produce a new element based on an old one
* @param unmapper - Optional unmap function, it will never be used except when shrinking user defined values. Must throw if value is not compatible (since 3.0.0)
* @returns New arbitrary with mapped elements
*
* @remarks Since 0.0.1
*/
map<U>(mapper: (t: T) => U, unmapper?: (possiblyU: unknown) => T): Arbitrary<U>;
/**
* Create another arbitrary by mapping a value from a base Arbirary using the provided `fmapper`
* Values produced by the new arbitrary are the result of the arbitrary generated by applying `fmapper` to a value
* @example
* ```typescript
* const arrayAndLimitArbitrary = fc.nat().chain((c: number) => fc.tuple( fc.array(fc.nat(c)), fc.constant(c)));
* ```
*
* @param chainer - Chain function, to produce a new Arbitrary using a value from another Arbitrary
* @returns New arbitrary of new type
*
* @remarks Since 1.2.0
*/
chain<U>(chainer: (t: T) => Arbitrary<U>): Arbitrary<U>;
}
//#endregion
//#region src/check/precondition/PreconditionFailure.d.ts
/**
* Error type produced whenever a precondition fails
* @remarks Since 2.2.0
* @public
*/
declare class PreconditionFailure extends Error {
readonly interruptExecution: boolean;
constructor(interruptExecution?: boolean);
static isFailure(err: unknown): err is PreconditionFailure;
}
//#endregion
//#region src/check/property/IRawProperty.d.ts
/**
* Represent failures of the property
* @remarks Since 3.0.0
* @public
*/
type PropertyFailure = {
/**
* The original error that has been intercepted.
* Possibly not an instance Error as users can throw anything.
* @remarks Since 3.0.0
*/
error: unknown;
};
/**
* Property
*
* A property is the combination of:
* - Arbitraries: how to generate the inputs for the algorithm
* - Predicate: how to confirm the algorithm succeeded?
*
* @remarks Since 1.19.0
* @public
*/
interface IRawProperty<Ts, IsAsync extends boolean = boolean> {
/**
* Is the property asynchronous?
*
* true in case of asynchronous property, false otherwise
* @remarks Since 0.0.7
*/
isAsync(): IsAsync;
/**
* Generate values of type Ts
*
* @param mrng - Random number generator
* @param runId - Id of the generation, starting at 0 - if set the generation might be biased
*
* @remarks Since 0.0.7 (return type changed in 3.0.0)
*/
generate(mrng: Random, runId?: number): Value<Ts>;
/**
* Shrink value of type Ts
*
* @param value - The value to be shrunk, it can be context-less
*
* @remarks Since 3.0.0
*/
shrink(value: Value<Ts>): Stream<Value<Ts>>;
/**
* Check the predicate for v
* @param v - Value of which we want to check the predicate
* @remarks Since 0.0.7
*/
run(v: Ts): (IsAsync extends true ? Promise<PreconditionFailure | PropertyFailure | null> : never) | (IsAsync extends false ? PreconditionFailure | PropertyFailure | null : never);
/**
* Run before each hook
* @remarks Since 3.4.0
*/
runBeforeEach: () => (IsAsync extends true ? Promise<void> : never) | (IsAsync extends false ? void : never);
/**
* Run after each hook
* @remarks Since 3.4.0
*/
runAfterEach: () => (IsAsync extends true ? Promise<void> : never) | (IsAsync extends false ? void : never);
}
//#endregion
//#region src/arbitrary/_internals/helpers/MaxLengthFromMinLength.d.ts
/**
* The size parameter defines how large the generated values could be.
*
* The default in fast-check is 'small' but it could be increased (resp. decreased)
* to ask arbitraries for larger (resp. smaller) values.
*
* @remarks Since 2.22.0
* @public
*/
type Size = "xsmall" | "small" | "medium" | "large" | "xlarge";
/**
* @remarks Since 2.22.0
* @public
*/
type RelativeSize = "-4" | "-3" | "-2" | "-1" | "=" | "+1" | "+2" | "+3" | "+4";
/**
* Superset of {@link Size} to override the default defined for size
* @remarks Since 2.22.0
* @public
*/
type SizeForArbitrary = RelativeSize | Size | "max" | undefined;
/**
* Superset of {@link Size} to override the default defined for size.
* It can either be based on a numeric value manually selected by the user (not recommended)
* or rely on presets based on size (recommended).
*
* This size will be used to infer a bias to limit the depth, used as follow within recursive structures:
* While going deeper, the bias on depth will increase the probability to generate small instances.
*
* When used with {@link Size}, the larger the size the deeper the structure.
* When used with numeric values, the larger the number (floating point number >= 0),
* the deeper the structure. `+0` means extremelly biased depth meaning barely impossible to generate
* deep structures, while `Number.POSITIVE_INFINITY` means "depth has no impact".
*
* Using `max` or `Number.POSITIVE_INFINITY` is fully equivalent.
*
* @remarks Since 2.25.0
* @public
*/
type DepthSize = RelativeSize | Size | "max" | number | undefined;
//#endregion
//#region src/check/runner/configuration/RandomType.d.ts
/**
* Random generators automatically recognized by the framework
* without having to pass a builder function
* @remarks Since 2.2.0
* @public
*/
type RandomType = "mersenne" | "congruential" | "congruential32" | "xorshift128plus" | "xoroshiro128plus";
//#endregion
//#region src/check/runner/configuration/VerbosityLevel.d.ts
/**
* Verbosity level
* @remarks Since 1.9.1
* @public
*/
declare enum VerbosityLevel {
/**
* Level 0 (default)
*
* Minimal reporting:
* - minimal failing case
* - error log corresponding to the minimal failing case
*
* @remarks Since 1.9.1
*/
None = 0,
/**
* Level 1
*
* Failures reporting:
* - same as `VerbosityLevel.None`
* - list all the failures encountered during the shrinking process
*
* @remarks Since 1.9.1
*/
Verbose = 1,
/**
* Level 2
*
* Execution flow reporting:
* - same as `VerbosityLevel.None`
* - all runs with their associated status displayed as a tree
*
* @remarks Since 1.9.1
*/
VeryVerbose = 2
}
//#endregion
//#region src/check/runner/reporter/ExecutionStatus.d.ts
/**
* Status of the execution of the property
* @remarks Since 1.9.0
* @public
*/
declare enum ExecutionStatus {
Success = 0,
Skipped = -1,
Failure = 1
}
//#endregion
//#region src/check/runner/reporter/ExecutionTree.d.ts
/**
* Summary of the execution process
* @remarks Since 1.9.0
* @public
*/
interface ExecutionTree<Ts> {
/**
* Status of the property
* @remarks Since 1.9.0
*/
status: ExecutionStatus;
/**
* Generated value
* @remarks Since 1.9.0
*/
value: Ts;
/**
* Values derived from this value
* @remarks Since 1.9.0
*/
children: ExecutionTree<Ts>[];
}
//#endregion
//#region src/check/runner/reporter/RunDetails.d.ts
/**
* Post-run details produced by {@link check}
*
* A failing property can easily detected by checking the `failed` flag of this structure
*
* @remarks Since 0.0.7
* @public
*/
type RunDetails<Ts> = RunDetailsFailureProperty<Ts> | RunDetailsFailureTooManySkips<Ts> | RunDetailsFailureInterrupted<Ts> | RunDetailsSuccess<Ts>;
/**
* Run reported as failed because
* the property failed
*
* Refer to {@link RunDetailsCommon} for more details
*
* @remarks Since 1.25.0
* @public
*/
interface RunDetailsFailureProperty<Ts> extends RunDetailsCommon<Ts> {
failed: true;
interrupted: boolean;
counterexample: Ts;
counterexamplePath: string;
errorInstance: unknown;
}
/**
* Run reported as failed because
* too many retries have been attempted to generate valid values
*
* Refer to {@link RunDetailsCommon} for more details
*
* @remarks Since 1.25.0
* @public
*/
interface RunDetailsFailureTooManySkips<Ts> extends RunDetailsCommon<Ts> {
failed: true;
interrupted: false;
counterexample: null;
counterexamplePath: null;
errorInstance: null;
}
/**
* Run reported as failed because
* it took too long and thus has been interrupted
*
* Refer to {@link RunDetailsCommon} for more details
*
* @remarks Since 1.25.0
* @public
*/
interface RunDetailsFailureInterrupted<Ts> extends RunDetailsCommon<Ts> {
failed: true;
interrupted: true;
counterexample: null;
counterexamplePath: null;
errorInstance: null;
}
/**
* Run reported as success
*
* Refer to {@link RunDetailsCommon} for more details
*
* @remarks Since 1.25.0
* @public
*/
interface RunDetailsSuccess<Ts> extends RunDetailsCommon<Ts> {
failed: false;
interrupted: boolean;
counterexample: null;
counterexamplePath: null;
errorInstance: null;
}
/**
* Shared part between variants of RunDetails
* @remarks Since 2.2.0
* @public
*/
interface RunDetailsCommon<Ts> {
/**
* Does the property failed during the execution of {@link check}?
* @remarks Since 0.0.7
*/
failed: boolean;
/**
* Was the execution interrupted?
* @remarks Since 1.19.0
*/
interrupted: boolean;
/**
* Number of runs
*
* - In case of failed property: Number of runs up to the first failure (including the failure run)
* - Otherwise: Number of successful executions
*
* @remarks Since 1.0.0
*/
numRuns: number;
/**
* Number of skipped entries due to failed pre-condition
*
* As `numRuns` it only takes into account the skipped values that occured before the first failure.
* Refer to {@link pre} to add such pre-conditions.
*
* @remarks Since 1.3.0
*/
numSkips: number;
/**
* Number of shrinks required to get to the minimal failing case (aka counterexample)
* @remarks Since 1.0.0
*/
numShrinks: number;
/**
* Seed that have been used by the run
*
* It can be forced in {@link assert}, {@link check}, {@link sample} and {@link statistics} using `Parameters`
* @remarks Since 0.0.7
*/
seed: number;
/**
* In case of failure: the counterexample contains the minimal failing case (first failure after shrinking)
* @remarks Since 0.0.7
*/
counterexample: Ts | null;
/**
* In case of failure: it contains the error that has been thrown if any
* @remarks Since 3.0.0
*/
errorInstance: unknown | null;
/**
* In case of failure: path to the counterexample
*
* For replay purposes, it can be forced in {@link assert}, {@link check}, {@link sample} and {@link statistics} using `Parameters`
*
* @remarks Since 1.0.0
*/
counterexamplePath: string | null;
/**
* List all failures that have occurred during the run
*
* You must enable verbose with at least `Verbosity.Verbose` in `Parameters`
* in order to have values in it
*
* @remarks Since 1.1.0
*/
failures: Ts[];
/**
* Execution summary of the run
*
* Traces the origin of each value encountered during the test and its execution status.
* Can help to diagnose shrinking issues.
*
* You must enable verbose with at least `Verbosity.Verbose` in `Parameters`
* in order to have values in it:
* - Verbose: Only failures
* - VeryVerbose: Failures, Successes and Skipped
*
* @remarks Since 1.9.0
*/
executionSummary: ExecutionTree<Ts>[];
/**
* Verbosity level required by the user
* @remarks Since 1.9.0
*/
verbose: VerbosityLevel;
/**
* Configuration of the run
*
* It includes both local parameters set on {@link check} or {@link assert}
* and global ones specified using {@link configureGlobal}
*
* @remarks Since 1.25.0
*/
runConfiguration: Parameters<Ts>;
}
//#endregion
//#region src/check/runner/configuration/Parameters.d.ts
/**
* Customization of the parameters used to run the properties
* @remarks Since 0.0.6
* @public
*/
interface Parameters<T = void> {
/**
* Initial seed of the generator: `Date.now()` by default
*
* It can be forced to replay a failed run.
*
* In theory, seeds are supposed to be 32-bit integers.
* In case of double value, the seed will be rescaled into a valid 32-bit integer (eg.: values between 0 and 1 will be evenly spread into the range of possible seeds).
*
* @remarks Since 0.0.6
*/
seed?: number;
/**
* Random number generator: `xorshift128plus` by default
*
* Random generator is the core element behind the generation of random values - changing it might directly impact the quality and performances of the generation of random values.
* It can be one of: 'mersenne', 'congruential', 'congruential32', 'xorshift128plus', 'xoroshiro128plus'
* Or any function able to build a `RandomGenerator` based on a seed
*
* As required since pure-rand v6.0.0, when passing a builder for {@link RandomGenerator},
* the random number generator must generate values between -0x80000000 and 0x7fffffff.
*
* @remarks Since 1.6.0
*/
randomType?: RandomType | ((seed: number) => RandomGenerator);
/**
* Number of runs before success: 100 by default
* @remarks Since 1.0.0
*/
numRuns?: number;
/**
* Maximal number of skipped values per run
*
* Skipped is considered globally, so this value is used to compute maxSkips = maxSkipsPerRun * numRuns.
* Runner will consider a run to have failed if it skipped maxSkips+1 times before having generated numRuns valid entries.
*
* See {@link pre} for more details on pre-conditions
*
* @remarks Since 1.3.0
*/
maxSkipsPerRun?: number;
/**
* Maximum time in milliseconds for the predicate to answer: disabled by default
*
* WARNING: Only works for async code (see {@link asyncProperty}), will not interrupt a synchronous code.
* @remarks Since 0.0.11
*/
timeout?: number;
/**
* Skip all runs after a given time limit: disabled by default
*
* NOTE: Relies on `Date.now()`.
*
* NOTE:
* Useful to stop too long shrinking processes.
* Replay capability (see `seed`, `path`) can resume the shrinking.
*
* WARNING:
* It skips runs. Thus test might be marked as failed.
* Indeed, it might not reached the requested number of successful runs.
*
* @remarks Since 1.15.0
*/
skipAllAfterTimeLimit?: number;
/**
* Interrupt test execution after a given time limit: disabled by default
*
* NOTE: Relies on `Date.now()`.
*
* NOTE:
* Useful to avoid having too long running processes in your CI.
* Replay capability (see `seed`, `path`) can still be used if needed.
*
* WARNING:
* If the test got interrupted before any failure occured
* and before it reached the requested number of runs specified by `numRuns`
* it will be marked as success. Except if `markInterruptAsFailure` has been set to `true`
*
* @remarks Since 1.19.0
*/
interruptAfterTimeLimit?: number;
/**
* Mark interrupted runs as failed runs if preceded by one success or more: disabled by default
* Interrupted with no success at all always defaults to failure whatever the value of this flag.
* @remarks Since 1.19.0
*/
markInterruptAsFailure?: boolean;
/**
* Skip runs corresponding to already tried values.
*
* WARNING:
* Discarded runs will be retried. Under the hood they are simple calls to `fc.pre`.
* In other words, if you ask for 100 runs but your generator can only generate 10 values then the property will fail as 100 runs will never be reached.
* Contrary to `ignoreEqualValues` you always have the number of runs you requested.
*
* NOTE: Relies on `fc.stringify` to check the equality.
*
* @remarks Since 2.14.0
*/
skipEqualValues?: boolean;
/**
* Discard runs corresponding to already tried values.
*
* WARNING:
* Discarded runs will not be replaced.
* In other words, if you ask for 100 runs and have 2 discarded runs you will only have 98 effective runs.
*
* NOTE: Relies on `fc.stringify` to check the equality.
*
* @remarks Since 2.14.0
*/
ignoreEqualValues?: boolean;
/**
* Way to replay a failing property directly with the counterexample.
* It can be fed with the counterexamplePath returned by the failing test (requires `seed` too).
* @remarks Since 1.0.0
*/
path?: string;
/**
* Logger (see {@link statistics}): `console.log` by default
* @remarks Since 0.0.6
*/
logger?(v: string): void;
/**
* Force the use of unbiased arbitraries: biased by default
* @remarks Since 1.1.0
*/
unbiased?: boolean;
/**
* Enable verbose mode: {@link VerbosityLevel.None} by default
*
* Using `verbose: true` is equivalent to `verbose: VerbosityLevel.Verbose`
*
* It can prove very useful to troubleshoot issues.
* See {@link VerbosityLevel} for more details on each level.
*
* @remarks Since 1.1.0
*/
verbose?: boolean | VerbosityLevel;
/**
* Custom values added at the beginning of generated ones
*
* It enables users to come with examples they want to test at every run
*
* @remarks Since 1.4.0
*/
examples?: T[];
/**
* Stop run on failure
*
* It makes the run stop at the first encountered failure without shrinking.
*
* When used in complement to `seed` and `path`,
* it replays only the minimal counterexample.
*
* @remarks Since 1.11.0
*/
endOnFailure?: boolean;
/**
* Replace the default reporter handling errors by a custom one
*
* Reporter is responsible to throw in case of failure: default one throws whenever `runDetails.failed` is true.
* But you may want to change this behaviour in yours.
*
* Only used when calling {@link assert}
* Cannot be defined in conjonction with `asyncReporter`
*
* @remarks Since 1.25.0
*/
reporter?: (runDetails: RunDetails<T>) => void;
/**
* Replace the default reporter handling errors by a custom one
*
* Reporter is responsible to throw in case of failure: default one throws whenever `runDetails.failed` is true.
* But you may want to change this behaviour in yours.
*
* Only used when calling {@link assert}
* Cannot be defined in conjonction with `reporter`
* Not compatible with synchronous properties: runner will throw
*
* @remarks Since 1.25.0
*/
asyncReporter?: (runDetails: RunDetails<T>) => Promise<void>;
/**
* By default the Error causing the failure of the predicate will not be directly exposed within the message
* of the Error thown by fast-check. It will be exposed by a cause field attached to the Error.
*
* The Error with cause has been supported by Node since 16.14.0 and is properly supported in many test runners.
*
* But if the original Error fails to appear within your test runner,
* Or if you prefer the Error to be included directly as part of the message of the resulted Error,
* you can toggle this flag and the Error produced by fast-check in case of failure will expose the source Error
* as part of the message and not as a cause.
*/
includeErrorInReport?: boolean;
}
//#endregion
//#region src/check/runner/configuration/GlobalParameters.d.ts
/**
* Type of legal hook function that can be used in the global parameter `beforeEach` and/or `afterEach`
* @remarks Since 2.3.0
* @public
*/
type GlobalPropertyHookFunction = () => void;
/**
* Type of legal hook function that can be used in the global parameter `asyncBeforeEach` and/or `asyncAfterEach`
* @remarks Since 2.3.0
* @public
*/
type GlobalAsyncPropertyHookFunction = (() => Promise<unknown>) | (() => void);
/**
* Type describing the global overrides
* @remarks Since 1.18.0
* @public
*/
type GlobalParameters = Pick<Parameters<unknown>, Exclude<keyof Parameters<unknown>, "path" | "examples">> & {
/**
* Specify a function that will be called before each execution of a property.
* It behaves as-if you manually called `beforeEach` method on all the properties you execute with fast-check.
*
* The function will be used for both {@link fast-check#property} and {@link fast-check#asyncProperty}.
* This global override should never be used in conjunction with `asyncBeforeEach`.
*
* @remarks Since 2.3.0
*/
beforeEach?: GlobalPropertyHookFunction;
/**
* Specify a function that will be called after each execution of a property.
* It behaves as-if you manually called `afterEach` method on all the properties you execute with fast-check.
*
* The function will be used for both {@link fast-check#property} and {@link fast-check#asyncProperty}.
* This global override should never be used in conjunction with `asyncAfterEach`.
*
* @remarks Since 2.3.0
*/
afterEach?: GlobalPropertyHookFunction;
/**
* Specify a function that will be called before each execution of an asynchronous property.
* It behaves as-if you manually called `beforeEach` method on all the asynchronous properties you execute with fast-check.
*
* The function will be used only for {@link fast-check#asyncProperty}. It makes synchronous properties created by {@link fast-check#property} unable to run.
* This global override should never be used in conjunction with `beforeEach`.
*
* @remarks Since 2.3.0
*/
asyncBeforeEach?: GlobalAsyncPropertyHookFunction;
/**
* Specify a function that will be called after each execution of an asynchronous property.
* It behaves as-if you manually called `afterEach` method on all the asynchronous properties you execute with fast-check.
*
* The function will be used only for {@link fast-check#asyncProperty}. It makes synchronous properties created by {@link fast-check#property} unable to run.
* This global override should never be used in conjunction with `afterEach`.
*
* @remarks Since 2.3.0
*/
asyncAfterEach?: GlobalAsyncPropertyHookFunction;
/**
* Define the base size to be used by arbitraries.
*
* By default arbitraries not specifying any size will default to it (except in some cases when used defaultSizeToMaxWhenMaxSpecified is true).
* For some arbitraries users will want to override the default and either define another size relative to this one,
* or a fixed one.
*
* @defaultValue `"small"`
* @remarks Since 2.22.0
*/
baseSize?: Size;
/**
* When set to `true` and if the size has not been defined for this precise instance,
* it will automatically default to `"max"` if the user specified a upper bound for the range
* (applies to length and to depth).
*
* When `false`, the size will be defaulted to `baseSize` even if the user specified
* a upper bound for the range.
*
* @remarks Since 2.22.0
*/
defaultSizeToMaxWhenMaxSpecified?: boolean;
};
/**
* Define global parameters that will be used by all the runners
*
* @example
* ```typescript
* fc.configureGlobal({ numRuns: 10 });
* //...
* fc.assert(
* fc.property(
* fc.nat(), fc.nat(),
* (a, b) => a + b === b + a
* ), { seed: 42 }
* ) // equivalent to { numRuns: 10, seed: 42 }
* ```
*
* @param parameters - Global parameters
*
* @remarks Since 1.18.0
* @public
*/
declare function configureGlobal(parameters: GlobalParameters): void;
/**
* Read global parameters that will be used by runners
* @remarks Since 1.18.0
* @public
*/
declare function readConfigureGlobal(): GlobalParameters;
/**
* Reset global parameters
* @remarks Since 1.18.0
* @public
*/
declare function resetConfigureGlobal(): void;
//#endregion
//#region src/check/property/AsyncProperty.generic.d.ts
/**
* Type of legal hook function that can be used to call `beforeEach` or `afterEach`
* on a {@link IAsyncPropertyWithHooks}
*
* @remarks Since 2.2.0
* @public
*/
type AsyncPropertyHookFunction = ((previousHookFunction: GlobalAsyncPropertyHookFunction) => Promise<unknown>) | ((previousHookFunction: GlobalAsyncPropertyHookFunction) => void);
/**
* Interface for asynchronous property, see {@link IRawProperty}
* @remarks Since 1.19.0
* @public
*/
interface IAsyncProperty<Ts> extends IRawProperty<Ts, true> {}
/**
* Interface for asynchronous property defining hooks, see {@link IAsyncProperty}
* @remarks Since 2.2.0
* @public
*/
interface IAsyncPropertyWithHooks<Ts> extends IAsyncProperty<Ts> {
/**
* Define a function that should be called before all calls to the predicate
* @param hookFunction - Function to be called
* @remarks Since 1.6.0
*/
beforeEach(hookFunction: AsyncPropertyHookFunction): IAsyncPropertyWithHooks<Ts>;
/**
* Define a function that should be called after all calls to the predicate
* @param hookFunction - Function to be called
* @remarks Since 1.6.0
*/
afterEach(hookFunction: AsyncPropertyHookFunction): IAsyncPropertyWithHooks<Ts>;
}
//#endregion
//#region src/check/property/AsyncProperty.d.ts
/**
* Instantiate a new {@link fast-check#IAsyncProperty}
* @param predicate - Assess the success of the property. Would be considered falsy if it throws or if its output evaluates to false
* @remarks Since 0.0.7
* @public
*/
declare function asyncProperty<Ts extends [unknown, ...unknown[]]>(...args: [...arbitraries: { [K in keyof Ts]: Arbitrary<Ts[K]>; }, predicate: (...args: Ts) => Promise<boolean | void>]): IAsyncPropertyWithHooks<Ts>;
//#endregion
//#region src/check/property/Property.generic.d.ts
/**
* Type of legal hook function that can be used to call `beforeEach` or `afterEach`
* on a {@link IPropertyWithHooks}
*
* @remarks Since 2.2.0
* @public
*/
type PropertyHookFunction = (globalHookFunction: GlobalPropertyHookFunction) => void;
/**
* Interface for synchronous property, see {@link IRawProperty}
* @remarks Since 1.19.0
* @public
*/
interface IProperty<Ts> extends IRawProperty<Ts, false> {}
/**
* Interface for synchronous property defining hooks, see {@link IProperty}
* @remarks Since 2.2.0
* @public
*/
interface IPropertyWithHooks<Ts> extends IProperty<Ts> {
/**
* Define a function that should be called before all calls to the predicate
* @param invalidHookFunction - Function to be called, please provide a valid hook function
* @remarks Since 1.6.0
*/
beforeEach(invalidHookFunction: (hookFunction: GlobalPropertyHookFunction) => Promise<unknown>): "beforeEach expects a synchronous function but was given a function returning a Promise";
/**
* Define a function that should be called before all calls to the predicate
* @param hookFunction - Function to be called
* @remarks Since 1.6.0
*/
beforeEach(hookFunction: PropertyHookFunction): IPropertyWithHooks<Ts>;
/**
* Define a function that should be called after all calls to the predicate
* @param invalidHookFunction - Function to be called, please provide a valid hook function
* @remarks Since 1.6.0
*/
afterEach(invalidHookFunction: (hookFunction: GlobalPropertyHookFunction) => Promise<unknown>): "afterEach expects a synchronous function but was given a function returning a Promise";
/**
* Define a function that should be called after all calls to the predicate
* @param hookFunction - Function to be called
* @remarks Since 1.6.0
*/
afterEach(hookFunction: PropertyHookFunction): IPropertyWithHooks<Ts>;
}
//#endregion
//#region src/check/property/Property.d.ts
/**
* Instantiate a new {@link fast-check#IProperty}
* @param predicate - Assess the success of the property. Would be considered falsy if it throws or if its output evaluates to false
* @remarks Since 0.0.1
* @public
*/
declare function property<Ts extends [unknown, ...unknown[]]>(...args: [...arbitraries: { [K in keyof Ts]: Arbitrary<Ts[K]>; }, predicate: (...args: Ts) => boolean | void]): IPropertyWithHooks<Ts>;
//#endregion
//#region src/check/runner/Runner.d.ts
/**
* Run the property, do not throw contrary to {@link assert}
*
* WARNING: Has to be awaited
*
* @param property - Asynchronous property to be checked
* @param params - Optional parameters to customize the execution
*
* @returns Test status and other useful details
*
* @remarks Since 0.0.7
* @public
*/
declare function check<Ts>(property: IAsyncProperty<Ts>, params?: Parameters<Ts>): Promise<RunDetails<Ts>>;
/**
* Run the property, do not throw contrary to {@link assert}
*
* @param property - Synchronous property to be checked
* @param params - Optional parameters to customize the execution
*
* @returns Test status and other useful details
*
* @remarks Since 0.0.1
* @public
*/
declare function check<Ts>(property: IProperty<Ts>, params?: Parameters<Ts>): RunDetails<Ts>;
/**
* Run the property, do not throw contrary to {@link assert}
*
* WARNING: Has to be awaited if the property is asynchronous
*
* @param property - Property to be checked
* @param params - Optional parameters to customize the execution
*
* @returns Test status and other useful details
*
* @remarks Since 0.0.7
* @public
*/
declare function check<Ts>(property: IRawProperty<Ts>, params?: Parameters<Ts>): Promise<RunDetails<Ts>> | RunDetails<Ts>;
/**
* Run the property, throw in case of failure
*
* It can be called directly from describe/it blocks of Mocha.
* No meaningful results are produced in case of success.
*
* WARNING: Has to be awaited
*
* @param property - Asynchronous property to be checked
* @param params - Optional parameters to customize the execution
*
* @remarks Since 0.0.7
* @public
*/
declare function assert<Ts>(property: IAsyncProperty<Ts>, params?: Parameters<Ts>): Promise<void>;
/**
* Run the property, throw in case of failure
*
* It can be called directly from describe/it blocks of Mocha.
* No meaningful results are produced in case of success.
*
* @param property - Synchronous property to be checked
* @param params - Optional parameters to customize the execution
*
* @remarks Since 0.0.1
* @public
*/
declare function assert<Ts>(property: IProperty<Ts>, params?: Parameters<Ts>): void;
/**
* Run the property, throw in case of failure
*
* It can be called directly from describe/it blocks of Mocha.
* No meaningful results are produced in case of success.
*
* WARNING: Returns a promise to be awaited if the property is asynchronous
*
* @param property - Synchronous or asynchronous property to be checked
* @param params - Optional parameters to customize the execution
*
* @remarks Since 0.0.7
* @public
*/
declare function assert<Ts>(property: IRawProperty<Ts>, params?: Parameters<Ts>): Promise<void> | void;
//#endregion
//#region src/check/runner/Sampler.d.ts
/**
* Generate an array containing all the values that would have been generated during {@link assert} or {@link check}
*
* @example
* ```typescript
* fc.sample(fc.nat(), 10); // extract 10 values from fc.nat() Arbitrary
* fc.sample(fc.nat(), {seed: 42}); // extract values from fc.nat() as if we were running fc.assert with seed=42
* ```
*
* @param generator - {@link IProperty} or {@link Arbitrary} to extract the values from
* @param params - Integer representing the number of values to generate or `Parameters` as in {@link assert}
*
* @remarks Since 0.0.6
* @public
*/
declare function sample<Ts>(generator: IRawProperty<Ts> | Arbitrary<Ts>, params?: Parameters<Ts> | number): Ts[];
/**
* Gather useful statistics concerning generated values
*
* Print the result in `console.log` or `params.logger` (if defined)
*
* @example
* ```typescript
* fc.statistics(
* fc.nat(999),
* v => v < 100 ? 'Less than 100' : 'More or equal to 100',
* {numRuns: 1000, logger: console.log});
* // Classify 1000 values generated by fc.nat(999) into two categories:
* // - Less than 100
* // - More or equal to 100
* // The output will be sent line by line to the logger
* ```
*
* @param generator - {@link IProperty} or {@link Arbitrary} to extract the values from
* @param classify - Classifier function that can classify the generated value in zero, one or more categories (with free labels)
* @param params - Integer representing the number of values to generate or `Parameters` as in {@link assert}
*
* @remarks Since 0.0.6
* @public
*/
declare function statistics<Ts>(generator: IRawProperty<Ts> | Arbitrary<Ts>, classify: (v: Ts) => string | string[], params?: Parameters<Ts> | number): void;
//#endregion
//#region src/arbitrary/_internals/builders/GeneratorValueBuilder.d.ts
/**
* Take an arbitrary builder and all its arguments separatly.
* Generate a value out of it.
*
* @remarks Since 3.8.0
* @public
*/
type GeneratorValueFunction = <T, TArgs extends unknown[]>(arb: (...params: TArgs) => Arbitrary<T>, ...args: TArgs) => T;
/**
* The values part is mostly exposed for the purpose of the tests.
* Or if you want to have a custom error formatter for this kind of values.
*
* @remarks Since 3.8.0
* @public
*/
type GeneratorValueMethods = {
values: () => unknown[];
};
/**
* An instance of {@link GeneratorValue} can be leveraged within predicates themselves to produce extra random values
* while preserving part of the shrinking capabilities on the produced values.
*
* It can be seen as a way to start property based testing within something looking closer from what users will
* think about when thinking about random in tests. But contrary to raw random, it comes with many useful strengths
* such as: ability to re-run the test (seeded), shrinking...
*
* @remarks Since 3.8.0
* @public
*/
type GeneratorValue = GeneratorValueFunction & GeneratorValueMethods;
//#endregion
//#region src/arbitrary/gen.d.ts
/**
* Generate values within the test execution itself by leveraging the strength of `gen`
*
* @example
* ```javascript
* fc.assert(
* fc.property(fc.gen(), gen => {
* const size = gen(fc.nat, {max: 10});
* const array = [];
* for (let index = 0 ; index !== size ; ++index) {
* array.push(gen(fc.integer));
* }
* // Here is an array!
* // Note: Prefer fc.array(fc.integer(), {maxLength: 10}) if you want to produce such array
* })
* )
* ```
*
* ⚠️ WARNING:
* While `gen` is easy to use, it may not shrink as well as tailored arbitraries based on `filter` or `map`.
*
* ⚠️ WARNING:
* Additionally it cannot run back the test properly when attempting to replay based on a seed and a path.
* You'll need to limit yourself to the seed and drop the path from the options if you attempt to replay something
* implying it. More precisely, you may keep the very first part of the path but have to drop anything after the
* first ":".
*
* ⚠️ WARNING:
* It also does not support custom examples.
*
* @remarks Since 3.8.0
* @public
*/
declare function gen(): Arbitrary<GeneratorValue>;
//#endregion
//#region src/arbitrary/_internals/helpers/DepthContext.d.ts
/**
* Type used to strongly type instances of depth identifier while keeping internals
* what they contain internally
*
* @remarks Since 2.25.0
* @public
*/
type DepthIdentifier = {} & DepthContext;
/**
* Instance of depth, can be used to alter the depth perceived by an arbitrary
* or to bias your own arbitraries based on the current depth
*
* @remarks Since 2.25.0
* @public
*/
type DepthContext = {
/**
* Current depth (starts at 0, continues with 1, 2...).
* Only made of integer values superior or equal to 0.
*
* Remark: Whenever altering the `depth` during a `generate`, please make sure to ALWAYS
* reset it to its original value before you leave the `generate`. Otherwise the execution
* will imply side-effects that will potentially impact the following runs and make replay
* of the issue barely impossible.
*/
depth: number;
};
/**
* Get back the requested DepthContext
* @remarks Since 2.25.0
* @public
*/
declare function getDepthContextFor(contextMeta: DepthContext | DepthIdentifier | string | undefined): DepthContext;
/**
* Create a new and unique instance of DepthIdentifier
* that can be shared across multiple arbitraries if needed
* @public
*/
declare function createDepthIdentifier(): DepthIdentifier;
//#endregion
//#region src/arbitrary/array.d.ts
/**
* Constraints to be applied on {@link array}
* @remarks Since 2.4.0
* @public
*/
interface ArrayConstraints {
/**
* Lower bound of the generated array size
* @defaultValue 0
* @remarks Since 2.4.0
*/
minLength?: number;
/**
* Upper bound of the generated array size
* @defaultValue 0x7fffffff — _defaulting seen as "max non specified" when `defaultSizeToMaxWhenMaxSpecified=true`_
* @remarks Since 2.4.0
*/
maxLength?: number;
/**
* Define how large the generated values should be (at max)
*
* When used in conjonction with `maxLength`, `size` will be used to define
* the upper bound of the generated array size while `maxLength` will be used
* to define and document the general maximal length allowed for this case.
*
* @remarks Since 2.22.0
*/
size?: SizeForArbitrary;
/**
* When receiving a depth identifier, the arbitrary will impact the depth
* attached to it to avoid going too deep if it already generated lots of items.
*
* In other words, if the number of generated values within the collection is large
* then the generated items will tend to be less deep to avoid creating structures a lot
* larger than expected.
*
* For the moment, the depth is not taken into account to compute the number of items to
* define for a precise generate call of the array. Just applied onto eligible items.
*
* @remarks Since 2.25.0
*/
depthIdentifier?: DepthIdentifier | string;
}
/**
* For arrays of values coming from `arb`
*
* @param arb - Arbitrary used to generate the values inside the array
* @param constraints - Constraints to apply when building instances (since 2.4.0)
*
* @remarks Since 0.0.1
* @public
*/
declare function array<T>(arb: Arbitrary<T>, constraints?: ArrayConstraints): Arbitrary<T[]>;
//#endregion
//#region src/arbitrary/bigInt.d.ts
/**
* Constraints to be applied on {@link bigInt}
* @remarks Since 2.6.0
* @public
*/
interface BigIntConstraints {
/**
* Lower bound for the generated bigints (eg.: -5n, 0n, BigInt(Number.MIN_SAFE_INTEGER))
* @remarks Since 2.6.0
*/
min?: bigint;
/**
* Upper bound for the generated bigints (eg.: -2n, 2147483647n, BigInt(Number.MAX_SAFE_INTEGER))
* @remarks Since 2.6.0
*/
max?: bigint;
}
/**
* For bigint
* @remarks Since 1.9.0
* @public
*/
declare function bigInt(): Arbitrary<bigint>;
/**
* For bigint between min (included) and max (included)
*
* @param min - Lower bound for the generated bigints (eg.: -5n, 0n, BigInt(Number.MIN_SAFE_INTEGER))
* @param max - Upper bound for the generated bigints (eg.: -2n, 2147483647n, BigInt(Number.MAX_SAFE_INTEGER))
*
* @remarks Since 1.9.0
* @public
*/
declare function bigInt(min: bigint, max: bigint): Arbitrary<bigint>;
/**
* For bigint between min (included) and max (included)
*
* @param constraints - Constraints to apply when building instances
*
* @remarks Since 2.6.0
* @public
*/
declare function bigInt(constraints: BigIntConstraints): Arbitrary<bigint>;
/**
* For bigint between min (included) and max (included)
*
* @param args - Either min/max bounds as an object or constraints to apply when building instances
*
* @remarks Since 2.6.0
* @public
*/
declare function bigInt(...args: [] | [bigint, bigint] | [BigIntConstraints]): Arbitrary<bigint>;
//#endregion
//#region src/arbitrary/boolean.d.ts
/**
* For boolean values - `true` or `false`
* @remarks Since 0.0.6
* @public
*/
declare function boolean(): Arbitrary<boolean>;
//#endregion
//#region src/arbitrary/falsy.d.ts
/**
* Constraints to be applied on {@link falsy}
* @remarks Since 1.26.0
* @public
*/
interface FalsyContraints {
/**
* Enable falsy bigint value
* @remarks Since 1.26.0
*/
withBigInt?: boolean;
}
/**
* Typing for values generated by {@link falsy}
* @remarks Since 2.2.0
* @public
*/
type FalsyValue<TConstraints extends FalsyContraints = object> = false | null | 0 | "" | typeof NaN | undefined | (TConstraints extends {
withBigInt: true;
} ? 0n : never);
/**
* For falsy values:
* - ''
* - 0
* - NaN
* - false
* - null
* - undefined
* - 0n (whenever withBigInt: true)
*
* @param constraints - Constraints to apply when building instances
*
* @remarks Since 1.26.0
* @public
*/
declare function falsy<TConstraints extends FalsyContraints>(constraints?: TConstraints): Arbitrary<FalsyValue<TConstraints>>;
//#endregion
//#region src/arbitrary/constant.d.ts
/**
* For `value`
* @param value - The value to produce
* @remarks Since 0.0.1
* @public
*/
declare function constant<const T>(value: T): Arbitrary<T>;
//#endregion
//#region src/arbitrary/constantFrom.d.ts
/**
* For one `...values` values - all equiprobable
*
* **WARNING**: It expects at least one value, otherwise it should throw
*
* @param values - Constant values to be produced (all values shrink to the first one)
*
* @remarks Since 0.0.12
* @public
*/
declare function constantFrom<const T = never>(...values: T[]): Arbitrary<T>;
/**
* For one `...values` values - all equiprobable
*
* **WARNING**: It expects at least one value, otherwise it should throw
*
* @param values - Constant values to be produced (all values shrink to the first one)
*
* @remarks Since 0.0.12
* @public
*/
declare function constantFrom<TArgs extends any[] | [any]>(...values: TArgs): Arbitrary<TArgs[number]>;
//#endregion
//#region src/arbitrary/context.d.ts
/**
* Execution context attached to one predicate run
* @remarks Since 2.2.0
* @public
*/
interface ContextValue {
/**
* Log execution details during a test.
* Very helpful when troubleshooting failures
* @param data - Data to be logged into the current context
* @remarks Since 1.8.0
*/
log(data: string): void;
/**
* Number of logs already logged into current context
* @remarks Since 1.8.0
*/
size(): number;
}
/**
* Produce a {@link ContextValue} instance
* @remarks Since 1.8.0
* @public
*/
declare function context(): Arbitrary<ContextValue>;
//#endregion
//#region src/arbitrary/date.d.ts
/**
* Constraints to be applied on {@link date}
* @remarks Since 3.3.0
* @public
*/
interface DateConstraints {
/**
* Lower bound of the range (included)
* @defaultValue new Date(-8640000000000000)
* @remarks Since 1.17.0
*/
min?: Date;
/**
* Upper bound of the range (included)
* @defaultValue new Date(8640000000000000)
* @remarks Since 1.17.0
*/
max?: Date;
/**
* When set to true, no more "Invalid Date" can be generated.
* @defaultValue false
* @remarks Since 3.13.0
*/
noInvalidDate?: boolean;
}
/**
* For date between constraints.min or new Date(-8640000000000000) (included) and constraints.max or new Date(8640000000000000) (included)
*
* @param constraints - Constraints to apply when building instances
*
* @remarks Since 1.17.0
* @public
*/
declare function date(constraints?: DateConstraints): Arbitrary<Date>;
//#endregion
//#region src/arbitrary/clone.d.ts
/**
* Type of the value produced by {@link clone}
* @remarks Since 2.5.0
* @public
*/
type CloneValue<T, N extends number, Rest extends T[] = []> = [number] extends [N] ? T[] : Rest["length"] extends N ? Rest : CloneValue<T, N, [T, ...Rest]>;
/**
* Clone the values generated by `arb` in order to produce fully equal values (might not be equal in terms of === or ==)
*
* @param arb - Source arbitrary
* @param numValues - Number of values to produce
*
* @remarks Since 2.5.0
* @public
*/
declare function clone<T, N extends number>(arb: Arbitrary<T>, numValues: N): Arbitrary<CloneValue<T, N>>;
//#endregion
//#region src/arbitrary/chainUntil.d.ts
/**
* Build an arbitrary by iteratively chaining arbitraries until the chainer returns undefined.
*
* Starting from a value produced by `startArb`, the `chainer` function is called with the current value
* to produce the next arbitrary. This process repeats until `chainer` returns `undefined`.
* The final value in the chain is the one produced by this arbitrary.
*
* The implementation is fully iterative (non-recursive) and supports shrinking.
*
* @param startArb - The starting arbitrary producing the initial value
* @param chainer - A function called with the current value that returns either the next arbitrary to generate from or undefined to stop the chain
* @returns An arbitrary producing the last value in the chain
*
* @remarks Since 4.8.0
* @public
*/
declare function chainUntil<T>(startArb: Arbitrary<T>, chainer: (prev: T) => Arbitrary<T> | undefined): Arbitrary<T>;
//#endregion
//#region src/arbitrary/dictionary.d.ts
/**
* Constraints to be applied on {@link dictionary}
* @remarks Since 2.22.0
* @public
*/
interface DictionaryConstraints {
/**
* Lower bound for the number of keys defined into the generated instance
* @defaultValue 0
* @remarks Since 2.22.0
*/
minKeys?: number;
/**
* Upper bound for the number of keys defined into the generated instance
* @defaultValue 0x7fffffff — _defaulting seen as "max non specified" when `defaultSizeToMaxWhenMaxSpecified=true`_
* @remarks Since 2.22.0
*/
maxKeys?: number;
/**
* Define how large the generated values should be (at max)
* @remarks Since 2.22.0
*/
size?: SizeForArbitrary;
/**
* Depth identifier can be used to share the current depth between several instances.
*
* By default, if not specified, each instance of dictionary will have its own depth.
* In other words: you can have depth=1 in one while you have depth=100 in another one.
*
* @remarks Since 3.15.0
*/
depthIdentifier?: DepthIdentifier | string;
/**
* Do not generate objects with null prototype
* @defaultValue false
* @remarks Since 3.13.0
*/
noNullPrototype?: boolean;
}
/**
* For dictionaries with keys produced by `keyArb` and values from `valueArb`
*
* @param keyArb - Arbitrary used to generate the keys of the object
* @param valueArb - Arbitrary used to generate the values of the object
*
* @remarks Since 1.0.0
* @public
*/
declare function dictionary<T>(keyArb: Arbitrary<string>, valueArb: Arbitrary<T>, constraints?: DictionaryConstraints): Arbitrary<Record<string, T>>;
/**
* For dictionaries with keys produced by `keyArb` and values from `valueArb`
*
* @param keyArb - Arbitrary used to generate the keys of the object
* @param valueArb - Arbitrary used to generate the values of the object
*
* @remarks Since 4.4.0
* @public
*/
declare function dictionary<K extends PropertyKey, V>(keyArb: Arbitrary<K>, valueArb: Arbitrary<V>, constraints?: DictionaryConstraints): Arbitrary<Record<K, V>>;
//#endregion
//#region src/arbitrary/emailAddress.d.ts
/**
* Constraints to be applied on {@link emailAddress}
* @remarks Since 2.22.0
* @public
*/
interface EmailAddressConstraints {
/**
* Define how large the generated values should be (at max)
* @remarks Since 2.22.0
*/
size?: Exclude<SizeForArbitrary, "max">;
}
/**
* For email address
*
* According to {@link https://www.ietf.org/rfc/rfc2821.txt | RFC 2821},
* {@link https://www.ietf.org/rfc/rfc3696.txt | RFC 3696} and
* {@link https://www.ietf.org/rfc/rfc5322.txt | RFC 5322}
*
* @param constraints - Constraints to apply when building instances (since 2.22.0)
*
* @remarks Since 1.14.0
* @public
*/
declare function emailAddress(constraints?: EmailAddressConstraints): Arbitrary<string>;
//#endregion
//#region src/arbitrary/double.d.ts
/**
* Constraints to be applied on {@link double}
* @remarks Since 2.6.0
* @public
*/
interface DoubleConstraints {
/**
* Lower bound for the generated 64-bit floats (included, see minExcluded to exclude it)
* @defaultValue Number.NEGATIVE_INFINITY, -1.7976931348623157e+308 when noDefaultInfinity is true
* @remarks Since 2.8.0
*/
min?: number;
/**
* Should the lower bound (aka min) be excluded?
* Note: Excluding min=Number.NEGATIVE_INFINITY would result into having min set to -Number.MAX_VALUE.
* @defaultValue false
* @remarks Since 3.12.0
*/
minExcluded?: boolean;
/**
* Upper bound for the generated 64-bit floats (included, see maxExcluded to exclude it)
* @defaultValue Number.POSITIVE_INFINITY, 1.7976931348623157e+308 when noDefaultInfinity is true
* @remarks Since 2.8.0
*/
max?: number;
/**
* Should the upper bound (aka max) be excluded?
* Note: Excluding max=Number.POSITIVE_INFINITY would result into having max set to Number.MAX_VALUE.
* @defaultValue false
* @remarks Since 3.12.0
*/
maxExcluded?: boolean;
/**
* By default, lower and upper bounds are -infinity and +infinity.
* By setting noDefaultInfinity to true, you move those defaults to minimal and maximal finite values.
* @defaultValue false
* @remarks Since 2.8.0
*/
noDefaultInfinity?: boolean;
/**
* When set to true, no more Number.NaN can be generated.
* @defaultValue false
* @remarks Since 2.8.0
*/
noNaN?: boolean;
/**
* When set to true, Number.isInteger(value) will be false for any generated value.
* Note: -infinity and +infinity, or NaN can stil be generated except if you rejected them via another constraint.
* @defaultValue false
* @remarks Since 3.18.0
*/
noInteger?: boolean;
}
/**
* For 64-bit floating point numbers:
* - sign: 1 bit
* - significand: 52 bits
* - exponent: 11 bits
*
* @param constraints - Constraints to apply when building instances (since 2.8.0)
*
* @remarks Since 0.0.6
* @public
*/
declare function double(constraints?: DoubleConstraints): Arbitrary<number>;
//#endregion
//#region src/arbitrary/float.d.ts
/**
* Constraints to be applied on {@link float}
* @remarks Since 2.6.0
* @public
*/
interface FloatConstraints {
/**
* Lower bound for the generated 32-bit floats (included)
* @defaultValue Number.NEGATIVE_INFINITY, -3.4028234663852886e+38 when noDefaultInfinity is true
* @remarks Since 2.8.0
*/
min?: number;
/**
* Should the lower bound (aka min) be excluded?
* Note: Excluding min=Number.NEGATIVE_INFINITY would result into having min set to -3.4028234663852886e+38.
* @defaultValue false
* @remarks Since 3.12.0
*/
minExcluded?: boolean;
/**
* Upper bound for the generated 32-bit floats (included)
* @defaultValue Number.POSITIVE_INFINITY, 3.4028234663852886e+38 when noDefaultInfinity is true
* @remarks Since 2.8.0
*/
max?: number;
/**
* Should the upper bound (aka max) be excluded?
* Note: Excluding max=Number.POSITIVE_INFINITY would result into having max set to 3.4028234663852886e+38.
* @defaultValue false
* @remarks Since 3.12.0
*/
maxExcluded?: boolean;
/**
* By default, lower and upper bounds are -infinity and +infinity.
* By setting noDefaultInfinity to true, you move those defaults to minimal and maximal finite values.
* @defaultValue false
* @remarks Since 2.8.0
*/
noDefaultInfinity?: boolean;
/**
* When set to true, no more Number.NaN can be generated.
* @defaultValue false
* @remarks Since 2.8.0
*/
noNaN?: boolean;
/**
* When set to true, Number.isInteger(value) will be false for any generated value.
* Note: -infinity and +infinity, or NaN can stil be generated except if you rejected them via another constraint.
* @defaultValue false
* @remarks Since 3.18.0
*/
noInteger?: boolean;
}
/**
* For 32-bit floating point numbers:
* - sign: 1 bit
* - significand: 23 bits
* - exponent: 8 bits
*
* The smallest non-zero value (in absolute value) that can be represented by such float is: 2 ** -126 * 2 ** -23.
* And the largest one is: 2 ** 127 * (1 + (2 ** 23 - 1) / 2 ** 23).
*
* @param constraints - Constraints to apply when building instances (since 2.8.0)
*
* @remarks Since 0.0.6
* @public
*/
declare function float(constraints?: FloatConstraints): Arbitrary<number>;
//#endregion
//#region src/arbitrary/compareBooleanFunc.d.ts
/**
* For comparison boolean functions
*
* A comparison boolean function returns:
* - `true` whenever `a < b`
* - `false` otherwise (ie. `a = b` or `a > b`)
*
* @remarks Since 1.6.0
* @public
*/
declare function compareBooleanFunc<T>(): Arbitrary<(a: T, b: T) => boolean>;
//#endregion
//#region src/arbitrary/compareFunc.d.ts
/**
* For comparison functions
*
* A comparison function returns:
* - negative value whenever `a < b`
* - positive value whenever `a > b`
* - zero whenever `a` and `b` are equivalent
*
* Comparison functions are transitive: `a < b and b < c => a < c`
*
* They also satisfy: `a < b <=> b > a` and `a = b <=> b = a`
*
* @remarks Since 1.6.0
* @public
*/
declare function compareFunc<T>(): Arbitrary<(a: T, b: T) => number>;
//#endregion
//#region src/arbitrary/func.d.ts
/**
* For pure functions
*
* @param arb - Arbitrary responsible to produce the values
*
* @remarks Since 1.6.0
* @public
*/
declare function func<TArgs extends any[], TOut>(arb: Arbitrary<TOut>): Arbitrary<(...args: TArgs) => TOut>;
//#endregion
//#region src/arbitrary/domain.d.ts
/**
* Constraints to be applied on {@link domain}
* @remarks Since 2.22.0
* @public
*/
interface DomainConstraints {
/**
* Define how large the generated values should be (at max)
* @remarks Since 2.22.0
*/
size?: Exclude<SizeForArbitrary, "max">;
}
/**
* For domains
* having an extension with at least two lowercase characters
*
* According to {@link https://www.ietf.org/rfc/rfc1034.txt | RFC 1034},
* {@link https://www.ietf.org/rfc/rfc1035.txt | RFC 1035},
* {@link https://www.ietf.org/rfc/rfc1123.txt | RFC 1123} and
* {@link https://url.spec.whatwg.org/ | WHATWG URL Standard}
*
* @param constraints - Constraints to apply when building instances (since 2.22.0)
*
* @remarks Since 1.14.0
* @public
*/
declare function domain(constraints?: DomainConstraints): Arbitrary<string>;
//#endregion
//#region src/arbitrary/integer.d.ts
/**
* Constraints to be applied on {@link integer}
* @remarks Since 2.6.0
* @public
*/
interface IntegerConstraints {
/**
* Lower bound for the generated integers (included)
* @defaultValue -0x80000000
* @remarks Since 2.6.0
*/
min?: number;
/**
* Upper bound for the generated integers (included)
* @defaultValue 0x7fffffff
* @remarks Since 2.6.0
*/
max?: number;
}
/**
* For integers between min (included) and max (included)
*
* @param constraints - Constraints to apply when building instances (since 2.6.0)
*
* @remarks Since 0.0.1
* @public
*/
declare function integer(constraints?: IntegerConstraints): Arbitrary<number>;
//#endregion
//#region src/arbitrary/maxSafeInteger.d.ts
/**
* For integers between Number.MIN_SAFE_INTEGER (included) and Number.MAX_SAFE_INTEGER (included)
* @remarks Since 1.11.0
* @public
*/
declare function maxSafeInteger(): Arbitrary<number>;
//#endregion
//#region src/arbitrary/maxSafeNat.d.ts
/**
* For positive integers between 0 (included) and Number.MAX_SAFE_INTEGER (included)
* @remarks Since 1.11.0
* @public
*/
declare function maxSafeNat(): Arbitrary<number>;
//#endregion
//#region src/arbitrary/nat.d.ts
/**
* Constraints to be applied on {@link nat}
* @remarks Since 2.6.0
* @public
*/
interface NatConstraints {
/**
* Upper bound for the generated postive integers (included)
* @defaultValue 0x7fffffff
* @remarks Since 2.6.0
*/
max?: number;
}
/**
* For positive integers between 0 (included) and 2147483647 (included)
* @remarks Since 0.0.1
* @public
*/
declare function nat(): Arbitrary<number>;
/**
* For positive integers between 0 (included) and max (included)
*
* @param max - Upper bound for the generated integers
*
* @remarks You may prefer to use `fc.nat({max})` instead.
* @remarks Since 0.0.1
* @public
*/
declare function nat(max: number): Arbitrary<number>;
/**
* For positive integers between 0 (included) and max (included)
*
* @param constraints - Constraints to apply when building instances
*
* @remarks Since 2.6.0
* @public
*/
declare function nat(constraints: NatConstraints): Arbitrary<number>;
/**
* For positive integers between 0 (included) and max (included)
*
* @param arg - Either a maximum number or constraints to apply when building instances
*
* @remarks Since 2.6.0
* @public
*/
declare function nat(arg?: number | NatConstraints): Arbitrary<number>;
//#endregion
//#region src/arbitrary/ipV4.d.ts
/**
* For valid IP v4
*
* Following {@link https://tools.ietf.org/html/rfc3986#section-3.2.2 | RFC 3986}
*
* @remarks Since 1.14.0
* @public
*/
declare function ipV4(): Arbitrary<string>;
//#endregion
//#region src/arbitrary/ipV4Extended.d.ts
/**
* For valid IP v4 according to WhatWG
*
* Following {@link https://url.spec.whatwg.org/ | WhatWG}, the specification for web-browsers
*
* There is no equivalent for IP v6 according to the {@link https://url.spec.whatwg.org/#concept-ipv6-parser | IP v6 parser}
*
* @remarks Since 1.17.0
* @public
*/
declare function ipV4Extended(): Arbitrary<string>;
//#endregion
//#region src/arbitrary/ipV6.d.ts
/**
* For valid IP v6
*
* Following {@link https://tools.ietf.org/html/rfc3986#section-3.2.2 | RFC 3986}
*
* @remarks Since 1.14.0
* @public
*/
declare function ipV6(): Arbitrary<string>;
//#endregion
//#region src/arbitrary/letrec.d.ts
/**
* Type of the value produced by {@link letrec}
* @remarks Since 3.0.0
* @public
*/
type LetrecValue<T> = { [K in keyof T]: Arbitrary<T[K]>; };
/**
* Strongly typed type for the `tie` function passed by {@link letrec} to the `builder` function we pass to it.
* You may want also want to use its loosely typed version {@link LetrecLooselyTypedTie}.
*
* @remarks Since 3.0.0
* @public
*/
interface LetrecTypedTie<T> {
<K extends keyof T>(key: K): Arbitrary<T[K]>;
(key: string): Arbitrary<unknown>;
}
/**
* Strongly typed type for the `builder` function passed to {@link letrec}.
* You may want also want to use its loosely typed version {@link LetrecLooselyTypedBuilder}.
*
* @remarks Since 3.0.0
* @public
*/
type LetrecTypedBuilder<T> = (tie: LetrecTypedTie<T>) => LetrecValue<T>;
/**
* Loosely typed type for the `tie` function passed by {@link letrec} to the `builder` function we pass to it.
* You may want also want to use its strongly typed version {@link LetrecTypedTie}.
*
* @remarks Since 3.0.0
* @public
*/
type LetrecLooselyTypedTie = (key: string) => Arbitrary<unknown>;
/**
* Loosely typed type for the `builder` function passed to {@link letrec}.
* You may want also want to use its strongly typed version {@link LetrecTypedBuilder}.
*
* @remarks Since 3.0.0
* @public
*/
type LetrecLooselyTypedBuilder<T> = (tie: LetrecLooselyTypedTie) => LetrecValue<T>;
/**
* For mutually recursive types
*
* @example
* ```typescript
* type Leaf = number;
* type Node = [Tree, Tree];
* type Tree = Node | Leaf;
* const { tree } = fc.letrec<{ tree: Tree, node: Node, leaf: Leaf }>(tie => ({
* tree: fc.oneof({depthSize: 'small'}, tie('leaf'), tie('node')),
* node: fc.tuple(tie('tree'), tie('tree')),
* leaf: fc.nat()
* }));
* // tree is 50% of node, 50% of leaf
* // the ratio goes in favor of leaves as we go deeper in the tree (thanks to depthSize)
* ```
*
* @param builder - Arbitraries builder based on themselves (through `tie`)
*
* @remarks Since 1.16.0
* @public
*/
declare function letrec<T>(builder: T extends Record<string, unknown> ? LetrecTypedBuilder<T> : never): LetrecValue<T>;
/**
* For mutually recursive types
*
* @example
* ```typescript
* const { tree } = fc.letrec(tie => ({
* tree: fc.oneof({depthSize: 'small'}, tie('leaf'), tie('node')),
* node: fc.tuple(tie('tree'), tie('tree')),
* leaf: fc.nat()
* }));
* // tree is 50% of node, 50% of leaf
* // the ratio goes in favor of leaves as we go deeper in the tree (thanks to depthSize)
* ```
*
* @param builder - Arbitraries builder based on themselves (through `tie`)
*
* @remarks Since 1.16.0
* @public
*/
declare function letrec<T>(builder: LetrecLooselyTypedBuilder<T>): LetrecValue<T>;
//#endregion
//#region src/arbitrary/_internals/interfaces/EntityGraphTypes.d.ts
/**
* Defines the shape of a single entity type, where each field is associated with
* an arbitrary that generates values for that field.
*
* @example
* ```typescript
* // Employee entity with firstName and lastName fields
* { firstName: fc.string(), lastName: fc.string() }
* ```
*
* @remarks Since 4.5.0
* @public
*/
type ArbitraryStructure<TFields> = { [TField in keyof TFields]: Arbitrary<TFields[TField]>; };
/**
* Defines all entity types and their data fields for {@link entityGraph}.
*
* This is the first argument to {@link entityGraph} and specifies the non-relational properties
* of each entity type. Each key is the name of an entity type and its value defines the
* arbitraries for that entity.
*
* @example
* ```typescript
* {
* employee: { name: fc.string(), age: fc.nat(100) },
* team: { name: fc.string(), size: fc.nat(50) }
* }
* ```
*
* @remarks Since 4.5.0
* @public
*/
type Arbitraries<TEntityFields> = { [TEntityName in keyof TEntityFields]: ArbitraryStructure<TEntityFields[TEntityName]>; };
/**
* Cardinality of a relationship between entities.
*
* Determines how many target entities can be referenced:
* - `'0-1'`: Optional relationship — references zero or one target entity (value or undefined)
* - `'1'`: Required relationship — always references exactly one target entity
* - `'many'`: Multi-valued relationship — references an array of target entities (may be empty, no duplicates)
* - `'inverse'`: Inverse relationship — automatically computed array of entities that reference this entity through a specified forward relationship
*
* @remarks Since 4.5.0
* @public
*/
type Arity = "0-1" | "1" | "many" | "inverse";
/**
* Defines restrictions on which entities can be targeted by a relationship.
*
* - `'any'`: No restrictions — any entity of the target type can be referenced
* - `'exclusive'`: Each target entity can only be referenced by one relationship (prevents sharing)
* - `'successor'`: Target must appear later in the entity list (prevents cycles)
*
* @defaultValue 'any'
* @remarks Since 4.5.0
* @public
*/
type Strategy = "any" | "exclusive" | "successor";
/**
* Specifies a single relationship between entity types.
*
* A relationship defines how one entity type references another (or itself). This configuration
* determines both the cardinality of the relationship and any restrictions on which entities
* can be referenced.
*
* @example
* ```typescript
* // An employee has an optional manager who is also an employee
* { arity: '0-1', type: 'employee', strategy: 'successor' }
*
* // A team has exactly one department
* { arity: '1', type: 'department' }
*
* // An employee can have multiple competencies
* { arity: 'many', type: 'competency' }
* ```
*
* @remarks Since 4.5.0
* @public
*/
type Relationship<TTypeNames> = {
/**
* Cardinality of the relationship — determines how many target entities can be referenced.
*
* - `'0-1'`: Optional — produces undefined or a single instance of the target type
* - `'1'`: Required — always produces a single instance of the target type
* - `'many'`: Multi-valued — produces an array of target instances (may be empty, contains no duplicates)
* - `'inverse'`: Inverse — automatically produces an array of entities that reference this entity via the specified forward relationship
*
* @remarks Since 4.5.0
*/
arity: Arity;
/**
* The name of the entity type being referenced by this relationship.
*
* Must be one of the entity type names defined in the first argument to {@link entityGraph}.
*
* @remarks Since 4.5.0
*/
type: TTypeNames;
} & ({
arity: Exclude<Arity, "inverse">;
/**
* Constrains which target entities are eligible to be referenced.
*
* - `'any'`: No restrictions — any entity of the target type can be selected
* - `'exclusive'`: Each target can only be used once — prevents multiple relationships from referencing the same entity
* - `'successor'`: Target must appear after the source in the entity array — prevents self-references and cycles
*
* @defaultValue 'any'
* @remarks Since 4.5.0
*/
strategy?: Strategy;
} | {
arity: "inverse";
/**
* Name of the forward relationship property in the target type that references this entity type.
* The inverse relationship will contain all entities that reference this entity through that forward relationship.
*
* @example
* ```typescript
* // If 'employee' has 'team: { arity: "1", type: "team" }'
* // Then 'team' can have 'members: { arity: "inverse", type: "employee", forwardRelationship: "team" }'
* ```
*
* @remarks Since 4.5.0
*/
forwardRelationship: string;
});
/**
* Defines all relationships between entity types for {@link entityGraph}.
*
* This is the second argument to {@link entityGraph} and specifies how entities reference each other.
* Each entity type can have zero or more relationship fields, where each field defines a link
* to other entities.
*
* @example
* ```typescript
* {
* employee: {
* manager: { arity: '0-1', type: 'employee' },
* team: { arity: '1', type: 'team' }
* },
* team: {}
* }
* ```
*
* @remarks Since 4.5.0
* @public
*/
type EntityRelations<TEntityFields> = { [TEntityName in keyof TEntityFields]: { [TField in string]: Relationship<keyof TEntityFields>; }; };
type RelationsToValue<TRelations, TValues> = { [TField in keyof TRelations]: TRelations[TField] extends {
arity: "0-1";
type: infer TTypeName extends keyof TValues;
} ? TValues[TTypeName] | undefined : TRelations[TField] extends {
arity: "1";
type: infer TTypeName extends keyof TValues;
} ? TValues[TTypeName] : TRelations[TField] extends {
arity: "many";
type: infer TTypeName extends keyof TValues;
} ? TValues[TTypeName][] : TRelations[TField] extends {
arity: "inverse";
type: infer TTypeName extends keyof TValues;
} ? TValues[TTypeName][] : never; };
type Prettify$1<T> = { [K in keyof T]: T[K]; } & {};
type EntityGraphSingleValue<TEntityFields, TEntityRelations extends EntityRelations<TEntityFields>> = { [TEntityName in keyof TEntityFields]: Prettify$1<TEntityFields[TEntityName] & RelationsToValue<TEntityRelations[TEntityName], EntityGraphSingleValue<TEntityFields, TEntityRelations>>>; };
/**
* Type of the values generated by {@link entityGraph}.
*
* The output is an object where each key is an entity type name and each value is an array
* of entities of that type. Each entity contains both its data fields (from arbitraries) and
* relationship fields (from relations), with relationships resolved to actual entity references.
*
* @remarks Since 4.5.0
* @public
*/
type EntityGraphValue<TEntityFields, TEntityRelations extends EntityRelations<TEntityFields>> = { [TEntityName in keyof EntityGraphSingleValue<TEntityFields, TEntityRelations>]: EntityGraphSingleValue<TEntityFields, TEntityRelations>[TEntityName][]; };
//#endregion
//#region src/arbitrary/uniqueArray.d.ts
/**
* Shared constraints to be applied on {@link uniqueArray}
* @remarks Since 2.23.0
* @public
*/
type UniqueArraySharedConstraints = {
/**
* Lower bound of the generated array size
* @defaultValue 0
* @remarks Since 2.23.0
*/
minLength?: number;
/**
* Upper bound of the generated array size
* @defaultValue 0x7fffffff — _defaulting seen as "max non specified" when `defaultSizeToMaxWhenMaxSpecified=true`_
* @remarks Since 2.23.0
*/
maxLength?: number;
/**
* Define how large the generated values should be (at max)
* @remarks Since 2.23.0
*/
size?: SizeForArbitrary;
/**
* When receiving a depth identifier, the arbitrary will impact the depth
* attached to it to avoid going too deep if it already generated lots of items.
*
* In other words, if the number of generated values within the collection is large
* then the generated items will tend to be less deep to avoid creating structures a lot
* larger than expected.
*
* For the moment, the depth is not taken into account to compute the number of items to
* define for a precise generate call of the array. Just applied onto eligible items.
*
* @remarks Since 2.25.0
*/
depthIdentifier?: DepthIdentifier | string;
};
/**
* Constraints implying known and optimized comparison function
* to be applied on {@link uniqueArray}
*
* @remarks Since 2.23.0
* @public
*/
type UniqueArrayConstraintsRecommended<T, U> = UniqueArraySharedConstraints & {
/**
* The operator to be used to compare the values after having applied the selector (if any):
* - SameValue behaves like `Object.is` — {@link https://tc39.es/ecma262/multipage/abstract-operations.html#sec-samevalue}
* - SameValueZero behaves like `Set` or `Map` — {@link https://tc39.es/ecma262/multipage/abstract-operations.html#sec-samevaluezero}
* - IsStrictlyEqual behaves like `===` — {@link https://tc39.es/ecma262/multipage/abstract-operations.html#sec-isstrictlyequal}
* - Fully custom comparison function: it implies performance costs for large arrays
*
* @defaultValue 'SameValue'
* @remarks Since 2.23.0
*/
comparator?: "SameValue" | "SameValueZero" | "IsStrictlyEqual";
/**
* How we should project the values before comparing them together
* @defaultValue (v => v)
* @remarks Since 2.23.0
*/
selector?: (v: T) => U;
};
/**
* Constraints implying a fully custom comparison function
* to be applied on {@link uniqueArray}
*
* WARNING - Imply an extra performance cost whenever you want to generate large arrays
*
* @remarks Since 2.23.0
* @public
*/
type UniqueArrayConstraintsCustomCompare<T> = UniqueArraySharedConstraints & {
/**
* The operator to be used to compare the values after having applied the selector (if any)
* @remarks Since 2.23.0
*/
comparator: (a: T, b: T) => boolean;
/**
* How we should project the values before comparing them together
* @remarks Since 2.23.0
*/
selector?: undefined;
};
/**
* Constraints implying fully custom comparison function and selector
* to be applied on {@link uniqueArray}
*
* WARNING - Imply an extra performance cost whenever you want to generate large arrays
*
* @remarks Since 2.23.0
* @public
*/
type UniqueArrayConstraintsCustomCompareSelect<T, U> = UniqueArraySharedConstraints & {
/**
* The operator to be used to compare the values after having applied the selector (if any)
* @remarks Since 2.23.0
*/
comparator: (a: U, b: U) => boolean;
/**
* How we should project the values before comparing them together
* @remarks Since 2.23.0
*/
selector: (v: T) => U;
};
/**
* Constraints implying known and optimized comparison function
* to be applied on {@link uniqueArray}
*
* The defaults relies on the defaults specified by {@link UniqueArrayConstraintsRecommended}
*
* @remarks Since 2.23.0
* @public
*/
type UniqueArrayConstraints<T, U> = UniqueArrayConstraintsRecommended<T, U> | UniqueArrayConstraintsCustomCompare<T> | UniqueArrayConstraintsCustomCompareSelect<T, U>;
/**
* For arrays of unique values coming from `arb`
*
* @param arb - Arbitrary used to generate the values inside the array
* @param constraints - Constraints to apply when building instances
*
* @remarks Since 2.23.0
* @public
*/
declare function uniqueArray<T, U>(arb: Arbitrary<T>, constraints?: UniqueArrayConstraintsRecommended<T, U>): Arbitrary<T[]>;
/**
* For arrays of unique values coming from `arb`
*
* @param arb - Arbitrary used to generate the values inside the array
* @param constraints - Constraints to apply when building instances
*
* @remarks Since 2.23.0
* @public
*/
declare function uniqueArray<T>(arb: Arbitrary<T>, constraints: UniqueArrayConstraintsCustomCompare<T>): Arbitrary<T[]>;
/**
* For arrays of unique values coming from `arb`
*
* @param arb - Arbitrary used to generate the values inside the array
* @param constraints - Constraints to apply when building instances
*
* @remarks Since 2.23.0
* @public
*/
declare function uniqueArray<T, U>(arb: Arbitrary<T>, constraints: UniqueArrayConstraintsCustomCompareSelect<T, U>): Arbitrary<T[]>;
/**
* For arrays of unique values coming from `arb`
*
* @param arb - Arbitrary used to generate the values inside the array
* @param constraints - Constraints to apply when building instances
*
* @remarks Since 2.23.0
* @public
*/
declare function uniqueArray<T, U>(arb: Arbitrary<T>, constraints: UniqueArrayConstraints<T, U>): Arbitrary<T[]>;
//#endregion
//#region src/arbitrary/entityGraph.d.ts
/**
* Constraints to be applied on {@link entityGraph}
* @remarks Since 4.5.0
* @public
*/
type EntityGraphConstraints<TEntityFields> = {
/**
* Controls the minimum number of entities generated for each entity type in the initial pool.
*
* The initial pool defines the baseline set of entities that are created before any relationships
* are established. Other entities may be created later to satisfy relationship requirements.
*
* @example
* ```typescript
* // Ensure at least 2 employees and at most 5 teams in the initial pool
* // But possibly more than 5 teams at the end
* { initialPoolConstraints: { employee: { minLength: 2 }, team: { maxLength: 5 } } }
* ```
*
* @defaultValue When unspecified, defaults from {@link array} are used for each entity type
* @remarks Since 4.5.0
*/
initialPoolConstraints?: { [EntityName in keyof TEntityFields]?: ArrayConstraints; };
/**
* Defines uniqueness criteria for entities of each type to prevent duplicate values.
*
* The selector function extracts a key from each entity. Entities with identical keys
* (compared using `Object.is`) are considered duplicates and only one instance will be kept.
*
* @example
* ```typescript
* // Ensure employees have unique names
* { unicityConstraints: { employee: (emp) => emp.name } }
* ```
*
* @defaultValue All entities are considered unique (no deduplication is performed)
* @remarks Since 4.5.0
*/
unicityConstraints?: { [EntityName in keyof TEntityFields]?: UniqueArrayConstraintsRecommended<TEntityFields[EntityName], unknown>["selector"]; };
/**
* Do not generate values with null prototype
* @defaultValue false
* @remarks Since 4.5.0
*/
noNullPrototype?: boolean;
};
/**
* Constraints to be applied on {@link entityGraph}
* @remarks Since 4.5.0
* @public
* @deprecated This type has a typo. Use `EntityGraphConstraints` instead.
*/
type EntityGraphContraints<TEntityFields> = EntityGraphConstraints<TEntityFields>;
/**
* Generates interconnected entities with relationships based on a schema definition.
*
* This arbitrary creates structured data where entities can reference each other through defined
* relationships. The generated values automatically include links between entities, making it
* ideal for testing graph structures, relational data, or interconnected object models.
*
* The output is an object where each key corresponds to an entity type and the value is an array
* of entities of that type. Entities contain both their data fields and relationship links.
*
* @example
* ```typescript
* // Generate a simple directed graph where nodes link to other nodes
* fc.entityGraph(
* { node: { id: fc.stringMatching(/^[A-Z][a-z]*$/) } },
* { node: { linkTo: { arity: 'many', type: 'node' } } },
* )
* // Produces: { node: [{ id: "Abc", linkTo: [<node#1>, <node#0>] }, ...] }
* ```
*
* @example
* ```typescript
* // Generate employees with managers and teams
* fc.entityGraph(
* {
* employee: { name: fc.string() },
* team: { name: fc.string() }
* },
* {
* employee: {
* manager: { arity: '0-1', type: 'employee' }, // Optional manager
* team: { arity: '1', type: 'team' } // Required team
* },
* team: {}
* }
* )
* ```
*
* @param arbitraries - Defines the data fields for each entity type (non-relational properties)
* @param relations - Defines how entities reference each other (relational properties)
* @param constraints - Optional configuration to customize generation behavior
*
* @remarks Since 4.5.0
* @public
*/
declare function entityGraph<TEntityFields, TEntityRelations extends EntityRelations<TEntityFields>>(arbitraries: Arbitraries<TEntityFields>, relations: TEntityRelations, constraints?: EntityGraphConstraints<TEntityFields>): Arbitrary<EntityGraphValue<TEntityFields, TEntityRelations>>;
//#endregion
//#region src/arbitrary/lorem.d.ts
/**
* Constraints to be applied on {@link lorem}
* @remarks Since 2.5.0
* @public
*/
interface LoremConstraints {
/**
* Maximal number of entities:
* - maximal number of words in case mode is 'words'
* - maximal number of sentences in case mode is 'sentences'
*
* @defaultValue 0x7fffffff — _defaulting seen as "max non specified" when `defaultSizeToMaxWhenMaxSpecified=true`_
* @remarks Since 2.5.0
*/
maxCount?: number;
/**
* Type of strings that should be produced by {@link lorem}:
* - words: multiple words
* - sentences: multiple sentences
*
* @defaultValue 'words'
* @remarks Since 2.5.0
*/
mode?: "words" | "sentences";
/**
* Define how large the generated values should be (at max)
* @remarks Since 2.22.0
*/
size?: SizeForArbitrary;
}
/**
* For lorem ipsum string of words or sentences with maximal number of words or sentences
*
* @param constraints - Constraints to be applied onto the generated value (since 2.5.0)
*
* @remarks Since 0.0.1
* @public
*/
declare function lorem(constraints?: LoremConstraints): Arbitrary<string>;
//#endregion
//#region src/arbitrary/map.d.ts
/**
* Constraints to be applied on {@link map}
* @remarks Since 4.4.0
* @public
*/
interface MapConstraints {
/**
* Lower bound for the number of entries defined into the generated instance
* @defaultValue 0
* @remarks Since 4.4.0
*/
minKeys?: number;
/**
* Upper bound for the number of entries defined into the generated instance
* @defaultValue 0x7fffffff
* @remarks Since 4.4.0
*/
maxKeys?: number;
/**
* Define how large the generated values should be (at max)
* @remarks Since 4.4.0
*/
size?: SizeForArbitrary;
/**
* Depth identifier can be used to share the current depth between several instances.
*
* By default, if not specified, each instance of map will have its own depth.
* In other words: you can have depth=1 in one while you have depth=100 in another one.
*
* @remarks Since 4.4.0
*/
depthIdentifier?: DepthIdentifier | string;
}
/**
* For Maps with keys produced by `keyArb` and values from `valueArb`
*
* @param keyArb - Arbitrary used to generate the keys of the Map
* @param valueArb - Arbitrary used to generate the values of the Map
* @param constraints - Constraints to apply when building instances
*
* @remarks Since 4.4.0
* @public
*/
declare function map<K, V>(keyArb: Arbitrary<K>, valueArb: Arbitrary<V>, constraints?: MapConstraints): Arbitrary<Map<K, V>>;
//#endregion
//#region src/arbitrary/mapToConstant.d.ts
/**
* Generate non-contiguous ranges of values
* by mapping integer values to constant
*
* @param options - Builders to be called to generate the values
*
* @example
* ```
* // generate alphanumeric values (a-z0-9)
* mapToConstant(
* { num: 26, build: v => String.fromCharCode(v + 0x61) },
* { num: 10, build: v => String.fromCharCode(v + 0x30) },
* )
* ```
*
* @remarks Since 1.14.0
* @public
*/
declare function mapToConstant<T>(...entries: {
num: number;
build: (idInGroup: number) => T;
}[]): Arbitrary<T>;
//#endregion
//#region src/arbitrary/memo.d.ts
/**
* Output type for {@link memo}
* @remarks Since 1.16.0
* @public
*/
type Memo<T> = (maxDepth?: number) => Arbitrary<T>;
/**
* For mutually recursive types
*
* @example
* ```typescript
* // tree is 1 / 3 of node, 2 / 3 of leaf
* const tree: fc.Memo<Tree> = fc.memo(n => fc.oneof(node(n), leaf(), leaf()));
* const node: fc.Memo<Tree> = fc.memo(n => {
* if (n <= 1) return fc.record({ left: leaf(), right: leaf() });
* return fc.record({ left: tree(), right: tree() }); // tree() is equivalent to tree(n-1)
* });
* const leaf = fc.nat;
* ```
*
* @param builder - Arbitrary builder taken the maximal depth allowed as input (parameter `n`)
*
* @remarks Since 1.16.0
* @public
*/
declare function memo<T>(builder: (maxDepth: number) => Arbitrary<T>): Memo<T>;
//#endregion
//#region src/arbitrary/mixedCase.d.ts
/**
* Constraints to be applied on {@link mixedCase}
* @remarks Since 1.17.0
* @public
*/
interface MixedCaseConstraints {
/**
* Transform a character to its upper and/or lower case version
* @defaultValue try `toUpperCase` on the received code-point, if no effect try `toLowerCase`
* @remarks Since 1.17.0
*/
toggleCase?: (rawChar: string) => string;
/**
* In order to be fully reversable (only in case you want to shrink user definable values)
* you should provide a function taking a string containing possibly toggled items and returning its
* untoggled version.
*/
untoggleAll?: (toggledString: string) => string;
}
/**
* Randomly switch the case of characters generated by `stringArb` (upper/lower)
*
* WARNING:
* Require bigint support.
* Under-the-hood the arbitrary relies on bigint to compute the flags that should be toggled or not.
*
* @param stringArb - Arbitrary able to build string values
* @param constraints - Constraints to be applied when computing upper/lower case version
*
* @remarks Since 1.17.0
* @public
*/
declare function mixedCase(stringArb: Arbitrary<string>, constraints?: MixedCaseConstraints): Arbitrary<string>;
//#endregion
//#region src/arbitrary/_shared/StringSharedConstraints.d.ts
/**
* Constraints to be applied on arbitraries for strings
* @remarks Since 2.4.0
* @public
*/
interface StringSharedConstraints {
/**
* Lower bound of the generated string length (included)
* @defaultValue 0
* @remarks Since 2.4.0
*/
minLength?: number;
/**
* Upper bound of the generated string length (included)
* @defaultValue 0x7fffffff — _defaulting seen as "max non specified" when `defaultSizeToMaxWhenMaxSpecified=true`_
* @remarks Since 2.4.0
*/
maxLength?: number;
/**
* Define how large the generated values should be (at max)
* @remarks Since 2.22.0
*/
size?: SizeForArbitrary;
}
//#endregion
//#region src/arbitrary/string.d.ts
/**
* Constraints to be applied on arbitrary {@link string}
* @remarks Since 3.22.0
* @public
*/
type StringConstraints = StringSharedConstraints & {
/**
* A string results from the join between several unitary strings produced by the Arbitrary instance defined by `unit`.
* The `minLength` and `maxLength` refers to the number of these units composing the string. In other words it does not have to be confound with `.length` on an instance of string.
*
* A unit can either be a fully custom Arbitrary or one of the pre-defined options:
* - `'grapheme'` - Any printable grapheme as defined by the Unicode standard. This unit includes graphemes that may:
* - Span multiple code points (e.g., `'\u{0061}\u{0300}'`)
* - Consist of multiple characters (e.g., `'\u{1f431}'`)
* - Include non-European and non-ASCII characters.
* - **Note:** Graphemes produced by this unit are designed to remain visually distinct when joined together.
* - **Note:** We are relying on the specifications of Unicode 15.
* - `'grapheme-composite'` - Any printable grapheme limited to a single code point. This option produces graphemes limited to a single code point.
* - **Note:** Graphemes produced by this unit are designed to remain visually distinct when joined together.
* - **Note:** We are relying on the specifications of Unicode 15.
* - `'grapheme-ascii'` - Any printable ASCII character.
* - `'binary'` - Any possible code point (except half surrogate pairs), regardless of how it may combine with subsequent code points in the produced string. This unit produces a single code point within the full Unicode range (0000-10FFFF).
* - `'binary-ascii'` - Any possible ASCII character, including control characters. This unit produces any code point in the range 0000-00FF.
*
* @defaultValue 'grapheme-ascii'
* @remarks Since 3.22.0
*/
unit?: "grapheme" | "grapheme-composite" | "grapheme-ascii" | "binary" | "binary-ascii" | Arbitrary<string>;
};
/**
* For strings of {@link char}
*
* @param constraints - Constraints to apply when building instances (since 2.4.0)
*
* @remarks Since 0.0.1
* @public
*/
declare function string(constraints?: StringConstraints): Arbitrary<string>;
//#endregion
//#region src/arbitrary/_internals/helpers/QualifiedObjectConstraints.d.ts
/**
* Constraints for {@link anything} and {@link object}
* @public
*/
interface ObjectConstraints {
/**
* Limit the depth of the object by increasing the probability to generate simple values (defined via values)
* as we go deeper in the object.
* @remarks Since 2.20.0
*/
depthSize?: DepthSize;
/**
* Maximal depth allowed
* @defaultValue Number.POSITIVE_INFINITY — _defaulting seen as "max non specified" when `defaultSizeToMaxWhenMaxSpecified=true`_
* @remarks Since 0.0.7
*/
maxDepth?: number;
/**
* Maximal number of keys
* @defaultValue 0x7fffffff — _defaulting seen as "max non specified" when `defaultSizeToMaxWhenMaxSpecified=true`_
* @remarks Since 1.13.0
*/
maxKeys?: number;
/**
* Define how large the generated values should be (at max)
* @remarks Since 2.22.0
*/
size?: SizeForArbitrary;
/**
* Arbitrary for keys
* @defaultValue {@link string}
* @remarks Since 0.0.7
*/
key?: Arbitrary<string>;
/**
* Arbitrary for values
* @defaultValue {@link boolean}, {@link integer}, {@link double}, {@link string}, null, undefined, Number.NaN, +0, -0, Number.EPSILON, Number.MIN_VALUE, Number.MAX_VALUE, Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER, Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY
* @remarks Since 0.0.7
*/
values?: Arbitrary<unknown>[];
/**
* Also generate boxed versions of values
* @defaultValue false
* @remarks Since 1.11.0
*/
withBoxedValues?: boolean;
/**
* Also generate Set
* @defaultValue false
* @remarks Since 1.11.0
*/
withSet?: boolean;
/**
* Also generate Map
* @defaultValue false
* @remarks Since 1.11.0
*/
withMap?: boolean;
/**
* Also generate string representations of object instances
* @defaultValue false
* @remarks Since 1.17.0
*/
withObjectString?: boolean;
/**
* Also generate object with null prototype
* @defaultValue false
* @remarks Since 1.23.0
*/
withNullPrototype?: boolean;
/**
* Also generate BigInt
* @defaultValue false
* @remarks Since 1.26.0
*/
withBigInt?: boolean;
/**
* Also generate Date
* @defaultValue false
* @remarks Since 2.5.0
*/
withDate?: boolean;
/**
* Also generate typed arrays in: (Uint|Int)(8|16|32)Array and Float(32|64)Array
* Remark: no typed arrays made of bigint
* @defaultValue false
* @remarks Since 2.9.0
*/
withTypedArray?: boolean;
/**
* Also generate sparse arrays (arrays with holes)
* @defaultValue false
* @remarks Since 2.13.0
*/
withSparseArray?: boolean;
/**
* Replace the arbitrary of strings defaulted for key and values by one able to generate unicode strings with non-ascii characters.
* If you override key and/or values constraint, this flag will not apply to your override.
* @deprecated Prefer using `stringUnit` to customize the kind of strings that will be generated by default.
* @defaultValue false
* @remarks Since 3.19.0
*/
withUnicodeString?: boolean;
/**
* Replace the default unit for strings.
* @defaultValue undefined
* @remarks Since 3.23.0
*/
stringUnit?: StringConstraints["unit"];
}
//#endregion
//#region src/arbitrary/object.d.ts
/**
* For any objects
*
* You may use {@link sample} to preview the values that will be generated
*
* @example
* ```javascript
* {}, {k: [{}, 1, 2]}
* ```
*
* @remarks Since 0.0.7
* @public
*/
declare function object(): Arbitrary<Record<string, unknown>>;
/**
* For any objects following the constraints defined by `settings`
*
* You may use {@link sample} to preview the values that will be generated
*
* @example
* ```javascript
* {}, {k: [{}, 1, 2]}
* ```
*
* @param constraints - Constraints to apply when building instances
*
* @remarks Since 0.0.7
* @public
*/
declare function object(constraints: ObjectConstraints): Arbitrary<Record<string, unknown>>;
//#endregion
//#region src/arbitrary/_internals/helpers/JsonConstraintsBuilder.d.ts
/**
* Shared constraints for:
* - {@link json},
* - {@link jsonValue},
*
* @remarks Since 2.5.0
* @public
*/
interface JsonSharedConstraints {
/**
* Limit the depth of the object by increasing the probability to generate simple values (defined via values)
* as we go deeper in the object.
*
* @remarks Since 2.20.0
*/
depthSize?: DepthSize;
/**
* Maximal depth allowed
* @defaultValue Number.POSITIVE_INFINITY — _defaulting seen as "max non specified" when `defaultSizeToMaxWhenMaxSpecified=true`_
* @remarks Since 2.5.0
*/
maxDepth?: number;
/**
* Only generate instances having keys and values made of ascii strings (when true)
* @deprecated Prefer using `stringUnit` to customize the kind of strings that will be generated by default.
* @defaultValue true
* @remarks Since 3.19.0
*/
noUnicodeString?: boolean;
/**
* Replace the default unit for strings.
* @defaultValue undefined
* @remarks Since 3.23.0
*/
stringUnit?: StringConstraints["unit"];
}
/**
* Typings for a Json array
* @remarks Since 2.20.0
* @public
*/
type JsonArray = Array<JsonValue>;
/**
* Typings for a Json object
* @remarks Since 2.20.0
* @public
*/
type JsonObject = { [key in string]?: JsonValue; };
/**
* Typings for a Json value
* @remarks Since 2.20.0
* @public
*/
type JsonValue = boolean | number | string | null | JsonArray | JsonObject;
//#endregion
//#region src/arbitrary/json.d.ts
/**
* For any JSON strings
*
* Keys and string values rely on {@link string}
*
* @param constraints - Constraints to be applied onto the generated instance (since 2.5.0)
*
* @remarks Since 0.0.7
* @public
*/
declare function json(constraints?: JsonSharedConstraints): Arbitrary<string>;
//#endregion
//#region src/arbitrary/anything.d.ts
/**
* For any type of values
*
* You may use {@link sample} to preview the values that will be generated
*
* @example
* ```javascript
* null, undefined, 42, 6.5, 'Hello', {}, {k: [{}, 1, 2]}
* ```
*
* @remarks Since 0.0.7
* @public
*/
declare function anything(): Arbitrary<unknown>;
/**
* For any type of values following the constraints defined by `settings`
*
* You may use {@link sample} to preview the values that will be generated
*
* @example
* ```javascript
* null, undefined, 42, 6.5, 'Hello', {}, {k: [{}, 1, 2]}
* ```
*
* @example
* ```typescript
* // Using custom settings
* fc.anything({
* key: fc.string(),
* values: [fc.integer(10,20), fc.constant(42)],
* maxDepth: 2
* });
* // Can build entries such as:
* // - 19
* // - [{"2":12,"k":15,"A":42}]
* // - {"4":[19,13,14,14,42,11,20,11],"6":42,"7":16,"L":10,"'":[20,11],"e":[42,20,42,14,13,17]}
* // - [42,42,42]...
* ```
*
* @param constraints - Constraints to apply when building instances
*
* @remarks Since 0.0.7
* @public
*/
declare function anything(constraints: ObjectConstraints): Arbitrary<unknown>;
//#endregion
//#region src/arbitrary/jsonValue.d.ts
/**
* For any JSON compliant values
*
* Keys and string values rely on {@link string}
*
* As `JSON.parse` preserves `-0`, `jsonValue` can also have `-0` as a value.
* `jsonValue` must be seen as: any value that could have been built by doing a `JSON.parse` on a given string.
*
* @param constraints - Constraints to be applied onto the generated instance
*
* @remarks Since 2.20.0
* @public
*/
declare function jsonValue(constraints?: JsonSharedConstraints): Arbitrary<JsonValue>;
//#endregion
//#region src/arbitrary/oneof.d.ts
/**
* Conjonction of a weight and an arbitrary used by {@link oneof}
* in order to generate values
*
* @remarks Since 1.18.0
* @public
*/
interface WeightedArbitrary<T> {
/**
* Weight to be applied when selecting which arbitrary should be used
* @remarks Since 0.0.7
*/
weight: number;
/**
* Instance of Arbitrary
* @remarks Since 0.0.7
*/
arbitrary: Arbitrary<T>;
}
/**
* Either an `Arbitrary<T>` or a `WeightedArbitrary<T>`
* @remarks Since 3.0.0
* @public
*/
type MaybeWeightedArbitrary<T> = Arbitrary<T> | WeightedArbitrary<T>;
/**
* Infer the type of the Arbitrary produced by {@link oneof}
* given the type of the source arbitraries
*
* @remarks Since 2.2.0
* @public
*/
type OneOfValue<Ts extends MaybeWeightedArbitrary<unknown>[]> = { [K in keyof Ts]: Ts[K] extends MaybeWeightedArbitrary<infer U> ? U : never; }[number];
/**
* Constraints to be applied on {@link oneof}
* @remarks Since 2.14.0
* @public
*/
type OneOfConstraints = {
/**
* When set to true, the shrinker of oneof will try to check if the first arbitrary
* could have been used to discover an issue. It allows to shrink trees.
*
* Warning: First arbitrary must be the one resulting in the smallest structures
* for usages in deep tree-like structures.
*
* @defaultValue false
* @remarks Since 2.14.0
*/
withCrossShrink?: boolean;
/**
* While going deeper and deeper within a recursive structure (see {@link letrec}),
* this factor will be used to increase the probability to generate instances
* of the first passed arbitrary.
*
* @remarks Since 2.14.0
*/
depthSize?: DepthSize;
/**
* Maximal authorized depth.
* Once this depth has been reached only the first arbitrary will be used.
*
* @defaultValue Number.POSITIVE_INFINITY — _defaulting seen as "max non specified" when `defaultSizeToMaxWhenMaxSpecified=true`_
* @remarks Since 2.14.0
*/
maxDepth?: number;
/**
* Depth identifier can be used to share the current depth between several instances.
*
* By default, if not specified, each instance of oneof will have its own depth.
* In other words: you can have depth=1 in one while you have depth=100 in another one.
*
* @remarks Since 2.14.0
*/
depthIdentifier?: DepthIdentifier | string;
};
/**
* For one of the values generated by `...arbs` - with all `...arbs` equiprobable
*
* **WARNING**: It expects at least one arbitrary
*
* @param arbs - Arbitraries that might be called to produce a value
*
* @remarks Since 0.0.1
* @public
*/
declare function oneof<Ts extends MaybeWeightedArbitrary<unknown>[]>(...arbs: Ts): Arbitrary<OneOfValue<Ts>>;
/**
* For one of the values generated by `...arbs` - with all `...arbs` equiprobable
*
* **WARNING**: It expects at least one arbitrary
*
* @param constraints - Constraints to be applied when generating the values
* @param arbs - Arbitraries that might be called to produce a value
*
* @remarks Since 2.14.0
* @public
*/
declare function oneof<Ts extends MaybeWeightedArbitrary<unknown>[]>(constraints: OneOfConstraints, ...arbs: Ts): Arbitrary<OneOfValue<Ts>>;
//#endregion
//#region src/arbitrary/option.d.ts
/**
* Constraints to be applied on {@link option}
* @remarks Since 2.2.0
* @public
*/
interface OptionConstraints<TNil = null> {
/**
* The probability to build a nil value is of `1 / freq`.
* @defaultValue 6
* @remarks Since 1.17.0
*/
freq?: number;
/**
* The nil value
* @defaultValue null
* @remarks Since 1.17.0
*/
nil?: TNil;
/**
* While going deeper and deeper within a recursive structure (see {@link letrec}),
* this factor will be used to increase the probability to generate nil.
*
* @remarks Since 2.14.0
*/
depthSize?: DepthSize;
/**
* Maximal authorized depth. Once this depth has been reached only nil will be used.
* @defaultValue Number.POSITIVE_INFINITY — _defaulting seen as "max non specified" when `defaultSizeToMaxWhenMaxSpecified=true`_
* @remarks Since 2.14.0
*/
maxDepth?: number;
/**
* Depth identifier can be used to share the current depth between several instances.
*
* By default, if not specified, each instance of option will have its own depth.
* In other words: you can have depth=1 in one while you have depth=100 in another one.
*
* @remarks Since 2.14.0
*/
depthIdentifier?: DepthIdentifier | string;
}
/**
* For either nil or a value coming from `arb` with custom frequency
*
* @param arb - Arbitrary that will be called to generate a non nil value
* @param constraints - Constraints on the option(since 1.17.0)
*
* @remarks Since 0.0.6
* @public
*/
declare function option<T, TNil = null>(arb: Arbitrary<T>, constraints?: OptionConstraints<TNil>): Arbitrary<T | TNil>;
//#endregion
//#region src/arbitrary/record.d.ts
type Prettify<T> = { [K in keyof T]: T[K]; } & {};
/**
* Constraints to be applied on {@link record}
* @remarks Since 0.0.12
* @public
*/
type RecordConstraints<T = unknown> = {
/**
* List keys that should never be deleted.
*
* Remark:
* You might need to use an explicit typing in case you need to declare symbols as required (not needed when required keys are simple strings).
* With something like `{ requiredKeys: [mySymbol1, 'a'] as [typeof mySymbol1, 'a'] }` when both `mySymbol1` and `a` are required.
*
* @defaultValue Array containing all keys of recordModel
* @remarks Since 2.11.0
*/
requiredKeys?: T[];
/**
* Do not generate records with null prototype
* @defaultValue false
* @remarks Since 3.13.0
*/
noNullPrototype?: boolean;
};
/**
* Infer the type of the Arbitrary produced by record
* given the type of the source arbitrary and constraints to be applied
*
* @remarks Since 2.2.0
* @public
*/
type RecordValue<T, K> = Prettify<Partial<T> & Pick<T, K & keyof T>>;
/**
* For records following the `recordModel` schema
*
* @example
* ```typescript
* record({ x: someArbitraryInt, y: someArbitraryInt }, {requiredKeys: []}): Arbitrary<{x?:number,y?:number}>
* // merge two integer arbitraries to produce a {x, y}, {x}, {y} or {} record
* ```
*
* @param recordModel - Schema of the record
* @param constraints - Contraints on the generated record
*
* @remarks Since 0.0.12
* @public
*/
declare function record<T, K extends keyof T = keyof T>(model: { [K in keyof T]: Arbitrary<T[K]>; }, constraints?: RecordConstraints<K>): Arbitrary<RecordValue<T, K>>;
//#endregion
//#region src/arbitrary/set.d.ts
/**
* Constraints to be applied on {@link set}
* @remarks Since 4.4.0
* @public
*/
type SetConstraints = {
/**
* Lower bound of the generated set size
* @defaultValue 0
* @remarks Since 4.4.0
*/
minLength?: number;
/**
* Upper bound of the generated set size
* @defaultValue 0x7fffffff — _defaulting seen as "max non specified" when `defaultSizeToMaxWhenMaxSpecified=true`_
* @remarks Since 4.4.0
*/
maxLength?: number;
/**
* Define how large the generated values should be (at max)
* @remarks Since 4.4.0
*/
size?: SizeForArbitrary;
/**
* When receiving a depth identifier, the arbitrary will impact the depth
* attached to it to avoid going too deep if it already generated lots of items.
*
* In other words, if the number of generated values within the collection is large
* then the generated items will tend to be less deep to avoid creating structures a lot
* larger than expected.
*
* For the moment, the depth is not taken into account to compute the number of items to
* define for a precise generate call of the set. Just applied onto eligible items.
*
* @remarks Since 4.4.0
*/
depthIdentifier?: DepthIdentifier | string;
};
/**
* For sets of values coming from `arb`
*
* All the values in the set are unique. Comparison of values relies on `SameValueZero`
* which is the same comparison algorithm used by `Set`.
*
* @param arb - Arbitrary used to generate the values inside the set
* @param constraints - Constraints to apply when building instances
*
* @remarks Since 4.4.0
* @public
*/
declare function set<T>(arb: Arbitrary<T>, constraints?: SetConstraints): Arbitrary<Set<T>>;
//#endregion
//#region src/arbitrary/infiniteStream.d.ts
/**
* Constraints to be applied on {@link infiniteStream}
* @remarks Since 4.3.0
* @public
*/
interface InfiniteStreamConstraints {
/**
* Do not save items emitted by this arbitrary and print count instead.
* Recommended for very large tests.
*
* @defaultValue false
*/
noHistory?: boolean;
}
/**
* Produce an infinite stream of values
*
* WARNING: By default, infiniteStream remembers all values it has ever
* generated. This causes unbounded memory growth during large tests.
* Set noHistory to disable.
*
* WARNING: Requires Object.assign
*
* @param arb - Arbitrary used to generate the values
* @param constraints - Constraints to apply when building instances (since 4.3.0)
*
* @remarks Since 1.8.0
* @public
*/
declare function infiniteStream<T>(arb: Arbitrary<T>, constraints?: InfiniteStreamConstraints): Arbitrary<Stream<T>>;
//#endregion
//#region src/arbitrary/base64String.d.ts
/**
* For base64 strings
*
* A base64 string will always have a length multiple of 4 (padded with =)
*
* @param constraints - Constraints to apply when building instances (since 2.4.0)
*
* @remarks Since 0.0.1
* @public
*/
declare function base64String(constraints?: StringSharedConstraints): Arbitrary<string>;
//#endregion
//#region src/arbitrary/subarray.d.ts
/**
* Constraints to be applied on {@link subarray}
* @remarks Since 2.4.0
* @public
*/
interface SubarrayConstraints {
/**
* Lower bound of the generated subarray size (included)
* @defaultValue 0
* @remarks Since 2.4.0
*/
minLength?: number;
/**
* Upper bound of the generated subarray size (included)
* @defaultValue The length of the original array itself
* @remarks Since 2.4.0
*/
maxLength?: number;
}
/**
* For subarrays of `originalArray` (keeps ordering)
*
* @param originalArray - Original array
* @param constraints - Constraints to apply when building instances (since 2.4.0)
*
* @remarks Since 1.5.0
* @public
*/
declare function subarray<T>(originalArray: T[], constraints?: SubarrayConstraints): Arbitrary<T[]>;
//#endregion
//#region src/arbitrary/shuffledSubarray.d.ts
/**
* Constraints to be applied on {@link shuffledSubarray}
* @remarks Since 2.18.0
* @public
*/
interface ShuffledSubarrayConstraints {
/**
* Lower bound of the generated subarray size (included)
* @defaultValue 0
* @remarks Since 2.4.0
*/
minLength?: number;
/**
* Upper bound of the generated subarray size (included)
* @defaultValue The length of the original array itself
* @remarks Since 2.4.0
*/
maxLength?: number;
}
/**
* For subarrays of `originalArray`
*
* @param originalArray - Original array
* @param constraints - Constraints to apply when building instances (since 2.4.0)
*
* @remarks Since 1.5.0
* @public
*/
declare function shuffledSubarray<T>(originalArray: T[], constraints?: ShuffledSubarrayConstraints): Arbitrary<T[]>;
//#endregion
//#region src/arbitrary/tuple.d.ts
/**
* For tuples produced using the provided `arbs`
*
* @param arbs - Ordered list of arbitraries
*
* @remarks Since 0.0.1
* @public
*/
declare function tuple<Ts extends unknown[]>(...arbs: { [K in keyof Ts]: Arbitrary<Ts[K]>; }): Arbitrary<Ts>;
//#endregion
//#region src/arbitrary/ulid.d.ts
/**
* For ulid
*
* According to {@link https://github.com/ulid/spec | ulid spec}
*
* No mixed case, only upper case digits (0-9A-Z except for: I,L,O,U)
*
* @remarks Since 3.11.0
* @public
*/
declare function ulid(): Arbitrary<string>;
//#endregion
//#region src/arbitrary/uuid.d.ts
/**
* Constraints to be applied on {@link uuid}
* @remarks Since 3.21.0
* @public
*/
interface UuidConstraints {
/**
* Define accepted versions in the [1-15] according to {@link https://datatracker.ietf.org/doc/html/rfc9562#name-version-field | RFC 9562}
* @defaultValue [1,2,3,4,5,6,7,8]
* @remarks Since 3.21.0
*/
version?: (1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15) | (1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15)[];
}
/**
* For UUID from v1 to v5
*
* According to {@link https://tools.ietf.org/html/rfc4122 | RFC 4122}
*
* No mixed case, only lower case digits (0-9a-f)
*
* @remarks Since 1.17.0
* @public
*/
declare function uuid(constraints?: UuidConstraints): Arbitrary<string>;
//#endregion
//#region src/arbitrary/webAuthority.d.ts
/**
* Constraints to be applied on {@link webAuthority}
* @remarks Since 1.14.0
* @public
*/
interface WebAuthorityConstraints {
/**
* Enable IPv4 in host
* @defaultValue false
* @remarks Since 1.14.0
*/
withIPv4?: boolean;
/**
* Enable IPv6 in host
* @defaultValue false
* @remarks Since 1.14.0
*/
withIPv6?: boolean;
/**
* Enable extended IPv4 format
* @defaultValue false
* @remarks Since 1.17.0
*/
withIPv4Extended?: boolean;
/**
* Enable user information prefix
* @defaultValue false
* @remarks Since 1.14.0
*/
withUserInfo?: boolean;
/**
* Enable port suffix
* @defaultValue false
* @remarks Since 1.14.0
*/
withPort?: boolean;
/**
* Define how large the generated values should be (at max)
* @remarks Since 2.22.0
*/
size?: Exclude<SizeForArbitrary, "max">;
}
/**
* For web authority
*
* According to {@link https://www.ietf.org/rfc/rfc3986.txt | RFC 3986} - `authority = [ userinfo "@" ] host [ ":" port ]`
*
* @param constraints - Constraints to apply when building instances
*
* @remarks Since 1.14.0
* @public
*/
declare function webAuthority(constraints?: WebAuthorityConstraints): Arbitrary<string>;
//#endregion
//#region src/arbitrary/webFragments.d.ts
/**
* Constraints to be applied on {@link webFragments}
* @remarks Since 2.22.0
* @public
*/
interface WebFragmentsConstraints {
/**
* Define how large the generated values should be (at max)
* @remarks Since 2.22.0
*/
size?: Exclude<SizeForArbitrary, "max">;
}
/**
* For fragments of an URI (web included)
*
* According to {@link https://www.ietf.org/rfc/rfc3986.txt | RFC 3986}
*
* eg.: In the url `https://domain/plop?page=1#hello=1&world=2`, `?hello=1&world=2` are query parameters
*
* @param constraints - Constraints to apply when building instances (since 2.22.0)
*
* @remarks Since 1.14.0
* @public
*/
declare function webFragments(constraints?: WebFragmentsConstraints): Arbitrary<string>;
//#endregion
//#region src/arbitrary/webPath.d.ts
/**
* Constraints to be applied on {@link webPath}
* @remarks Since 3.3.0
* @public
*/
interface WebPathConstraints {
/**
* Define how large the generated values should be (at max)
* @remarks Since 3.3.0
*/
size?: Exclude<SizeForArbitrary, "max">;
}
/**
* For web path
*
* According to {@link https://www.ietf.org/rfc/rfc3986.txt | RFC 3986} and
* {@link https://url.spec.whatwg.org/ | WHATWG URL Standard}
*
* @param constraints - Constraints to apply when building instances
*
* @remarks Since 3.3.0
* @public
*/
declare function webPath(constraints?: WebPathConstraints): Arbitrary<string>;
//#endregion
//#region src/arbitrary/webQueryParameters.d.ts
/**
* Constraints to be applied on {@link webQueryParameters}
* @remarks Since 2.22.0
* @public
*/
interface WebQueryParametersConstraints {
/**
* Define how large the generated values should be (at max)
* @remarks Since 2.22.0
*/
size?: Exclude<SizeForArbitrary, "max">;
}
/**
* For query parameters of an URI (web included)
*
* According to {@link https://www.ietf.org/rfc/rfc3986.txt | RFC 3986}
*
* eg.: In the url `https://domain/plop/?hello=1&world=2`, `?hello=1&world=2` are query parameters
*
* @param constraints - Constraints to apply when building instances (since 2.22.0)
*
* @remarks Since 1.14.0
* @public
*/
declare function webQueryParameters(constraints?: WebQueryParametersConstraints): Arbitrary<string>;
//#endregion
//#region src/arbitrary/webSegment.d.ts
/**
* Constraints to be applied on {@link webSegment}
* @remarks Since 2.22.0
* @public
*/
interface WebSegmentConstraints {
/**
* Define how large the generated values should be (at max)
* @remarks Since 2.22.0
*/
size?: Exclude<SizeForArbitrary, "max">;
}
/**
* For internal segment of an URI (web included)
*
* According to {@link https://www.ietf.org/rfc/rfc3986.txt | RFC 3986}
*
* eg.: In the url `https://github.com/dubzzz/fast-check/`, `dubzzz` and `fast-check` are segments
*
* @param constraints - Constraints to apply when building instances (since 2.22.0)
*
* @remarks Since 1.14.0
* @public
*/
declare function webSegment(constraints?: WebSegmentConstraints): Arbitrary<string>;
//#endregion
//#region src/arbitrary/webUrl.d.ts
/**
* Constraints to be applied on {@link webUrl}
* @remarks Since 1.14.0
* @public
*/
interface WebUrlConstraints {
/**
* Enforce specific schemes, eg.: http, https
* @defaultValue ['http', 'https']
* @remarks Since 1.14.0
*/
validSchemes?: string[];
/**
* Settings for {@link webAuthority}
* @defaultValue {}
* @remarks Since 1.14.0
*/
authoritySettings?: WebAuthorityConstraints;
/**
* Enable query parameters in the generated url
* @defaultValue false
* @remarks Since 1.14.0
*/
withQueryParameters?: boolean;
/**
* Enable fragments in the generated url
* @defaultValue false
* @remarks Since 1.14.0
*/
withFragments?: boolean;
/**
* Define how large the generated values should be (at max)
* @remarks Since 2.22.0
*/
size?: Exclude<SizeForArbitrary, "max">;
}
/**
* For web url
*
* According to {@link https://www.ietf.org/rfc/rfc3986.txt | RFC 3986} and
* {@link https://url.spec.whatwg.org/ | WHATWG URL Standard}
*
* @param constraints - Constraints to apply when building instances
*
* @remarks Since 1.14.0
* @public
*/
declare function webUrl(constraints?: WebUrlConstraints): Arbitrary<string>;
//#endregion
//#region src/check/model/command/ICommand.d.ts
/**
* Interface that should be implemented in order to define a command
* @remarks Since 1.5.0
* @public
*/
interface ICommand<Model extends object, Real, RunResult, CheckAsync extends boolean = false> {
/**
* Check if the model is in the right state to apply the command
*
* WARNING: does not change the model
*
* @param m - Model, simplified or schematic representation of real system
*
* @remarks Since 1.5.0
*/
check(m: Readonly<Model>): CheckAsync extends false ? boolean : Promise<boolean>;
/**
* Receive the non-updated model and the real or system under test.
* Perform the checks post-execution - Throw in case of invalid state.
* Update the model accordingly
*
* @param m - Model, simplified or schematic representation of real system
* @param r - Sytem under test
*
* @remarks Since 1.5.0
*/
run(m: Model, r: Real): RunResult;
/**
* Name of the command
* @remarks Since 1.5.0
*/
toString(): string;
}
//#endregion
//#region src/check/model/command/AsyncCommand.d.ts
/**
* Interface that should be implemented in order to define
* an asynchronous command
*
* @remarks Since 1.5.0
* @public
*/
interface AsyncCommand<Model extends object, Real, CheckAsync extends boolean = false> extends ICommand<Model, Real, Promise<void>, CheckAsync> {}
//#endregion
//#region src/check/model/command/Command.d.ts
/**
* Interface that should be implemented in order to define
* a synchronous command
*
* @remarks Since 1.5.0
* @public
*/
interface Command<Model extends object, Real> extends ICommand<Model, Real, void> {}
//#endregion
//#region src/check/model/commands/CommandsContraints.d.ts
/**
* Parameters for {@link commands}
* @remarks Since 2.2.0
* @public
*/
interface CommandsContraints {
/**
* Maximal number of commands to generate per run
*
* You probably want to use `size` instead.
*
* @defaultValue 0x7fffffff — _defaulting seen as "max non specified" when `defaultSizeToMaxWhenMaxSpecified=true`_
* @remarks Since 1.11.0
*/
maxCommands?: number;
/**
* Define how large the generated values (number of commands) should be (at max)
* @remarks Since 2.22.0
*/
size?: SizeForArbitrary;
/**
* Do not show replayPath in the output
* @defaultValue false
* @remarks Since 1.11.0
*/
disableReplayLog?: boolean;
/**
* Hint for replay purposes only
*
* Should be used in conjonction with `{ seed, path }` of {@link assert}
*
* @remarks Since 1.11.0
*/
replayPath?: string;
}
//#endregion
//#region src/arbitrary/commands.d.ts
/**
* For arrays of {@link AsyncCommand} to be executed by {@link asyncModelRun}
*
* This implementation comes with a shrinker adapted for commands.
* It should shrink more efficiently than {@link array} for {@link AsyncCommand} arrays.
*
* @param commandArbs - Arbitraries responsible to build commands
* @param constraints - Constraints to be applied when generating the commands (since 1.11.0)
*
* @remarks Since 1.5.0
* @public
*/
declare function commands<Model extends object, Real, CheckAsync extends boolean>(commandArbs: Arbitrary<AsyncCommand<Model, Real, CheckAsync>>[], constraints?: CommandsContraints): Arbitrary<Iterable<AsyncCommand<Model, Real, CheckAsync>>>;
/**
* For arrays of {@link Command} to be executed by {@link modelRun}
*
* This implementation comes with a shrinker adapted for commands.
* It should shrink more efficiently than {@link array} for {@link Command} arrays.
*
* @param commandArbs - Arbitraries responsible to build commands
* @param constraints - Constraints to be applied when generating the commands (since 1.11.0)
*
* @remarks Since 1.5.0
* @public
*/
declare function commands<Model extends object, Real>(commandArbs: Arbitrary<Command<Model, Real>>[], constraints?: CommandsContraints): Arbitrary<Iterable<Command<Model, Real>>>;
//#endregion
//#region src/arbitrary/_internals/interfaces/Scheduler.d.ts
/**
* Function responsible to run the passed function and surround it with whatever needed.
* The name has been inspired from the `act` function coming with React.
*
* This wrapper function is not supposed to throw. The received function f will never throw.
*
* Wrapping order in the following:
*
* - global act defined on `fc.scheduler` wraps wait level one
* - wait act defined on `s.waitX` wraps local one
* - local act defined on `s.scheduleX(...)` wraps the trigger function
*
* @remarks Since 3.9.0
* @public
*/
type SchedulerAct = (f: () => Promise<void>) => Promise<void>;
/**
* Instance able to reschedule the ordering of promises for a given app
* @remarks Since 1.20.0
* @public
*/
interface Scheduler<TMetaData = unknown> {
/**
* Wrap a new task using the Scheduler
* @remarks Since 1.20.0
*/
schedule: <T>(task: Promise<T>, label?: string, metadata?: TMetaData, customAct?: SchedulerAct) => Promise<T>;
/**
* Automatically wrap function output using the Scheduler
* @remarks Since 1.20.0
*/
scheduleFunction: <TArgs extends any[], T>(asyncFunction: (...args: TArgs) => Promise<T>, customAct?: SchedulerAct) => (...args: TArgs) => Promise<T>;
/**
* Schedule a sequence of Promise to be executed sequencially.
* Items within the sequence might be interleaved by other scheduled operations.
*
* Please note that whenever an item from the sequence has started,
* the scheduler will wait until its end before moving to another scheduled task.
*
* A handle is returned by the function in order to monitor the state of the sequence.
* Sequence will be marked:
* - done if all the promises have been executed properly
* - faulty if one of the promises within the sequence throws
*
* @remarks Since 1.20.0
*/
scheduleSequence(sequenceBuilders: SchedulerSequenceItem<TMetaData>[], customAct?: SchedulerAct): {
done: boolean;
faulty: boolean;
task: Promise<{
done: boolean;
faulty: boolean;
}>;
};
/**
* Count of pending scheduled tasks
* @remarks Since 1.20.0
*/
count(): number;
/**
* Wait one scheduled task to be executed
* @throws Whenever there is no task scheduled
* @remarks Since 1.20.0
* @deprecated Use `waitNext(1)` instead, it comes with a more predictable behavior
*/
waitOne: (customAct?: SchedulerAct) => Promise<void>;
/**
* Wait all scheduled tasks,
* including the ones that might be created by one of the resolved task
* @remarks Since 1.20.0
* @deprecated Use `waitIdle()` instead, it comes with a more predictable behavior awaiting all scheduled and reachable tasks to be completed
*/
waitAll: (customAct?: SchedulerAct) => Promise<void>;
/**
* Wait and schedule exactly `count` scheduled tasks.
* @remarks Since 4.2.0
*/
waitNext: (count: number, customAct?: SchedulerAct) => Promise<void>;
/**
* Wait until the scheduler becomes idle: all scheduled and reachable tasks have completed.
*
* It will include tasks scheduled by other tasks, recursively.
*
* Note: Tasks triggered by uncontrolled sources (like `fetch` or external events) cannot be detected
* or awaited and may lead to incomplete waits.
*
* If you want to wait for a precise event to happen you should rather opt for `waitFor` or `waitNext`
* given they offer you a more granular control on what you are exactly waiting for.
*
* @remarks Since 4.2.0
*/
waitIdle: (customAct?: SchedulerAct) => Promise<void>;
/**
* Wait as many scheduled tasks as need to resolve the received Promise
*
* Some tests frameworks like `supertest` are not triggering calls to subsequent queries in a synchronous way,
* some are waiting an explicit call to `then` to trigger them (either synchronously or asynchronously)...
* As a consequence, none of `waitOne` or `waitAll` cannot wait for them out-of-the-box.
*
* This helper is responsible to wait as many scheduled tasks as needed (but the bare minimal) to get
* `unscheduledTask` resolved. Once resolved it returns its output either success or failure.
*
* Be aware that while this helper will wait eveything to be ready for `unscheduledTask` to resolve,
* having uncontrolled tasks triggering stuff required for `unscheduledTask` might be a source a uncontrollable
* and not reproducible randomness as those triggers cannot be handled and scheduled by fast-check.
*
* @remarks Since 2.24.0
*/
waitFor: <T>(unscheduledTask: Promise<T>, customAct?: SchedulerAct) => Promise<T>;
/**
* Produce an array containing all the scheduled tasks so far with their execution status.
* If the task has been executed, it includes a string representation of the associated output or error produced by the task if any.
*
* Tasks will be returned in the order they get executed by the scheduler.
*
* @remarks Since 1.25.0
*/
report: () => SchedulerReportItem<TMetaData>[];
}
/**
* Define an item to be passed to `scheduleSequence`
* @remarks Since 1.20.0
* @public
*/
type SchedulerSequenceItem<TMetaData = unknown> = {
/**
* Builder to start the task
* @remarks Since 1.20.0
*/
builder: () => Promise<any>;
/**
* Label
* @remarks Since 1.20.0
*/
label: string;
/**
* Metadata to be attached into logs
* @remarks Since 1.25.0
*/
metadata?: TMetaData;
} | (() => Promise<any>);
/**
* Describe a task for the report produced by the scheduler
* @remarks Since 1.25.0
* @public
*/
interface SchedulerReportItem<TMetaData = unknown> {
/**
* Execution status for this task
* - resolved: task released by the scheduler and successful
* - rejected: task released by the scheduler but with errors
* - pending: task still pending in the scheduler, not released yet
*
* @remarks Since 1.25.0
*/
status: "resolved" | "rejected" | "pending";
/**
* How was this task scheduled?
* - promise: schedule
* - function: scheduleFunction
* - sequence: scheduleSequence
*
* @remarks Since 1.25.0
*/
schedulingType: "promise" | "function" | "sequence";
/**
* Incremental id for the task, first received task has taskId = 1
* @remarks Since 1.25.0
*/
taskId: number;
/**
* Label of the task
* @remarks Since 1.25.0
*/
label: string;
/**
* Metadata linked when scheduling the task
* @remarks Since 1.25.0
*/
metadata?: TMetaData;
/**
* Stringified version of the output or error computed using fc.stringify
* @remarks Since 1.25.0
*/
outputValue?: string;
}
//#endregion
//#region src/arbitrary/scheduler.d.ts
/**
* Constraints to be applied on {@link scheduler}
* @remarks Since 2.2.0
* @public
*/
interface SchedulerConstraints {
/**
* Ensure that all scheduled tasks will be executed in the right context (for instance it can be the `act` of React)
* @remarks Since 1.21.0
*/
act: (f: () => Promise<void>) => Promise<unknown>;
}
/**
* For scheduler of promises
* @remarks Since 1.20.0
* @public
*/
declare function scheduler<TMetaData = unknown>(constraints?: SchedulerConstraints): Arbitrary<Scheduler<TMetaData>>;
/**
* For custom scheduler with predefined resolution order
*
* Ordering is defined by using a template string like the one generated in case of failure of a {@link scheduler}
*
* It may be something like:
*
* @example
* ```typescript
* fc.schedulerFor()`
* -> [task\${2}] promise pending
* -> [task\${3}] promise pending
* -> [task\${1}] promise pending
* `
* ```
*
* Or more generally:
* ```typescript
* fc.schedulerFor()`
* This scheduler will resolve task ${2} first
* followed by ${3} and only then task ${1}
* `
* ```
*
* WARNING:
* Custom scheduler will
* neither check that all the referred promises have been scheduled
* nor that they resolved with the same status and value.
*
*
* WARNING:
* If one the promises is wrongly defined it will fail - for instance asking to resolve 5 while 5 does not exist.
*
* @remarks Since 1.25.0
* @public
*/
declare function schedulerFor<TMetaData = unknown>(constraints?: SchedulerConstraints): (_strs: TemplateStringsArray, ...ordering: number[]) => Scheduler<TMetaData>;
/**
* For custom scheduler with predefined resolution order
*
* WARNING:
* Custom scheduler will not check that all the referred promises have been scheduled.
*
*
* WARNING:
* If one the promises is wrongly defined it will fail - for instance asking to resolve 5 while 5 does not exist.
*
* @param customOrdering - Array defining in which order the promises will be resolved.
* Id of the promises start at 1. 1 means first scheduled promise, 2 second scheduled promise and so on.
*
* @remarks Since 1.25.0
* @public
*/
declare function schedulerFor<TMetaData = unknown>(customOrdering: number[], constraints?: SchedulerConstraints): Scheduler<TMetaData>;
//#endregion
//#region src/check/model/ModelRunner.d.ts
/**
* Synchronous definition of model and real
* @remarks Since 2.2.0
* @public
*/
type ModelRunSetup<Model, Real> = () => {
model: Model;
real: Real;
};
/**
* Asynchronous definition of model and real
* @remarks Since 2.2.0
* @public
*/
type ModelRunAsyncSetup<Model, Real> = () => Promise<{
model: Model;
real: Real;
}>;
/**
* Run synchronous commands over a `Model` and the `Real` system
*
* Throw in case of inconsistency
*
* @param s - Initial state provider
* @param cmds - Synchronous commands to be executed
*
* @remarks Since 1.5.0
* @public
*/
declare function modelRun<Model extends object, Real, InitialModel extends Model>(s: ModelRunSetup<InitialModel, Real>, cmds: Iterable<Command<Model, Real>>): void;
/**
* Run asynchronous commands over a `Model` and the `Real` system
*
* Throw in case of inconsistency
*
* @param s - Initial state provider
* @param cmds - Asynchronous commands to be executed
*
* @remarks Since 1.5.0
* @public
*/
declare function asyncModelRun<Model extends object, Real, CheckAsync extends boolean, InitialModel extends Model>(s: ModelRunSetup<InitialModel, Real> | ModelRunAsyncSetup<InitialModel, Real>, cmds: Iterable<AsyncCommand<Model, Real, CheckAsync>>): Promise<void>;
/**
* Run asynchronous and scheduled commands over a `Model` and the `Real` system
*
* Throw in case of inconsistency
*
* @param scheduler - Scheduler
* @param s - Initial state provider
* @param cmds - Asynchronous commands to be executed
*
* @remarks Since 1.24.0
* @public
*/
declare function scheduledModelRun<Model extends object, Real, CheckAsync extends boolean, InitialModel extends Model>(scheduler: Scheduler, s: ModelRunSetup<InitialModel, Real> | ModelRunAsyncSetup<InitialModel, Real>, cmds: Iterable<AsyncCommand<Model, Real, CheckAsync>>): Promise<void>;
//#endregion
//#region src/check/symbols.d.ts
/**
* Generated instances having a method [cloneMethod]
* will be automatically cloned whenever necessary
*
* This is pretty useful for statefull generated values.
* For instance, whenever you use a Stream you directly impact it.
* Implementing [cloneMethod] on the generated Stream would force
* the framework to clone it whenever it has to re-use it
* (mainly required for chrinking process)
*
* @remarks Since 1.8.0
* @public
*/
declare const cloneMethod: unique symbol;
/**
* Object instance that should be cloned from one generation/shrink to another
* @remarks Since 2.15.0
* @public
*/
interface WithCloneMethod<T> {
[cloneMethod]: () => T;
}
/**
* Check if an instance has to be clone
* @remarks Since 2.15.0
* @public
*/
declare function hasCloneMethod<T>(instance: T | WithCloneMethod<T>): instance is WithCloneMethod<T>;
/**
* Clone an instance if needed
* @remarks Since 2.15.0
* @public
*/
declare function cloneIfNeeded<T>(instance: T): T;
//#endregion
//#region src/utils/hash.d.ts
/**
* CRC-32 based hash function
*
* Used internally by fast-check in {@link func}, {@link compareFunc} or even {@link compareBooleanFunc}.
*
* @param repr - String value to be hashed
*
* @remarks Since 2.1.0
* @public
*/
declare function hash(repr: string): number;
//#endregion
//#region src/utils/stringify.d.ts
/**
* Use this symbol to define a custom serializer for your instances.
* Serializer must be a function returning a string (see {@link WithToStringMethod}).
*
* @remarks Since 2.17.0
* @public
*/
declare const toStringMethod: unique symbol;
/**
* Interface to implement for {@link toStringMethod}
*
* @remarks Since 2.17.0
* @public
*/
type WithToStringMethod = {
[toStringMethod]: () => string;
};
/**
* Check if an instance implements {@link WithToStringMethod}
*
* @remarks Since 2.17.0
* @public
*/
declare function hasToStringMethod<T>(instance: T): instance is T & WithToStringMethod;
/**
* Use this symbol to define a custom serializer for your instances.
* Serializer must be a function returning a promise of string (see {@link WithAsyncToStringMethod}).
*
* Please note that:
* 1. It will only be useful for asynchronous properties.
* 2. It has to return barely instantly.
*
* @remarks Since 2.17.0
* @public
*/
declare const asyncToStringMethod: unique symbol;
/**
* Interface to implement for {@link asyncToStringMethod}
*
* @remarks Since 2.17.0
* @public
*/
type WithAsyncToStringMethod = {
[asyncToStringMethod]: () => Promise<string>;
};
/**
* Check if an instance implements {@link WithAsyncToStringMethod}
*
* @remarks Since 2.17.0
* @public
*/
declare function hasAsyncToStringMethod<T>(instance: T): instance is T & WithAsyncToStringMethod;
/**
* Convert any value to its fast-check string representation
*
* @param value - Value to be converted into a string
*
* @remarks Since 1.15.0
* @public
*/
declare function stringify<Ts>(value: Ts): string;
/**
* Convert any value to its fast-check string representation
*
* This asynchronous version is also able to dig into the status of Promise
*
* @param value - Value to be converted into a string
*
* @remarks Since 2.17.0
* @public
*/
declare function asyncStringify<Ts>(value: Ts): Promise<string>;
//#endregion
//#region src/check/runner/utils/RunDetailsFormatter.d.ts
/**
* Format output of {@link check} using the default error reporting of {@link assert}
*
* Produce a string containing the formated error in case of failed run,
* undefined otherwise.
*
* @remarks Since 1.25.0
* @public
*/
declare function defaultReportMessage<Ts>(out: RunDetails<Ts> & {
failed: false;
}): undefined;
/**
* Format output of {@link check} using the default error reporting of {@link assert}
*
* Produce a string containing the formated error in case of failed run,
* undefined otherwise.
*
* @remarks Since 1.25.0
* @public
*/
declare function defaultReportMessage<Ts>(out: RunDetails<Ts> & {
failed: true;
}): string;
/**
* Format output of {@link check} using the default error reporting of {@link assert}
*
* Produce a string containing the formated error in case of failed run,
* undefined otherwise.
*
* @remarks Since 1.25.0
* @public
*/
declare function defaultReportMessage<Ts>(out: RunDetails<Ts>): string | undefined;
/**
* Format output of {@link check} using the default error reporting of {@link assert}
*
* Produce a string containing the formated error in case of failed run,
* undefined otherwise.
*
* @remarks Since 2.17.0
* @public
*/
declare function asyncDefaultReportMessage<Ts>(out: RunDetails<Ts> & {
failed: false;
}): Promise<undefined>;
/**
* Format output of {@link check} using the default error reporting of {@link assert}
*
* Produce a string containing the formated error in case of failed run,
* undefined otherwise.
*
* @remarks Since 2.17.0
* @public
*/
declare function asyncDefaultReportMessage<Ts>(out: RunDetails<Ts> & {
failed: true;
}): Promise<string>;
/**
* Format output of {@link check} using the default error reporting of {@link assert}
*
* Produce a string containing the formated error in case of failed run,
* undefined otherwise.
*
* @remarks Since 2.17.0
* @public
*/
declare function asyncDefaultReportMessage<Ts>(out: RunDetails<Ts>): Promise<string | undefined>;
//#endregion
//#region src/arbitrary/_internals/builders/TypedIntArrayArbitraryBuilder.d.ts
/**
* Constraints to be applied on typed arrays for integer values
* @remarks Since 2.9.0
* @public
*/
type IntArrayConstraints = {
/**
* Lower bound of the generated array size
* @defaultValue 0
* @remarks Since 2.9.0
*/
minLength?: number;
/**
* Upper bound of the generated array size
* @defaultValue 0x7fffffff — _defaulting seen as "max non specified" when `defaultSizeToMaxWhenMaxSpecified=true`_
* @remarks Since 2.9.0
*/
maxLength?: number;
/**
* Lower bound for the generated int (included)
* @defaultValue smallest possible value for this type
* @remarks Since 2.9.0
*/
min?: number;
/**
* Upper bound for the generated int (included)
* @defaultValue highest possible value for this type
* @remarks Since 2.9.0
*/
max?: number;
/**
* Define how large the generated values should be (at max)
* @remarks Since 2.22.0
*/
size?: SizeForArbitrary;
};
/**
* Constraints to be applied on typed arrays for big int values
* @remarks Since 3.0.0
* @public
*/
type BigIntArrayConstraints = {
/**
* Lower bound of the generated array size
* @defaultValue 0
* @remarks Since 3.0.0
*/
minLength?: number;
/**
* Upper bound of the generated array size
* @defaultValue 0x7fffffff — _defaulting seen as "max non specified" when `defaultSizeToMaxWhenMaxSpecified=true`_
* @remarks Since 3.0.0
*/
maxLength?: number;
/**
* Lower bound for the generated int (included)
* @defaultValue smallest possible value for this type
* @remarks Since 3.0.0
*/
min?: bigint;
/**
* Upper bound for the generated int (included)
* @defaultValue highest possible value for this type
* @remarks Since 3.0.0
*/
max?: bigint;
/**
* Define how large the generated values should be (at max)
* @remarks Since 3.0.0
*/
size?: SizeForArbitrary;
};
//#endregion
//#region src/arbitrary/int8Array.d.ts
/**
* For Int8Array
* @remarks Since 2.9.0
* @public
*/
declare function int8Array(constraints?: IntArrayConstraints): Arbitrary<Int8Array<ArrayBuffer>>;
//#endregion
//#region src/arbitrary/int16Array.d.ts
/**
* For Int16Array
* @remarks Since 2.9.0
* @public
*/
declare function int16Array(constraints?: IntArrayConstraints): Arbitrary<Int16Array<ArrayBuffer>>;
//#endregion
//#region src/arbitrary/int32Array.d.ts
/**
* For Int32Array
* @remarks Since 2.9.0
* @public
*/
declare function int32Array(constraints?: IntArrayConstraints): Arbitrary<Int32Array<ArrayBuffer>>;
//#endregion
//#region src/arbitrary/uint8Array.d.ts
/**
* For Uint8Array
* @remarks Since 2.9.0
* @public
*/
declare function uint8Array(constraints?: IntArrayConstraints): Arbitrary<Uint8Array<ArrayBuffer>>;
//#endregion
//#region src/arbitrary/uint8ClampedArray.d.ts
/**
* For Uint8ClampedArray
* @remarks Since 2.9.0
* @public
*/
declare function uint8ClampedArray(constraints?: IntArrayConstraints): Arbitrary<Uint8ClampedArray<ArrayBuffer>>;
//#endregion
//#region src/arbitrary/uint16Array.d.ts
/**
* For Uint16Array
* @remarks Since 2.9.0
* @public
*/
declare function uint16Array(constraints?: IntArrayConstraints): Arbitrary<Uint16Array<ArrayBuffer>>;
//#endregion
//#region src/arbitrary/uint32Array.d.ts
/**
* For Uint32Array
* @remarks Since 2.9.0
* @public
*/
declare function uint32Array(constraints?: IntArrayConstraints): Arbitrary<Uint32Array<ArrayBuffer>>;
//#endregion
//#region src/arbitrary/float32Array.d.ts
/**
* Constraints to be applied on {@link float32Array}
* @remarks Since 2.9.0
* @public
*/
type Float32ArrayConstraints = {
/**
* Lower bound of the generated array size
* @defaultValue 0
* @remarks Since 2.9.0
*/
minLength?: number;
/**
* Upper bound of the generated array size
* @defaultValue 0x7fffffff — _defaulting seen as "max non specified" when `defaultSizeToMaxWhenMaxSpecified=true`_
* @remarks Since 2.9.0
*/
maxLength?: number;
/**
* Define how large the generated values should be (at max)
* @remarks Since 2.22.0
*/
size?: SizeForArbitrary;
} & FloatConstraints;
/**
* For Float32Array
* @remarks Since 2.9.0
* @public
*/
declare function float32Array(constraints?: Float32ArrayConstraints): Arbitrary<Float32Array<ArrayBuffer>>;
//#endregion
//#region src/arbitrary/float64Array.d.ts
/**
* Constraints to be applied on {@link float64Array}
* @remarks Since 2.9.0
* @public
*/
type Float64ArrayConstraints = {
/**
* Lower bound of the generated array size
* @defaultValue 0
* @remarks Since 2.9.0
*/
minLength?: number;
/**
* Upper bound of the generated array size
* @defaultValue 0x7fffffff — _defaulting seen as "max non specified" when `defaultSizeToMaxWhenMaxSpecified=true`_
* @remarks Since 2.9.0
*/
maxLength?: number;
/**
* Define how large the generated values should be (at max)
* @remarks Since 2.22.0
*/
size?: SizeForArbitrary;
} & DoubleConstraints;
/**
* For Float64Array
* @remarks Since 2.9.0
* @public
*/
declare function float64Array(constraints?: Float64ArrayConstraints): Arbitrary<Float64Array<ArrayBuffer>>;
//#endregion
//#region src/arbitrary/sparseArray.d.ts
/**
* Constraints to be applied on {@link sparseArray}
* @remarks Since 2.13.0
* @public
*/
interface SparseArrayConstraints {
/**
* Upper bound of the generated array size (maximal size: 4294967295)
* @defaultValue 0x7fffffff — _defaulting seen as "max non specified" when `defaultSizeToMaxWhenMaxSpecified=true`_
* @remarks Since 2.13.0
*/
maxLength?: number;
/**
* Lower bound of the number of non-hole elements
* @defaultValue 0
* @remarks Since 2.13.0
*/
minNumElements?: number;
/**
* Upper bound of the number of non-hole elements
* @defaultValue 0x7fffffff — _defaulting seen as "max non specified" when `defaultSizeToMaxWhenMaxSpecified=true`_
* @remarks Since 2.13.0
*/
maxNumElements?: number;
/**
* When enabled, all generated arrays will either be the empty array or end by a non-hole
* @defaultValue false
* @remarks Since 2.13.0
*/
noTrailingHole?: boolean;
/**
* Define how large the generated values should be (at max)
* @remarks Since 2.22.0
*/
size?: SizeForArbitrary;
/**
* When receiving a depth identifier, the arbitrary will impact the depth
* attached to it to avoid going too deep if it already generated lots of items.
*
* In other words, if the number of generated values within the collection is large
* then the generated items will tend to be less deep to avoid creating structures a lot
* larger than expected.
*
* For the moment, the depth is not taken into account to compute the number of items to
* define for a precise generate call of the array. Just applied onto eligible items.
*
* @remarks Since 2.25.0
*/
depthIdentifier?: DepthIdentifier | string;
}
/**
* For sparse arrays of values coming from `arb`
* @param arb - Arbitrary used to generate the values inside the sparse array
* @param constraints - Constraints to apply when building instances
* @remarks Since 2.13.0
* @public
*/
declare function sparseArray<T>(arb: Arbitrary<T>, constraints?: SparseArrayConstraints): Arbitrary<T[]>;
//#endregion
//#region src/arbitrary/bigInt64Array.d.ts
/**
* For BigInt64Array
* @remarks Since 3.0.0
* @public
*/
declare function bigInt64Array(constraints?: BigIntArrayConstraints): Arbitrary<BigInt64Array<ArrayBuffer>>;
//#endregion
//#region src/arbitrary/bigUint64Array.d.ts
/**
* For BigUint64Array
* @remarks Since 3.0.0
* @public
*/
declare function bigUint64Array(constraints?: BigIntArrayConstraints): Arbitrary<BigUint64Array<ArrayBuffer>>;
//#endregion
//#region src/arbitrary/stringMatching.d.ts
/**
* Constraints to be applied on the arbitrary {@link stringMatching}
* @remarks Since 3.10.0
* @public
*/
type StringMatchingConstraints = {
/**
* Upper bound of the generated string length (included)
* @defaultValue 0x7fffffff
* @remarks Since 4.6.0
*/
maxLength?: number;
/**
* Define how large the generated values should be (at max)
* @remarks Since 3.10.0
*/
size?: SizeForArbitrary;
};
/**
* For strings matching the provided regex
*
* @param regex - Arbitrary able to generate random strings (possibly multiple characters)
* @param constraints - Constraints to apply when building instances
*
* @remarks Since 3.10.0
* @public
*/
declare function stringMatching(regex: RegExp, constraints?: StringMatchingConstraints): Arbitrary<string>;
//#endregion
//#region src/arbitrary/noShrink.d.ts
/**
* Build an arbitrary without shrinking capabilities.
*
* NOTE:
* In most cases, users should avoid disabling shrinking capabilities.
* If the concern is the shrinking process taking too long or being unnecessary in CI environments,
* consider using alternatives like `endOnFailure` or `interruptAfterTimeLimit` instead.
*
* @param arb - The original arbitrary used for generating values. This arbitrary remains unchanged, but its shrinking capabilities will not be included in the new arbitrary.
*
* @remarks Since 3.20.0
* @public
*/
declare function noShrink<T>(arb: Arbitrary<T>): Arbitrary<T>;
//#endregion
//#region src/arbitrary/noBias.d.ts
/**
* Build an arbitrary without any bias.
*
* The produced instance wraps the source one and ensures the bias factor will always be passed to undefined meaning bias will be deactivated.
* All the rest stays unchanged.
*
* @param arb - The original arbitrary used for generating values. This arbitrary remains unchanged.
*
* @remarks Since 3.20.0
* @public
*/
declare function noBias<T>(arb: Arbitrary<T>): Arbitrary<T>;
//#endregion
//#region src/arbitrary/limitShrink.d.ts
/**
* Create another Arbitrary with a limited (or capped) number of shrink values
*
* @example
* ```typescript
* const dataGenerator: Arbitrary<string> = ...;
* const limitedShrinkableDataGenerator: Arbitrary<string> = fc.limitShrink(dataGenerator, 10);
* // up to 10 shrunk values could be extracted from the resulting arbitrary
* ```
*
* NOTE: Although limiting the shrinking capabilities can speed up your CI when failures occur, we do not recommend this approach.
* Instead, if you want to reduce the shrinking time for automated jobs or local runs, consider using `endOnFailure` or `interruptAfterTimeLimit`.
*
* @param arbitrary - Instance of arbitrary responsible to generate and shrink values
* @param maxShrinks - Maximal number of shrunk values that can be pulled from the resulting arbitrary
*
* @returns Create another arbitrary with limited number of shrink values
* @remarks Since 3.20.0
* @public
*/
declare function limitShrink<T>(arbitrary: Arbitrary<T>, maxShrinks: number): Arbitrary<T>;
/** @public */ declare namespace fc {
export { Arbitrary, ArrayConstraints, AsyncCommand, AsyncPropertyHookFunction, BigIntArrayConstraints, BigIntConstraints, CloneValue, Command, CommandsContraints, ContextValue, DateConstraints, DepthContext, DepthIdentifier, DepthSize, DictionaryConstraints, DomainConstraints, DoubleConstraints, EmailAddressConstraints, Arbitraries as EntityGraphArbitraries, EntityGraphConstraints, EntityGraphContraints, EntityRelations as EntityGraphRelations, EntityGraphValue, ExecutionStatus, ExecutionTree, FalsyContraints, FalsyValue, Float32ArrayConstraints, Float64ArrayConstraints, FloatConstraints, GeneratorValue, GlobalAsyncPropertyHookFunction, GlobalParameters, GlobalPropertyHookFunction, IAsyncProperty, IAsyncPropertyWithHooks, ICommand, IProperty, IPropertyWithHooks, IRawProperty, IntArrayConstraints, IntegerConstraints, JsonSharedConstraints, JsonValue, LetrecLooselyTypedBuilder, LetrecLooselyTypedTie, LetrecTypedBuilder, LetrecTypedTie, LetrecValue, LoremConstraints, MapConstraints, MaybeWeightedArbitrary, Memo, MixedCaseConstraints, ModelRunAsyncSetup, ModelRunSetup, NatConstraints, ObjectConstraints, OneOfConstraints, OneOfValue, OptionConstraints, Parameters, PreconditionFailure, PropertyFailure, PropertyHookFunction, Random, RandomGenerator, RandomType, RecordConstraints, RecordValue, RunDetails, RunDetailsCommon, RunDetailsFailureInterrupted, RunDetailsFailureProperty, RunDetailsFailureTooManySkips, RunDetailsSuccess, Scheduler, SchedulerAct, SchedulerConstraints, SchedulerReportItem, SchedulerSequenceItem, SetConstraints, ShuffledSubarrayConstraints, Size, SizeForArbitrary, SparseArrayConstraints, Stream, StringConstraints, StringMatchingConstraints, StringSharedConstraints, SubarrayConstraints, UniqueArrayConstraints, UniqueArrayConstraintsCustomCompare, UniqueArrayConstraintsCustomCompareSelect, UniqueArrayConstraintsRecommended, UniqueArraySharedConstraints, UuidConstraints, Value, VerbosityLevel, WebAuthorityConstraints, WebFragmentsConstraints, WebPathConstraints, WebQueryParametersConstraints, WebSegmentConstraints, WebUrlConstraints, WeightedArbitrary, WithAsyncToStringMethod, WithCloneMethod, WithToStringMethod, __commitHash, __type, __version, anything, array, assert, asyncDefaultReportMessage, asyncModelRun, asyncProperty, asyncStringify, asyncToStringMethod, base64String, bigInt, bigInt64Array, bigUint64Array, boolean, chainUntil, check, clone, cloneIfNeeded, cloneMethod, commands, compareBooleanFunc, compareFunc, configureGlobal, constant, constantFrom, context, createDepthIdentifier, date, defaultReportMessage, dictionary, domain, double, emailAddress, entityGraph, falsy, float, float32Array, float64Array, func, gen, getDepthContextFor, hasAsyncToStringMethod, hasCloneMethod, hasToStringMethod, hash, infiniteStream, int16Array, int32Array, int8Array, integer, ipV4, ipV4Extended, ipV6, json, jsonValue, letrec, limitShrink, lorem, map, mapToConstant, maxSafeInteger, maxSafeNat, memo, mixedCase, modelRun, nat, noBias, noShrink, object, oneof, option, pre, property, readConfigureGlobal, record, resetConfigureGlobal, sample, scheduledModelRun, scheduler, schedulerFor, set, shuffledSubarray, sparseArray, statistics, stream, string, stringMatching, stringify, subarray, toStringMethod, tuple, uint16Array, uint32Array, uint8Array, uint8ClampedArray, ulid, uniqueArray, uuid, webAuthority, webFragments, webPath, webQueryParameters, webSegment, webUrl };
}
/**
* Type of module (commonjs or module)
* @remarks Since 1.22.0
* @public
*/
declare const __type: string;
/**
* Version of fast-check used by your project (eg.: "4.9.0")
* @remarks Since 1.22.0
* @public
*/
declare const __version: string;
/**
* Commit hash of the current code (eg.: "0d3c2547dce556f72413607849377530d18ea283")
* @remarks Since 2.7.0
* @public
*/
declare const __commitHash: string;
//#endregion
export { Arbitrary, type ArrayConstraints, type AsyncCommand, type AsyncPropertyHookFunction, type BigIntArrayConstraints, type BigIntConstraints, type CloneValue, type Command, type CommandsContraints, type ContextValue, type DateConstraints, type DepthContext, type DepthIdentifier, type DepthSize, type DictionaryConstraints, type DomainConstraints, type DoubleConstraints, type EmailAddressConstraints, type Arbitraries as EntityGraphArbitraries, type EntityGraphConstraints, type EntityGraphContraints, type EntityRelations as EntityGraphRelations, type EntityGraphValue, ExecutionStatus, type ExecutionTree, type FalsyContraints, type FalsyValue, type Float32ArrayConstraints, type Float64ArrayConstraints, type FloatConstraints, type GeneratorValue, type GlobalAsyncPropertyHookFunction, type GlobalParameters, type GlobalPropertyHookFunction, type IAsyncProperty, type IAsyncPropertyWithHooks, type ICommand, type IProperty, type IPropertyWithHooks, type IRawProperty, type IntArrayConstraints, type IntegerConstraints, type JsonSharedConstraints, type JsonValue, type LetrecLooselyTypedBuilder, type LetrecLooselyTypedTie, type LetrecTypedBuilder, type LetrecTypedTie, type LetrecValue, type LoremConstraints, type MapConstraints, type MaybeWeightedArbitrary, type Memo, type MixedCaseConstraints, type ModelRunAsyncSetup, type ModelRunSetup, type NatConstraints, type ObjectConstraints, type OneOfConstraints, type OneOfValue, type OptionConstraints, type Parameters, PreconditionFailure, type PropertyFailure, type PropertyHookFunction, Random, type RandomGenerator, type RandomType, type RecordConstraints, type RecordValue, type RunDetails, type RunDetailsCommon, type RunDetailsFailureInterrupted, type RunDetailsFailureProperty, type RunDetailsFailureTooManySkips, type RunDetailsSuccess, type Scheduler, type SchedulerAct, type SchedulerConstraints, type SchedulerReportItem, type SchedulerSequenceItem, type SetConstraints, type ShuffledSubarrayConstraints, type Size, type SizeForArbitrary, type SparseArrayConstraints, Stream, type StringConstraints, type StringMatchingConstraints, type StringSharedConstraints, type SubarrayConstraints, type UniqueArrayConstraints, type UniqueArrayConstraintsCustomCompare, type UniqueArrayConstraintsCustomCompareSelect, type UniqueArrayConstraintsRecommended, type UniqueArraySharedConstraints, type UuidConstraints, Value, VerbosityLevel, type WebAuthorityConstraints, type WebFragmentsConstraints, type WebPathConstraints, type WebQueryParametersConstraints, type WebSegmentConstraints, type WebUrlConstraints, type WeightedArbitrary, type WithAsyncToStringMethod, type WithCloneMethod, type WithToStringMethod, __commitHash, __type, __version, anything, array, assert, asyncDefaultReportMessage, asyncModelRun, asyncProperty, asyncStringify, asyncToStringMethod, base64String, bigInt, bigInt64Array, bigUint64Array, boolean, chainUntil, check, clone, cloneIfNeeded, cloneMethod, commands, compareBooleanFunc, compareFunc, configureGlobal, constant, constantFrom, context, createDepthIdentifier, date, fc as default, defaultReportMessage, dictionary, domain, double, emailAddress, entityGraph, falsy, float, float32Array, float64Array, func, gen, getDepthContextFor, hasAsyncToStringMethod, hasCloneMethod, hasToStringMethod, hash, infiniteStream, int16Array, int32Array, int8Array, integer, ipV4, ipV4Extended, ipV6, json, jsonValue, letrec, limitShrink, lorem, map, mapToConstant, maxSafeInteger, maxSafeNat, memo, mixedCase, modelRun, nat, noBias, noShrink, object, oneof, option, pre, property, readConfigureGlobal, record, resetConfigureGlobal, sample, scheduledModelRun, scheduler, schedulerFor, set, shuffledSubarray, sparseArray, statistics, stream, string, stringMatching, stringify, subarray, toStringMethod, tuple, uint16Array, uint32Array, uint8Array, uint8ClampedArray, ulid, uniqueArray, uuid, webAuthority, webFragments, webPath, webQueryParameters, webSegment, webUrl }; |