@procedures/optional 0.0.0-stage → 0.62.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1620 @@
1
+ export const manifest = {
2
+ "format": "procedures-exports/1",
3
+ "package": "@mark1russell7/optional",
4
+ "version": "1.2.0",
5
+ "entry": ".",
6
+ "namespace": [
7
+ "optional"
8
+ ],
9
+ "$defs": {
10
+ "Err_E": {
11
+ "type": "object",
12
+ "properties": {
13
+ "tag": {
14
+ "const": "err"
15
+ },
16
+ "error": {}
17
+ },
18
+ "required": [
19
+ "tag",
20
+ "error"
21
+ ]
22
+ },
23
+ "Err_E_2": {
24
+ "type": "object",
25
+ "properties": {
26
+ "tag": {
27
+ "const": "err"
28
+ },
29
+ "error": {}
30
+ },
31
+ "required": [
32
+ "tag",
33
+ "error"
34
+ ]
35
+ },
36
+ "Err_E_3": {
37
+ "type": "object",
38
+ "properties": {
39
+ "tag": {
40
+ "const": "err"
41
+ },
42
+ "error": {}
43
+ },
44
+ "required": [
45
+ "tag",
46
+ "error"
47
+ ]
48
+ },
49
+ "Err_E_4": {
50
+ "type": "object",
51
+ "properties": {
52
+ "tag": {
53
+ "const": "err"
54
+ },
55
+ "error": {}
56
+ },
57
+ "required": [
58
+ "tag",
59
+ "error"
60
+ ]
61
+ },
62
+ "Err_E_5": {
63
+ "type": "object",
64
+ "properties": {
65
+ "tag": {
66
+ "const": "err"
67
+ },
68
+ "error": {}
69
+ },
70
+ "required": [
71
+ "tag",
72
+ "error"
73
+ ]
74
+ },
75
+ "Err_E_6": {
76
+ "type": "object",
77
+ "properties": {
78
+ "tag": {
79
+ "const": "err"
80
+ },
81
+ "error": {}
82
+ },
83
+ "required": [
84
+ "tag",
85
+ "error"
86
+ ]
87
+ },
88
+ "Err_E_7": {
89
+ "type": "object",
90
+ "properties": {
91
+ "tag": {
92
+ "const": "err"
93
+ },
94
+ "error": {}
95
+ },
96
+ "required": [
97
+ "tag",
98
+ "error"
99
+ ]
100
+ },
101
+ "Err_E_8": {
102
+ "type": "object",
103
+ "properties": {
104
+ "tag": {
105
+ "const": "err"
106
+ },
107
+ "error": {}
108
+ },
109
+ "required": [
110
+ "tag",
111
+ "error"
112
+ ]
113
+ },
114
+ "Err_E_9": {
115
+ "type": "object",
116
+ "properties": {
117
+ "tag": {
118
+ "const": "err"
119
+ },
120
+ "error": {}
121
+ },
122
+ "required": [
123
+ "tag",
124
+ "error"
125
+ ]
126
+ },
127
+ "Err_E_F": {
128
+ "type": "object",
129
+ "properties": {
130
+ "tag": {
131
+ "const": "err"
132
+ },
133
+ "error": {}
134
+ },
135
+ "required": [
136
+ "tag",
137
+ "error"
138
+ ]
139
+ },
140
+ "Err_F": {
141
+ "type": "object",
142
+ "properties": {
143
+ "tag": {
144
+ "const": "err"
145
+ },
146
+ "error": {}
147
+ },
148
+ "required": [
149
+ "tag",
150
+ "error"
151
+ ]
152
+ },
153
+ "Err_F_2": {
154
+ "type": "object",
155
+ "properties": {
156
+ "tag": {
157
+ "const": "err"
158
+ },
159
+ "error": {}
160
+ },
161
+ "required": [
162
+ "tag",
163
+ "error"
164
+ ]
165
+ },
166
+ "None": {
167
+ "type": "object",
168
+ "properties": {
169
+ "tag": {
170
+ "const": "none"
171
+ }
172
+ },
173
+ "required": [
174
+ "tag"
175
+ ]
176
+ },
177
+ "Ok_T": {
178
+ "type": "object",
179
+ "properties": {
180
+ "tag": {
181
+ "const": "ok"
182
+ },
183
+ "value": {}
184
+ },
185
+ "required": [
186
+ "tag",
187
+ "value"
188
+ ]
189
+ },
190
+ "Ok_T_2": {
191
+ "type": "object",
192
+ "properties": {
193
+ "tag": {
194
+ "const": "ok"
195
+ },
196
+ "value": {}
197
+ },
198
+ "required": [
199
+ "tag",
200
+ "value"
201
+ ]
202
+ },
203
+ "Ok_T_3": {
204
+ "type": "object",
205
+ "properties": {
206
+ "tag": {
207
+ "const": "ok"
208
+ },
209
+ "value": {}
210
+ },
211
+ "required": [
212
+ "tag",
213
+ "value"
214
+ ]
215
+ },
216
+ "Ok_T_4": {
217
+ "type": "object",
218
+ "properties": {
219
+ "tag": {
220
+ "const": "ok"
221
+ },
222
+ "value": {}
223
+ },
224
+ "required": [
225
+ "tag",
226
+ "value"
227
+ ]
228
+ },
229
+ "Ok_T_5": {
230
+ "type": "object",
231
+ "properties": {
232
+ "tag": {
233
+ "const": "ok"
234
+ },
235
+ "value": {}
236
+ },
237
+ "required": [
238
+ "tag",
239
+ "value"
240
+ ]
241
+ },
242
+ "Ok_T_6": {
243
+ "type": "object",
244
+ "properties": {
245
+ "tag": {
246
+ "const": "ok"
247
+ },
248
+ "value": {}
249
+ },
250
+ "required": [
251
+ "tag",
252
+ "value"
253
+ ]
254
+ },
255
+ "Ok_T_7": {
256
+ "type": "object",
257
+ "properties": {
258
+ "tag": {
259
+ "const": "ok"
260
+ },
261
+ "value": {}
262
+ },
263
+ "required": [
264
+ "tag",
265
+ "value"
266
+ ]
267
+ },
268
+ "Ok_T_8": {
269
+ "type": "object",
270
+ "properties": {
271
+ "tag": {
272
+ "const": "ok"
273
+ },
274
+ "value": {}
275
+ },
276
+ "required": [
277
+ "tag",
278
+ "value"
279
+ ]
280
+ },
281
+ "Ok_T_9": {
282
+ "type": "object",
283
+ "properties": {
284
+ "tag": {
285
+ "const": "ok"
286
+ },
287
+ "value": {}
288
+ },
289
+ "required": [
290
+ "tag",
291
+ "value"
292
+ ]
293
+ },
294
+ "Ok_U": {
295
+ "type": "object",
296
+ "properties": {
297
+ "tag": {
298
+ "const": "ok"
299
+ },
300
+ "value": {}
301
+ },
302
+ "required": [
303
+ "tag",
304
+ "value"
305
+ ]
306
+ },
307
+ "Ok_U_2": {
308
+ "type": "object",
309
+ "properties": {
310
+ "tag": {
311
+ "const": "ok"
312
+ },
313
+ "value": {}
314
+ },
315
+ "required": [
316
+ "tag",
317
+ "value"
318
+ ]
319
+ },
320
+ "Optional_NonNullable_T": {
321
+ "anyOf": [
322
+ {
323
+ "$ref": "#/$defs/None"
324
+ },
325
+ {
326
+ "$ref": "#/$defs/Some_NonNullable_T"
327
+ }
328
+ ]
329
+ },
330
+ "Optional_T": {
331
+ "anyOf": [
332
+ {
333
+ "$ref": "#/$defs/None"
334
+ },
335
+ {
336
+ "$ref": "#/$defs/Some_T"
337
+ }
338
+ ]
339
+ },
340
+ "Optional_T_10": {
341
+ "anyOf": [
342
+ {
343
+ "$ref": "#/$defs/None"
344
+ },
345
+ {
346
+ "$ref": "#/$defs/Some_T_11"
347
+ }
348
+ ]
349
+ },
350
+ "Optional_T_2": {
351
+ "anyOf": [
352
+ {
353
+ "$ref": "#/$defs/None"
354
+ },
355
+ {
356
+ "$ref": "#/$defs/Some_T_2"
357
+ }
358
+ ]
359
+ },
360
+ "Optional_T_3": {
361
+ "anyOf": [
362
+ {
363
+ "$ref": "#/$defs/None"
364
+ },
365
+ {
366
+ "$ref": "#/$defs/Some_T_3"
367
+ }
368
+ ]
369
+ },
370
+ "Optional_T_4": {
371
+ "anyOf": [
372
+ {
373
+ "$ref": "#/$defs/None"
374
+ },
375
+ {
376
+ "$ref": "#/$defs/Some_T_4"
377
+ }
378
+ ]
379
+ },
380
+ "Optional_T_5": {
381
+ "anyOf": [
382
+ {
383
+ "$ref": "#/$defs/None"
384
+ },
385
+ {
386
+ "$ref": "#/$defs/Some_T_5"
387
+ }
388
+ ]
389
+ },
390
+ "Optional_T_6": {
391
+ "anyOf": [
392
+ {
393
+ "$ref": "#/$defs/None"
394
+ },
395
+ {
396
+ "$ref": "#/$defs/Some_T_6"
397
+ }
398
+ ]
399
+ },
400
+ "Optional_T_7": {
401
+ "anyOf": [
402
+ {
403
+ "$ref": "#/$defs/None"
404
+ },
405
+ {
406
+ "$ref": "#/$defs/Some_T_7"
407
+ }
408
+ ]
409
+ },
410
+ "Optional_T_8": {
411
+ "anyOf": [
412
+ {
413
+ "$ref": "#/$defs/None"
414
+ },
415
+ {
416
+ "$ref": "#/$defs/Some_T_9"
417
+ }
418
+ ]
419
+ },
420
+ "Optional_T_9": {
421
+ "anyOf": [
422
+ {
423
+ "$ref": "#/$defs/None"
424
+ },
425
+ {
426
+ "$ref": "#/$defs/Some_T_10"
427
+ }
428
+ ]
429
+ },
430
+ "Optional_U": {
431
+ "anyOf": [
432
+ {
433
+ "$ref": "#/$defs/None"
434
+ },
435
+ {
436
+ "$ref": "#/$defs/Some_U"
437
+ }
438
+ ]
439
+ },
440
+ "Optional_U_2": {
441
+ "anyOf": [
442
+ {
443
+ "$ref": "#/$defs/None"
444
+ },
445
+ {
446
+ "$ref": "#/$defs/Some_U_2"
447
+ }
448
+ ]
449
+ },
450
+ "Result_T_E": {
451
+ "anyOf": [
452
+ {
453
+ "$ref": "#/$defs/Ok_T"
454
+ },
455
+ {
456
+ "$ref": "#/$defs/Err_E_2"
457
+ }
458
+ ]
459
+ },
460
+ "Result_T_E_2": {
461
+ "anyOf": [
462
+ {
463
+ "$ref": "#/$defs/Ok_T_2"
464
+ },
465
+ {
466
+ "$ref": "#/$defs/Err_E_3"
467
+ }
468
+ ]
469
+ },
470
+ "Result_T_E_3": {
471
+ "anyOf": [
472
+ {
473
+ "$ref": "#/$defs/Ok_T_3"
474
+ },
475
+ {
476
+ "$ref": "#/$defs/Err_E_4"
477
+ }
478
+ ]
479
+ },
480
+ "Result_T_E_4": {
481
+ "anyOf": [
482
+ {
483
+ "$ref": "#/$defs/Ok_T_4"
484
+ },
485
+ {
486
+ "$ref": "#/$defs/Err_E_5"
487
+ }
488
+ ]
489
+ },
490
+ "Result_T_E_5": {
491
+ "anyOf": [
492
+ {
493
+ "$ref": "#/$defs/Ok_T_5"
494
+ },
495
+ {
496
+ "$ref": "#/$defs/Err_E_6"
497
+ }
498
+ ]
499
+ },
500
+ "Result_T_E_6": {
501
+ "anyOf": [
502
+ {
503
+ "$ref": "#/$defs/Ok_T_6"
504
+ },
505
+ {
506
+ "$ref": "#/$defs/Err_E_7"
507
+ }
508
+ ]
509
+ },
510
+ "Result_T_E_7": {
511
+ "anyOf": [
512
+ {
513
+ "$ref": "#/$defs/Ok_T_7"
514
+ },
515
+ {
516
+ "$ref": "#/$defs/Err_E_8"
517
+ }
518
+ ]
519
+ },
520
+ "Result_T_E_8": {
521
+ "anyOf": [
522
+ {
523
+ "$ref": "#/$defs/Ok_T_9"
524
+ },
525
+ {
526
+ "$ref": "#/$defs/Err_E_9"
527
+ }
528
+ ]
529
+ },
530
+ "Result_T_F": {
531
+ "anyOf": [
532
+ {
533
+ "$ref": "#/$defs/Ok_T_6"
534
+ },
535
+ {
536
+ "$ref": "#/$defs/Err_F_2"
537
+ }
538
+ ]
539
+ },
540
+ "Result_U_E": {
541
+ "anyOf": [
542
+ {
543
+ "$ref": "#/$defs/Err_E_8"
544
+ },
545
+ {
546
+ "$ref": "#/$defs/Ok_U_2"
547
+ }
548
+ ]
549
+ },
550
+ "Result_U_E_F": {
551
+ "anyOf": [
552
+ {
553
+ "$ref": "#/$defs/Ok_U"
554
+ },
555
+ {
556
+ "$ref": "#/$defs/Err_E_F"
557
+ }
558
+ ]
559
+ },
560
+ "Result_U_F": {
561
+ "anyOf": [
562
+ {
563
+ "$ref": "#/$defs/Ok_U"
564
+ },
565
+ {
566
+ "$ref": "#/$defs/Err_F"
567
+ }
568
+ ]
569
+ },
570
+ "Some_NonNullable_T": {
571
+ "type": "object",
572
+ "properties": {
573
+ "tag": {
574
+ "const": "some"
575
+ },
576
+ "value": {
577
+ "type": [
578
+ "boolean",
579
+ "number",
580
+ "string",
581
+ "array",
582
+ "object"
583
+ ]
584
+ }
585
+ },
586
+ "required": [
587
+ "tag",
588
+ "value"
589
+ ]
590
+ },
591
+ "Some_T": {
592
+ "type": "object",
593
+ "properties": {
594
+ "tag": {
595
+ "const": "some"
596
+ },
597
+ "value": {}
598
+ },
599
+ "required": [
600
+ "tag",
601
+ "value"
602
+ ]
603
+ },
604
+ "Some_T_10": {
605
+ "type": "object",
606
+ "properties": {
607
+ "tag": {
608
+ "const": "some"
609
+ },
610
+ "value": {}
611
+ },
612
+ "required": [
613
+ "tag",
614
+ "value"
615
+ ]
616
+ },
617
+ "Some_T_11": {
618
+ "type": "object",
619
+ "properties": {
620
+ "tag": {
621
+ "const": "some"
622
+ },
623
+ "value": {}
624
+ },
625
+ "required": [
626
+ "tag",
627
+ "value"
628
+ ]
629
+ },
630
+ "Some_T_2": {
631
+ "type": "object",
632
+ "properties": {
633
+ "tag": {
634
+ "const": "some"
635
+ },
636
+ "value": {}
637
+ },
638
+ "required": [
639
+ "tag",
640
+ "value"
641
+ ]
642
+ },
643
+ "Some_T_3": {
644
+ "type": "object",
645
+ "properties": {
646
+ "tag": {
647
+ "const": "some"
648
+ },
649
+ "value": {}
650
+ },
651
+ "required": [
652
+ "tag",
653
+ "value"
654
+ ]
655
+ },
656
+ "Some_T_4": {
657
+ "type": "object",
658
+ "properties": {
659
+ "tag": {
660
+ "const": "some"
661
+ },
662
+ "value": {}
663
+ },
664
+ "required": [
665
+ "tag",
666
+ "value"
667
+ ]
668
+ },
669
+ "Some_T_5": {
670
+ "type": "object",
671
+ "properties": {
672
+ "tag": {
673
+ "const": "some"
674
+ },
675
+ "value": {}
676
+ },
677
+ "required": [
678
+ "tag",
679
+ "value"
680
+ ]
681
+ },
682
+ "Some_T_6": {
683
+ "type": "object",
684
+ "properties": {
685
+ "tag": {
686
+ "const": "some"
687
+ },
688
+ "value": {}
689
+ },
690
+ "required": [
691
+ "tag",
692
+ "value"
693
+ ]
694
+ },
695
+ "Some_T_7": {
696
+ "type": "object",
697
+ "properties": {
698
+ "tag": {
699
+ "const": "some"
700
+ },
701
+ "value": {}
702
+ },
703
+ "required": [
704
+ "tag",
705
+ "value"
706
+ ]
707
+ },
708
+ "Some_T_8": {
709
+ "type": "object",
710
+ "properties": {
711
+ "tag": {
712
+ "const": "some"
713
+ },
714
+ "value": {}
715
+ },
716
+ "required": [
717
+ "tag",
718
+ "value"
719
+ ]
720
+ },
721
+ "Some_T_9": {
722
+ "type": "object",
723
+ "properties": {
724
+ "tag": {
725
+ "const": "some"
726
+ },
727
+ "value": {}
728
+ },
729
+ "required": [
730
+ "tag",
731
+ "value"
732
+ ]
733
+ },
734
+ "Some_U": {
735
+ "type": "object",
736
+ "properties": {
737
+ "tag": {
738
+ "const": "some"
739
+ },
740
+ "value": {}
741
+ },
742
+ "required": [
743
+ "tag",
744
+ "value"
745
+ ]
746
+ },
747
+ "Some_U_2": {
748
+ "type": "object",
749
+ "properties": {
750
+ "tag": {
751
+ "const": "some"
752
+ },
753
+ "value": {}
754
+ },
755
+ "required": [
756
+ "tag",
757
+ "value"
758
+ ]
759
+ }
760
+ },
761
+ "procedures": [
762
+ {
763
+ "name": "err",
764
+ "path": [
765
+ "optional",
766
+ "err"
767
+ ],
768
+ "description": "This function wraps the error of a step that failed.",
769
+ "params": [
770
+ "error"
771
+ ],
772
+ "input": {
773
+ "type": "object",
774
+ "properties": {
775
+ "error": {}
776
+ },
777
+ "required": [
778
+ "error"
779
+ ],
780
+ "additionalProperties": false
781
+ },
782
+ "output": {
783
+ "$ref": "#/$defs/Err_E"
784
+ },
785
+ "generics": [
786
+ "E"
787
+ ],
788
+ "effects": {
789
+ "reads": [],
790
+ "writes": []
791
+ }
792
+ },
793
+ {
794
+ "name": "flatMap",
795
+ "path": [
796
+ "optional",
797
+ "flatMap"
798
+ ],
799
+ "description": "This function applies `f`, which gives an optional, to a present value. An absent value stays absent.",
800
+ "params": [
801
+ "o",
802
+ "f"
803
+ ],
804
+ "input": {
805
+ "type": "object",
806
+ "properties": {
807
+ "o": {
808
+ "$ref": "#/$defs/Optional_T"
809
+ },
810
+ "f": {
811
+ "type": "object",
812
+ "description": "One call of a pure procedure, as data, for the function (v: T) => Optional<U>. It reads each parameter as {\"$ref\": \"<name>\"}: v.",
813
+ "required": [
814
+ "$proc"
815
+ ],
816
+ "properties": {
817
+ "$proc": {
818
+ "type": "array",
819
+ "items": {
820
+ "type": "string"
821
+ },
822
+ "minItems": 1
823
+ },
824
+ "input": {},
825
+ "$when": {
826
+ "const": "$never"
827
+ }
828
+ },
829
+ "x-procedures-program": {
830
+ "params": [
831
+ "v"
832
+ ],
833
+ "inputs": [
834
+ {}
835
+ ],
836
+ "output": {
837
+ "$ref": "#/$defs/Optional_U"
838
+ }
839
+ }
840
+ }
841
+ },
842
+ "required": [
843
+ "o",
844
+ "f"
845
+ ],
846
+ "additionalProperties": false
847
+ },
848
+ "output": {
849
+ "$ref": "#/$defs/Optional_U"
850
+ },
851
+ "generics": [
852
+ "T",
853
+ "U"
854
+ ],
855
+ "effects": {
856
+ "reads": [],
857
+ "writes": []
858
+ }
859
+ },
860
+ {
861
+ "name": "flatMapResult",
862
+ "path": [
863
+ "optional",
864
+ "flatMapResult"
865
+ ],
866
+ "description": "This function applies `f`, which gives a result, to a value. An error stays the same.",
867
+ "params": [
868
+ "r",
869
+ "f"
870
+ ],
871
+ "input": {
872
+ "type": "object",
873
+ "properties": {
874
+ "r": {
875
+ "$ref": "#/$defs/Result_T_E"
876
+ },
877
+ "f": {
878
+ "type": "object",
879
+ "description": "One call of a pure procedure, as data, for the function (v: T) => Result<U, F>. It reads each parameter as {\"$ref\": \"<name>\"}: v.",
880
+ "required": [
881
+ "$proc"
882
+ ],
883
+ "properties": {
884
+ "$proc": {
885
+ "type": "array",
886
+ "items": {
887
+ "type": "string"
888
+ },
889
+ "minItems": 1
890
+ },
891
+ "input": {},
892
+ "$when": {
893
+ "const": "$never"
894
+ }
895
+ },
896
+ "x-procedures-program": {
897
+ "params": [
898
+ "v"
899
+ ],
900
+ "inputs": [
901
+ {}
902
+ ],
903
+ "output": {
904
+ "$ref": "#/$defs/Result_U_F"
905
+ }
906
+ }
907
+ }
908
+ },
909
+ "required": [
910
+ "r",
911
+ "f"
912
+ ],
913
+ "additionalProperties": false
914
+ },
915
+ "output": {
916
+ "$ref": "#/$defs/Result_U_E_F"
917
+ },
918
+ "generics": [
919
+ "T",
920
+ "U",
921
+ "E",
922
+ "F"
923
+ ],
924
+ "effects": {
925
+ "reads": [],
926
+ "writes": []
927
+ }
928
+ },
929
+ {
930
+ "name": "fromNullable",
931
+ "path": [
932
+ "optional",
933
+ "fromNullable"
934
+ ],
935
+ "description": "This function wraps a value, and gives `none` for `null` and `undefined`.",
936
+ "params": [
937
+ "value"
938
+ ],
939
+ "input": {
940
+ "type": "object",
941
+ "properties": {
942
+ "value": {}
943
+ },
944
+ "required": [
945
+ "value"
946
+ ],
947
+ "additionalProperties": false
948
+ },
949
+ "output": {
950
+ "$ref": "#/$defs/Optional_NonNullable_T"
951
+ },
952
+ "generics": [
953
+ "T"
954
+ ],
955
+ "effects": {
956
+ "reads": [],
957
+ "writes": []
958
+ }
959
+ },
960
+ {
961
+ "name": "fromOptional",
962
+ "path": [
963
+ "optional",
964
+ "fromOptional"
965
+ ],
966
+ "description": "This function changes an optional into a result: a present value becomes `ok`, and `none` becomes `err(error)`.",
967
+ "params": [
968
+ "o",
969
+ "error"
970
+ ],
971
+ "input": {
972
+ "type": "object",
973
+ "properties": {
974
+ "o": {
975
+ "$ref": "#/$defs/Optional_T_2"
976
+ },
977
+ "error": {}
978
+ },
979
+ "required": [
980
+ "o",
981
+ "error"
982
+ ],
983
+ "additionalProperties": false
984
+ },
985
+ "output": {
986
+ "$ref": "#/$defs/Result_T_E_2"
987
+ },
988
+ "generics": [
989
+ "T",
990
+ "E"
991
+ ],
992
+ "effects": {
993
+ "reads": [],
994
+ "writes": []
995
+ }
996
+ },
997
+ {
998
+ "name": "fromSentinel",
999
+ "path": [
1000
+ "optional",
1001
+ "fromSentinel"
1002
+ ],
1003
+ "description": "This function changes a value of the sentinel form into an optional. In the sentinel form, the value `sentinel` means \"absent\", for example a symbol `NotFound`.",
1004
+ "params": [
1005
+ "value",
1006
+ "sentinel"
1007
+ ],
1008
+ "input": {
1009
+ "type": "object",
1010
+ "properties": {
1011
+ "value": {},
1012
+ "sentinel": {}
1013
+ },
1014
+ "required": [
1015
+ "value",
1016
+ "sentinel"
1017
+ ],
1018
+ "additionalProperties": false
1019
+ },
1020
+ "output": {
1021
+ "$ref": "#/$defs/Optional_T_3"
1022
+ },
1023
+ "generics": [
1024
+ "T",
1025
+ "S"
1026
+ ],
1027
+ "effects": {
1028
+ "reads": [],
1029
+ "writes": []
1030
+ }
1031
+ },
1032
+ {
1033
+ "name": "getOkOr",
1034
+ "path": [
1035
+ "optional",
1036
+ "getOkOr"
1037
+ ],
1038
+ "description": "This function gives the value, or `fallback` for an error.",
1039
+ "params": [
1040
+ "r",
1041
+ "fallback"
1042
+ ],
1043
+ "input": {
1044
+ "type": "object",
1045
+ "properties": {
1046
+ "r": {
1047
+ "$ref": "#/$defs/Result_T_E_3"
1048
+ },
1049
+ "fallback": {}
1050
+ },
1051
+ "required": [
1052
+ "r",
1053
+ "fallback"
1054
+ ],
1055
+ "additionalProperties": false
1056
+ },
1057
+ "output": {},
1058
+ "generics": [
1059
+ "T",
1060
+ "U",
1061
+ "E"
1062
+ ],
1063
+ "effects": {
1064
+ "reads": [],
1065
+ "writes": []
1066
+ }
1067
+ },
1068
+ {
1069
+ "name": "getOr",
1070
+ "path": [
1071
+ "optional",
1072
+ "getOr"
1073
+ ],
1074
+ "description": "This function gives the present value, or `fallback`.",
1075
+ "params": [
1076
+ "o",
1077
+ "fallback"
1078
+ ],
1079
+ "input": {
1080
+ "type": "object",
1081
+ "properties": {
1082
+ "o": {
1083
+ "$ref": "#/$defs/Optional_T_4"
1084
+ },
1085
+ "fallback": {}
1086
+ },
1087
+ "required": [
1088
+ "o",
1089
+ "fallback"
1090
+ ],
1091
+ "additionalProperties": false
1092
+ },
1093
+ "output": {},
1094
+ "generics": [
1095
+ "T",
1096
+ "U"
1097
+ ],
1098
+ "effects": {
1099
+ "reads": [],
1100
+ "writes": []
1101
+ }
1102
+ },
1103
+ {
1104
+ "name": "isErr",
1105
+ "path": [
1106
+ "optional",
1107
+ "isErr"
1108
+ ],
1109
+ "description": "This function tells if a result is an error.",
1110
+ "params": [
1111
+ "r"
1112
+ ],
1113
+ "input": {
1114
+ "type": "object",
1115
+ "properties": {
1116
+ "r": {
1117
+ "$ref": "#/$defs/Result_T_E_4"
1118
+ }
1119
+ },
1120
+ "required": [
1121
+ "r"
1122
+ ],
1123
+ "additionalProperties": false
1124
+ },
1125
+ "output": {
1126
+ "type": "boolean"
1127
+ },
1128
+ "generics": [
1129
+ "T",
1130
+ "E"
1131
+ ],
1132
+ "effects": {
1133
+ "reads": [],
1134
+ "writes": []
1135
+ }
1136
+ },
1137
+ {
1138
+ "name": "isNone",
1139
+ "path": [
1140
+ "optional",
1141
+ "isNone"
1142
+ ],
1143
+ "description": "This function tells if an optional is absent.",
1144
+ "params": [
1145
+ "o"
1146
+ ],
1147
+ "input": {
1148
+ "type": "object",
1149
+ "properties": {
1150
+ "o": {
1151
+ "$ref": "#/$defs/Optional_T_5"
1152
+ }
1153
+ },
1154
+ "required": [
1155
+ "o"
1156
+ ],
1157
+ "additionalProperties": false
1158
+ },
1159
+ "output": {
1160
+ "type": "boolean"
1161
+ },
1162
+ "generics": [
1163
+ "T"
1164
+ ],
1165
+ "effects": {
1166
+ "reads": [],
1167
+ "writes": []
1168
+ }
1169
+ },
1170
+ {
1171
+ "name": "isOk",
1172
+ "path": [
1173
+ "optional",
1174
+ "isOk"
1175
+ ],
1176
+ "description": "This function tells if a result is a value.",
1177
+ "params": [
1178
+ "r"
1179
+ ],
1180
+ "input": {
1181
+ "type": "object",
1182
+ "properties": {
1183
+ "r": {
1184
+ "$ref": "#/$defs/Result_T_E_5"
1185
+ }
1186
+ },
1187
+ "required": [
1188
+ "r"
1189
+ ],
1190
+ "additionalProperties": false
1191
+ },
1192
+ "output": {
1193
+ "type": "boolean"
1194
+ },
1195
+ "generics": [
1196
+ "T",
1197
+ "E"
1198
+ ],
1199
+ "effects": {
1200
+ "reads": [],
1201
+ "writes": []
1202
+ }
1203
+ },
1204
+ {
1205
+ "name": "isSome",
1206
+ "path": [
1207
+ "optional",
1208
+ "isSome"
1209
+ ],
1210
+ "description": "This function tells if an optional is present.",
1211
+ "params": [
1212
+ "o"
1213
+ ],
1214
+ "input": {
1215
+ "type": "object",
1216
+ "properties": {
1217
+ "o": {
1218
+ "$ref": "#/$defs/Optional_T_6"
1219
+ }
1220
+ },
1221
+ "required": [
1222
+ "o"
1223
+ ],
1224
+ "additionalProperties": false
1225
+ },
1226
+ "output": {
1227
+ "type": "boolean"
1228
+ },
1229
+ "generics": [
1230
+ "T"
1231
+ ],
1232
+ "effects": {
1233
+ "reads": [],
1234
+ "writes": []
1235
+ }
1236
+ },
1237
+ {
1238
+ "name": "map",
1239
+ "path": [
1240
+ "optional",
1241
+ "map"
1242
+ ],
1243
+ "description": "This function applies `f` to a present value. An absent value stays absent.",
1244
+ "params": [
1245
+ "o",
1246
+ "f"
1247
+ ],
1248
+ "input": {
1249
+ "type": "object",
1250
+ "properties": {
1251
+ "o": {
1252
+ "$ref": "#/$defs/Optional_T_7"
1253
+ },
1254
+ "f": {
1255
+ "type": "object",
1256
+ "description": "One call of a pure procedure, as data, for the function (v: T) => U. It reads each parameter as {\"$ref\": \"<name>\"}: v.",
1257
+ "required": [
1258
+ "$proc"
1259
+ ],
1260
+ "properties": {
1261
+ "$proc": {
1262
+ "type": "array",
1263
+ "items": {
1264
+ "type": "string"
1265
+ },
1266
+ "minItems": 1
1267
+ },
1268
+ "input": {},
1269
+ "$when": {
1270
+ "const": "$never"
1271
+ }
1272
+ },
1273
+ "x-procedures-program": {
1274
+ "params": [
1275
+ "v"
1276
+ ],
1277
+ "inputs": [
1278
+ {}
1279
+ ],
1280
+ "output": {}
1281
+ }
1282
+ }
1283
+ },
1284
+ "required": [
1285
+ "o",
1286
+ "f"
1287
+ ],
1288
+ "additionalProperties": false
1289
+ },
1290
+ "output": {
1291
+ "$ref": "#/$defs/Optional_U_2"
1292
+ },
1293
+ "generics": [
1294
+ "T",
1295
+ "U"
1296
+ ],
1297
+ "effects": {
1298
+ "reads": [],
1299
+ "writes": []
1300
+ }
1301
+ },
1302
+ {
1303
+ "name": "mapErr",
1304
+ "path": [
1305
+ "optional",
1306
+ "mapErr"
1307
+ ],
1308
+ "description": "This function applies `f` to an error. A value stays the same.",
1309
+ "params": [
1310
+ "r",
1311
+ "f"
1312
+ ],
1313
+ "input": {
1314
+ "type": "object",
1315
+ "properties": {
1316
+ "r": {
1317
+ "$ref": "#/$defs/Result_T_E_6"
1318
+ },
1319
+ "f": {
1320
+ "type": "object",
1321
+ "description": "One call of a pure procedure, as data, for the function (e: E) => F. It reads each parameter as {\"$ref\": \"<name>\"}: e.",
1322
+ "required": [
1323
+ "$proc"
1324
+ ],
1325
+ "properties": {
1326
+ "$proc": {
1327
+ "type": "array",
1328
+ "items": {
1329
+ "type": "string"
1330
+ },
1331
+ "minItems": 1
1332
+ },
1333
+ "input": {},
1334
+ "$when": {
1335
+ "const": "$never"
1336
+ }
1337
+ },
1338
+ "x-procedures-program": {
1339
+ "params": [
1340
+ "e"
1341
+ ],
1342
+ "inputs": [
1343
+ {}
1344
+ ],
1345
+ "output": {}
1346
+ }
1347
+ }
1348
+ },
1349
+ "required": [
1350
+ "r",
1351
+ "f"
1352
+ ],
1353
+ "additionalProperties": false
1354
+ },
1355
+ "output": {
1356
+ "$ref": "#/$defs/Result_T_F"
1357
+ },
1358
+ "generics": [
1359
+ "T",
1360
+ "E",
1361
+ "F"
1362
+ ],
1363
+ "effects": {
1364
+ "reads": [],
1365
+ "writes": []
1366
+ }
1367
+ },
1368
+ {
1369
+ "name": "mapResult",
1370
+ "path": [
1371
+ "optional",
1372
+ "mapResult"
1373
+ ],
1374
+ "description": "This function applies `f` to a value. An error stays the same.",
1375
+ "params": [
1376
+ "r",
1377
+ "f"
1378
+ ],
1379
+ "input": {
1380
+ "type": "object",
1381
+ "properties": {
1382
+ "r": {
1383
+ "$ref": "#/$defs/Result_T_E_7"
1384
+ },
1385
+ "f": {
1386
+ "type": "object",
1387
+ "description": "One call of a pure procedure, as data, for the function (v: T) => U. It reads each parameter as {\"$ref\": \"<name>\"}: v.",
1388
+ "required": [
1389
+ "$proc"
1390
+ ],
1391
+ "properties": {
1392
+ "$proc": {
1393
+ "type": "array",
1394
+ "items": {
1395
+ "type": "string"
1396
+ },
1397
+ "minItems": 1
1398
+ },
1399
+ "input": {},
1400
+ "$when": {
1401
+ "const": "$never"
1402
+ }
1403
+ },
1404
+ "x-procedures-program": {
1405
+ "params": [
1406
+ "v"
1407
+ ],
1408
+ "inputs": [
1409
+ {}
1410
+ ],
1411
+ "output": {}
1412
+ }
1413
+ }
1414
+ },
1415
+ "required": [
1416
+ "r",
1417
+ "f"
1418
+ ],
1419
+ "additionalProperties": false
1420
+ },
1421
+ "output": {
1422
+ "$ref": "#/$defs/Result_U_E"
1423
+ },
1424
+ "generics": [
1425
+ "T",
1426
+ "U",
1427
+ "E"
1428
+ ],
1429
+ "effects": {
1430
+ "reads": [],
1431
+ "writes": []
1432
+ }
1433
+ },
1434
+ {
1435
+ "name": "ok",
1436
+ "path": [
1437
+ "optional",
1438
+ "ok"
1439
+ ],
1440
+ "description": "This function wraps a value of a step that succeeded.",
1441
+ "params": [
1442
+ "value"
1443
+ ],
1444
+ "input": {
1445
+ "type": "object",
1446
+ "properties": {
1447
+ "value": {}
1448
+ },
1449
+ "required": [
1450
+ "value"
1451
+ ],
1452
+ "additionalProperties": false
1453
+ },
1454
+ "output": {
1455
+ "$ref": "#/$defs/Ok_T_8"
1456
+ },
1457
+ "generics": [
1458
+ "T"
1459
+ ],
1460
+ "effects": {
1461
+ "reads": [],
1462
+ "writes": []
1463
+ }
1464
+ },
1465
+ {
1466
+ "name": "some",
1467
+ "path": [
1468
+ "optional",
1469
+ "some"
1470
+ ],
1471
+ "description": "This function wraps a present value.",
1472
+ "params": [
1473
+ "value"
1474
+ ],
1475
+ "input": {
1476
+ "type": "object",
1477
+ "properties": {
1478
+ "value": {}
1479
+ },
1480
+ "required": [
1481
+ "value"
1482
+ ],
1483
+ "additionalProperties": false
1484
+ },
1485
+ "output": {
1486
+ "$ref": "#/$defs/Some_T_8"
1487
+ },
1488
+ "generics": [
1489
+ "T"
1490
+ ],
1491
+ "effects": {
1492
+ "reads": [],
1493
+ "writes": []
1494
+ }
1495
+ },
1496
+ {
1497
+ "name": "toOptional",
1498
+ "path": [
1499
+ "optional",
1500
+ "toOptional"
1501
+ ],
1502
+ "description": "This function changes a result into an optional: a value becomes `some`, and an error becomes `none`.",
1503
+ "params": [
1504
+ "r"
1505
+ ],
1506
+ "input": {
1507
+ "type": "object",
1508
+ "properties": {
1509
+ "r": {
1510
+ "$ref": "#/$defs/Result_T_E_8"
1511
+ }
1512
+ },
1513
+ "required": [
1514
+ "r"
1515
+ ],
1516
+ "additionalProperties": false
1517
+ },
1518
+ "output": {
1519
+ "$ref": "#/$defs/Optional_T_8"
1520
+ },
1521
+ "generics": [
1522
+ "T",
1523
+ "E"
1524
+ ],
1525
+ "effects": {
1526
+ "reads": [],
1527
+ "writes": []
1528
+ }
1529
+ },
1530
+ {
1531
+ "name": "toSentinel",
1532
+ "path": [
1533
+ "optional",
1534
+ "toSentinel"
1535
+ ],
1536
+ "description": "This function changes an optional into the sentinel form: an absent value becomes `sentinel`.",
1537
+ "params": [
1538
+ "o",
1539
+ "sentinel"
1540
+ ],
1541
+ "input": {
1542
+ "type": "object",
1543
+ "properties": {
1544
+ "o": {
1545
+ "$ref": "#/$defs/Optional_T_9"
1546
+ },
1547
+ "sentinel": {}
1548
+ },
1549
+ "required": [
1550
+ "o",
1551
+ "sentinel"
1552
+ ],
1553
+ "additionalProperties": false
1554
+ },
1555
+ "output": {},
1556
+ "generics": [
1557
+ "T",
1558
+ "S"
1559
+ ],
1560
+ "effects": {
1561
+ "reads": [],
1562
+ "writes": []
1563
+ }
1564
+ },
1565
+ {
1566
+ "name": "unwrap",
1567
+ "path": [
1568
+ "optional",
1569
+ "unwrap"
1570
+ ],
1571
+ "description": "This function gives the present value, or `undefined`.",
1572
+ "params": [
1573
+ "o"
1574
+ ],
1575
+ "input": {
1576
+ "type": "object",
1577
+ "properties": {
1578
+ "o": {
1579
+ "$ref": "#/$defs/Optional_T_10"
1580
+ }
1581
+ },
1582
+ "required": [
1583
+ "o"
1584
+ ],
1585
+ "additionalProperties": false
1586
+ },
1587
+ "output": {},
1588
+ "generics": [
1589
+ "T"
1590
+ ],
1591
+ "effects": {
1592
+ "reads": [],
1593
+ "writes": []
1594
+ }
1595
+ }
1596
+ ],
1597
+ "exempt": [
1598
+ {
1599
+ "name": "filter",
1600
+ "reason": "overload",
1601
+ "detail": "2 signatures"
1602
+ },
1603
+ {
1604
+ "name": "tryCatch",
1605
+ "reason": "overload",
1606
+ "detail": "2 signatures"
1607
+ },
1608
+ {
1609
+ "name": "tryCatchAsync",
1610
+ "reason": "overload",
1611
+ "detail": "2 signatures"
1612
+ }
1613
+ ],
1614
+ "others": {
1615
+ "classes": [],
1616
+ "values": 1,
1617
+ "types": 6
1618
+ }
1619
+ };
1620
+ //# sourceMappingURL=manifest.js.map