forked from typed-typings/npm-ramda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ramda.d.ts
2420 lines (2108 loc) · 141 KB
/
ramda.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
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
// Type definitions for ramda
// Project: [https://github.com/donnut/typescript-ramda]
// Definitions by: Erwin Poeze <https://github.com/donnut>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare var R: R.Static;
declare namespace R {
// simple types
type Ord = number | string | boolean;
type Prop = string | number;
type Path = Prop[];
type Struct<T> = Dictionary<T> | Array<T>;
type AccOpts<T,U> = Array<any>|string|Dictionary<any>|Transformer<T, U, U>;
interface Type<T> extends Function { new (...args: any[]): T; }
// Fantasyland interfaces
interface Setoid<T> {
equals(b: Setoid<T>): boolean;
}
interface Semigroup<T> {
concat(b: Semigroup<T>): Semigroup<T>;
}
interface Monoid<T> extends Semigroup<T> {
/* static */ empty<T>(): Monoid<T>;
}
interface Functor<T> {
map<U>(fn: (t: T) => U): Functor<U>;
}
interface Apply<T> extends Functor<T> {
apply<U>(fn: Apply<(t: T) => U>): Apply<U>;
}
interface Applicative<T> extends Apply<T> {
/* static */ of<U>(a: U): Applicative<U>;
}
interface Alt<T> extends Functor<T> {
alt(b: T): Alt<T>;
}
interface Plus<T> extends Alt<T> {
/* static */ zero<T>(): Plus<T>;
}
interface Alternative<T> extends Plus<T>, Applicative<T> {
}
interface Foldable<T> {
reduce<U>(fn: (u: U, t: T) => U, u: U): U;
}
interface Traversable<T> extends Functor<T>, Foldable<T> {
traverse<U, V>(fn: (t: T) => Applicative<U>, of: (v: V) => Applicative<V>): Applicative<Traversable<U>>;
}
interface Chain<T> extends Apply<T> {
chain<U>(fn: (t: T) => Chain<U>): Chain<U>;
}
interface ChainRec<T> extends Chain<T> {
/* static */ chainRec<A,B,C>(f: (next: (a: A) => C, done: (b: B) => C, value: A) => ChainRec<C>, i: A): ChainRec<B>;
}
interface Monad<T> extends Applicative<T>, Chain<T> {
}
interface Extend<T> {
extend<U>(f: (v: Extend<T>) => U): Extend<U>;
}
interface Comonad<T> extends Functor<T>, Extend<T> {
extract<U>(): U; // 'same U as in extend's f -- how to bind?
}
interface Bifunctor<T,U> extends Functor<T> /*, Functor<U>*/ {
bimap<B,D>(f: (v: T) => B, g: (v: U) => D): Bifunctor<B,D>;
}
interface Profunctor<T,U> extends Functor<T> /*, Functor<U>*/ {
promap<B,D>(f: (v: T) => B, g: (v: U) => D): Profunctor<B,D>;
}
// Ramda interfaces
interface KeyValuePair<K, V> extends Array<K | V> { 0 : K; 1 : V; }
interface Transformer<T, Acc, Res> {
step: (acc: Acc, v: T) => Acc;
init: () => Acc;
result: (acc: Acc) => Res; // = R.identity
}
type Pred<T> = (v: T) => boolean;
type ObjPred<T> = (value: T, key: string) => boolean;
interface Dictionary<T> {
[index: string]: T;
}
interface CharList extends String {
push(x: string): void;
}
interface Nested<U> {
[index: string]: Nested<U>|{<U>(value: any): U};
}
interface Lens<T,U> {
/*get*/(obj: T): U;
set(str: string, obj: T): U;
// map(fn: (v: U) => U, obj: T): T
}
interface UnknownLens {
/*get*/<T,U>(obj: T): U;
set<T,U>(str: string, obj: T): U;
// map<T,U>(fn: (v: U) => U, obj: T): T
}
// @see https://gist.github.com/donnut/fd56232da58d25ceecf1, comment by @albrow
// interface CurriedFn1<T1, R> {
// (t1: T1): R;
// }
type CurriedFn1<T1, R> = (t1: T1) => R;
interface CurriedFn2<T1, T2, R> {
(t1: T1): (t2: T2) => R;
(t1: T1, t2: T2): R;
}
interface CurriedFn3<T1, T2, T3, R> {
(t1: T1): CurriedFn2<T2, T3, R>;
(t1: T1, t2: T2): (t3: T3) => R;
(t1: T1, t2: T2, t3: T3): R;
}
interface CurriedFn4<T1, T2, T3, T4, R> {
(t1: T1): CurriedFn3<T2, T3, T4, R>;
(t1: T1, t2: T2): CurriedFn2<T3, T4, R>;
(t1: T1, t2: T2, t3: T3): (t4: T4) => R;
(t1: T1, t2: T2, t3: T3, t4: T4): R;
}
interface CurriedFn5<T1, T2, T3, T4, T5, R> {
(t1: T1): CurriedFn4<T2, T3, T4, T5, R>;
(t1: T1, t2: T2): CurriedFn3<T3, T4, T5, R>;
(t1: T1, t2: T2, t3: T3): CurriedFn2<T4, T5, R>;
(t1: T1, t2: T2, t3: T3, t4: T4): (t5: T5) => R;
(t1: T1, t2: T2, t3: T3, t4: T4, t5: T5): R;
}
interface CurriedFn6<T1, T2, T3, T4, T5, T6, R> {
(t1: T1): CurriedFn5<T2, T3, T4, T5, T6, R>;
(t1: T1, t2: T2): CurriedFn4<T3, T4, T5, T6, R>;
(t1: T1, t2: T2, t3: T3): CurriedFn3<T4, T5, T6, R>;
(t1: T1, t2: T2, t3: T3, t4: T4): CurriedFn2<T5, T6, R>;
(t1: T1, t2: T2, t3: T3, t4: T4, t5: T5): (t6: T6) => R;
(t1: T1, t2: T2, t3: T3, t4: T4, t5: T5, t6: T6): R;
}
interface CurriedFn7<T1, T2, T3, T4, T5, T6, T7, R> {
(t1: T1): CurriedFn6<T2, T3, T4, T5, T6, T7, R>;
(t1: T1, t2: T2): CurriedFn5<T3, T4, T5, T6, T7, R>;
(t1: T1, t2: T2, t3: T3): CurriedFn4<T4, T5, T6, T7, R>;
(t1: T1, t2: T2, t3: T3, t4: T4): CurriedFn3<T5, T6, T7, R>;
(t1: T1, t2: T2, t3: T3, t4: T4, t5: T5): CurriedFn2<T6, T7, R>;
(t1: T1, t2: T2, t3: T3, t4: T4, t5: T5, t6: T6): (t7: T7) => R;
(t1: T1, t2: T2, t3: T3, t4: T4, t5: T5, t6: T6, t7: T7): R;
}
interface CurriedFn8<T1, T2, T3, T4, T5, T6, T7, T8, R> {
(t1: T1): CurriedFn7<T2, T3, T4, T5, T6, T7, T8, R>;
(t1: T1, t2: T2): CurriedFn6<T3, T4, T5, T6, T7, T8, R>;
(t1: T1, t2: T2, t3: T3): CurriedFn5<T4, T5, T6, T7, T8, R>;
(t1: T1, t2: T2, t3: T3, t4: T4): CurriedFn4<T5, T6, T7, T8, R>;
(t1: T1, t2: T2, t3: T3, t4: T4, t5: T5): CurriedFn3<T6, T7, T8, R>;
(t1: T1, t2: T2, t3: T3, t4: T4, t5: T5, t6: T6): CurriedFn2<T7, T8, R>;
(t1: T1, t2: T2, t3: T3, t4: T4, t5: T5, t6: T6, t7: T7): (t8: T8) => R;
(t1: T1, t2: T2, t3: T3, t4: T4, t5: T5, t6: T6, t7: T7, t8: T8): R;
}
interface CurriedFn9<T1, T2, T3, T4, T5, T6, T7, T8, T9, R> {
(t1: T1): CurriedFn8<T2, T3, T4, T5, T6, T7, T8, T9, R>;
(t1: T1, t2: T2): CurriedFn7<T3, T4, T5, T6, T7, T8, T9, R>;
(t1: T1, t2: T2, t3: T3): CurriedFn6<T4, T5, T6, T7, T8, T9, R>;
(t1: T1, t2: T2, t3: T3, t4: T4): CurriedFn5<T5, T6, T7, T8, T9, R>;
(t1: T1, t2: T2, t3: T3, t4: T4, t5: T5): CurriedFn4<T6, T7, T8, T9, R>;
(t1: T1, t2: T2, t3: T3, t4: T4, t5: T5, t6: T6): CurriedFn3<T7, T8, T9, R>;
(t1: T1, t2: T2, t3: T3, t4: T4, t5: T5, t6: T6, t7: T7): CurriedFn2<T8, T9, R>;
(t1: T1, t2: T2, t3: T3, t4: T4, t5: T5, t6: T6, t7: T7, t8: T8): (t9: T9) => R;
(t1: T1, t2: T2, t3: T3, t4: T4, t5: T5, t6: T6, t7: T7, t8: T8, t9: T9): R;
}
interface Reduced {}
interface Static {
/**
* Adds two numbers. Equivalent to a + b but curried.
*/
add(a: number, b: number): number;
add(a: number): (b: number) => number;
// add: CurriedFn2<number, number, number>;
/**
* Creates a new list iteration function from an existing one by adding two new parameters to its callback
* function: the current index, and the entire list.
*/
addIndex<T,U>(fn: (f: (item: T) => U, list: T[]) => U[] ): CurriedFn2<(item: T, idx: number, list?: T[]) => U, T[], U[]>;
/* Special case for forEach */
addIndex<T>(fn: (f: (item: T) => void, list: T[]) => T[]): CurriedFn2<(item: T, idx: number, list?: T[]) => void, T[], T[]>;
/* Special case for reduce */
addIndex<T,U>(fn: (f: (acc:U, item: T) => U, aci:U, list: T[]) => U): CurriedFn3<(acc:U, item: T, idx: number, list?: T[]) => U, U, T[], U>;
// addIndex<T,U>: CurriedFn3<(f: (item: T) => U, list: T[]) => U[], (item: T, idx: number, list?: T[]) => U, T[], U[]>;
/**
* Applies a function to the value at the given index of an array, returning a new copy of the array with the
* element at the given index replaced with the result of the function application.
*/
adjust<T>(fn: (a: T) => T, index: number, list: T[]): T[];
adjust<T>(fn: (a: T) => T, index: number): (list: T[]) => T[];
adjust<T>(fn: (a: T) => T): CurriedFn2<number, T[], T[]>
// adjust<T>: CurriedFn3<(a: T) => T, number, T[], T[]>
/**
* Returns true if all elements of the list match the predicate, false if there are any that don't.
*/
all<T>(fn: (a: T) => boolean, list: T[]): boolean;
all<T>(fn: (a: T) => boolean): (list: T[]) => boolean;
// all<T>: CurriedFn2<(a: T) => boolean, T[], boolean>;
/**
* Given a list of predicates, returns a new predicate that will be true exactly when all of them are.
*/
allPass<T>(preds: Pred<T>[]): Pred<T>;
/**
* Returns a function that always returns the given value.
*/
always<T>(val: T): () => T;
/**
* A function that returns the first argument if it's falsy otherwise the second argument. Note that this is
* NOT short-circuited, meaning that if expressions are passed they are both evaluated.
*/
// dispatch to some `and` method:
and<T extends {and?: Function;}>(fn1: T, val2: boolean|any): boolean;
and<T extends {and?: Function;}>(fn1: T): (val2: boolean|any) => boolean;
// and<T extends {and?: Function;}>: CurriedFn2<T, boolean|any, boolean>;
// // functions, does this still exist?
// and<T extends () => boolean>(fn1: T, fn2: T): T;
// and<T extends () => boolean>(fn1: T): (fn2: T) => T;
// no generics:
and(v1: any, v2: any): boolean;
and(v1: any): (v2: any) => boolean;
// and: CurriedFn2<any, any, boolean>;
/**
* Returns true if at least one of elements of the list match the predicate, false otherwise.
*/
any<T>(fn: (a: T) => boolean, list: T[]): boolean;
any<T>(fn: (a: T) => boolean): (list: T[]) => boolean;
// any<T>: CurriedFn2<(a: T) => boolean, T[], boolean>;
/**
* Given a list of predicates returns a new predicate that will be true exactly when any one of them is.
*/
anyPass<T>(preds: Pred<T>[]): Pred<T>;
/**
* ap applies a list of functions to a list of values.
*/
ap<T,U>(fns: ((a: T) => U)[], vs: T[]): U[];
ap<T,U>(fns: ((a: T) => U)[]): (vs: T[]) => U[];
// ap<T,U>: CurriedFn2<((a: T) => U)[], T[], U[]>;
/**
* Returns a new list, composed of n-tuples of consecutive elements If n is greater than the length of the list,
* an empty list is returned.
*/
aperture<T>(n: number, list: T): T[][];
aperture(n: number): <T>(list: T) => T[][];
// aperture<T>: CurriedFn2<number, T, T[][]>;
/**
* Returns a new list containing the contents of the given list, followed by the given element.
*/
append<T, U>(el: U, list: T[]): (T & U)[];
append<U>(el: U): <T>(list: T[]) => (T & U)[];
// append<T, U>: CurriedFn2<U, T[], (T & U)[]>;
/**
* Applies function fn to the argument list args. This is useful for creating a fixed-arity function from
* a variadic function. fn should be a bound function if context is significant.
*/
apply<T, U, TResult>(fn: (arg0: T, ...args: T[]) => TResult, args: U[]): TResult;
apply<T, TResult>(fn: (arg0: T, ...args: T[]) => TResult): <U>(args: U[]) => TResult;
// apply<T, U, TResult>: CurriedFn2<(arg0: T, ...args: T[]) => TResult, U[], TResult>;
/**
* Given a spec object recursively mapping properties to functions, creates a function producing an object
* of the same structure, by mapping each property to the result of calling its associated function with
* the supplied arguments.
*/
applySpec<T>(obj: any): (...args: any[]) => T;
/**
* Makes a shallow clone of an object, setting or overriding the specified property with the given value.
*/
assoc<T,U>(prop: Prop, val: T, obj: U): {prop: T} & U;
assoc<T>(prop: Prop, val: T): <U>(obj: U) => {prop: T} & U;
assoc<T,U>(prop: Prop): CurriedFn2<T,U, {prop: T} & U>;
// assoc<T,U>: CurriedFn3<Prop, T, U, {prop: T} & U>;
/**
* Makes a shallow clone of an object, setting or overriding the nodes required to create the given path, and
* placing the specific value at the tail end of that path.
*/
assocPath<T,U>(path: Path, val: T, obj: U): U;
assocPath<T>(path: Path, val: T): <U>(obj: U) => U;
assocPath<T,U>(path: Path): CurriedFn2<T, U, U>;
// assocPath<T,U>: CurriedFn3<Path, T, U, U>;
/**
* Wraps a function of any arity (including nullary) in a function that accepts exactly 2
* parameters. Any extraneous parameters will not be passed to the supplied function.
*/
binary<T, A, B>(fn: (a: A, b: T, ...args: any[]) => T): (a: A, b: B) => T;
binary<T>(fn: (...args: any[]) => T): (a: any, b: any) => T;
/**
* Creates a function that is bound to a context. Note: R.bind does not provide the additional argument-binding
* capabilities of Function.prototype.bind.
*/
bind<T>(fn: (...args: any[]) => any, thisObj: T): (...args: any[]) => any;
bind<T>(fn: (...args: any[]) => any): (thisObj: T) => (...args: any[]) => any;
// bind<T>: CurriedFn2<(...args: any[]) => any, T, (...args: any[]) => any>;
/**
* A function wrapping calls to the two functions in an && operation, returning the result of the first function
* if it is false-y and the result of the second function otherwise. Note that this is short-circuited, meaning
* that the second function will not be invoked if the first returns a false-y value.
*/
both<T>(pred1: Pred<T>, pred2: Pred<T>): Pred<T>;
both<T>(pred1: Pred<T>): (pred2: Pred<T>) => Pred<T>;
// both<T>: CurriedFn2<Pred<T>, Pred<T>, Pred<T>>;
/**
* Returns the result of calling its first argument with the remaining arguments. This is occasionally useful
* as a converging function for R.converge: the left branch can produce a function while the right branch
* produces a value to be passed to that function as an argument.
*/
call(fn: (...args: any[]) => (...args: any[]) => any, ...args: any[]): any;
/**
* `chain` maps a function over a list and concatenates the results.
* This implementation is compatible with the Fantasy-land Chain spec
*/
chain<T, U>(fn: (n: T) => U[], list: T[]): U[];
chain<T, U>(fn: (n: T) => U[]): (list: T[]) => U[];
// chain<T, U>: CurriedFn2<(n: T) => U[], T[], U[]>;
/**
* Restricts a number to be within a range.
* Also works for other ordered types such as Strings and Date
*/
clamp<T>(min: T, max: T, value: T): T;
clamp<T>(min: T, max: T): (value: T) => T;
clamp<T>(min: T): CurriedFn2<T,T,T>;
// clamp<T>: CurriedFn3<T,T,T,T>;
/**
* Creates a deep copy of the value which may contain (nested) Arrays and Objects, Numbers, Strings, Booleans and Dates.
*/
clone<T>(value: T): T;
clone<T>(value: T[]): T[];
/**
* Makes a comparator function out of a function that reports whether the first element is less than the second.
*/
comparator<T>(pred: (a: T, b: T) => boolean): (x: T, y: T) => number;
/**
* Takes a function f and returns a function g such that:
* - applying g to zero or more arguments will give true if applying the same arguments to f gives
* a logical false value; and
* - applying g to zero or more arguments will give false if applying the same arguments to f gives
* a logical true value.
*/
complement<T>(pred: (...args: T[]) => boolean): (...args: T[]) => boolean
/**
* Performs right-to-left function composition. The rightmost function may have any arity; the remaining
* functions must be unary.
*/
compose<V0, T1>(fn0: (x0: V0) => T1): CurriedFn1<V0, T1>;
compose<V0, V1, T1>(fn0: (x0: V0, x1: V1) => T1): CurriedFn2<V0, V1, T1>;
compose<V0, V1, V2, T1>(fn0: (x0: V0, x1: V1, x2: V2) => T1): CurriedFn3<V0, V1, V2, T1>;
compose<V0, V1, V2, V3, T1>(fn0: (x0: V0, x1: V1, x2: V2, x3: V3) => T1): CurriedFn4<V0, V1, V2, V3, T1>;
compose<V0, T1, T2>(fn1: (x: T1) => T2, fn0: (x0: V0) => T1): CurriedFn1<V0, T2>;
compose<V0, V1, T1, T2>(fn1: (x: T1) => T2, fn0: (x0: V0, x1: V1) => T1): CurriedFn2<V0, V1, T2>;
compose<V0, V1, V2, T1, T2>(fn1: (x: T1) => T2, fn0: (x0: V0, x1: V1, x2: V2) => T1): CurriedFn3<V0, V1, V2, T2>;
compose<V0, V1, V2, V3, T1, T2>(fn1: (x: T1) => T2, fn0: (x0: V0, x1: V1, x2: V2, x3: V3) => T1): CurriedFn4<V0, V1, V2, V3, T2>;
compose<V0, T1, T2, T3>(fn2: (x: T2) => T3, fn1: (x: T1) => T2, fn0: (x0: V0) => T1): CurriedFn1<V0, T3>;
compose<V0, V1, T1, T2, T3>(fn2: (x: T2) => T3, fn1: (x: T1) => T2, fn0: (x0: V0, x1: V1) => T1): CurriedFn2<V0, V1, T3>;
compose<V0, V1, V2, T1, T2, T3>(fn2: (x: T2) => T3, fn1: (x: T1) => T2, fn0: (x0: V0, x1: V1, x2: V2) => T1): CurriedFn3<V0, V1, V2, T3>;
compose<V0, V1, V2, V3, T1, T2, T3>(fn2: (x: T2) => T3, fn1: (x: T1) => T2, fn0: (x0: V0, x1: V1, x2: V2, x3: V3) => T1): CurriedFn4<V0, V1, V2, V3, T3>;
compose<V0, T1, T2, T3, T4>(fn3: (x: T3) => T4, fn2: (x: T2) => T3, fn1: (x: T1) => T2, fn0: (x0: V0) => T1): CurriedFn1<V0, T4>;
compose<V0, V1, T1, T2, T3, T4>(fn3: (x: T3) => T4, fn2: (x: T2) => T3, fn1: (x: T1) => T2, fn0: (x0: V0, x1: V1) => T1): CurriedFn2<V0, V1, T4>;
compose<V0, V1, V2, T1, T2, T3, T4>(fn3: (x: T3) => T4, fn2: (x: T2) => T3, fn1: (x: T1) => T2, fn0: (x0: V0, x1: V1, x2: V2) => T1): CurriedFn3<V0, V1, V2, T4>;
compose<V0, V1, V2, V3, T1, T2, T3, T4>(fn3: (x: T3) => T4, fn2: (x: T2) => T3, fn1: (x: T1) => T2, fn0: (x0: V0, x1: V1, x2: V2, x3: V3) => T1): CurriedFn4<V0, V1, V2, V3, T4>;
compose<V0, T1, T2, T3, T4, T5>(fn4: (x: T4) => T5, fn3: (x: T3) => T4, fn2: (x: T2) => T3, fn1: (x: T1) => T2, fn0: (x0: V0) => T1): CurriedFn1<V0, T5>;
compose<V0, V1, T1, T2, T3, T4, T5>(fn4: (x: T4) => T5, fn3: (x: T3) => T4, fn2: (x: T2) => T3, fn1: (x: T1) => T2, fn0: (x0: V0, x1: V1) => T1): CurriedFn2<V0, V1, T5>;
compose<V0, V1, V2, T1, T2, T3, T4, T5>(fn4: (x: T4) => T5, fn3: (x: T3) => T4, fn2: (x: T2) => T3, fn1: (x: T1) => T2, fn0: (x0: V0, x1: V1, x2: V2) => T1): CurriedFn3<V0, V1, V2, T5>;
compose<V0, V1, V2, V3, T1, T2, T3, T4, T5>(fn4: (x: T4) => T5, fn3: (x: T3) => T4, fn2: (x: T2) => T3, fn1: (x: T1) => T2, fn0: (x0: V0, x1: V1, x2: V2, x3: V3) => T1): CurriedFn4<V0, V1, V2, V3, T5>;
compose<V0, T1, T2, T3, T4, T5, T6>(fn5: (x: T5) => T6, fn4: (x: T4) => T5, fn3: (x: T3) => T4, fn2: (x: T2) => T3, fn1: (x: T1) => T2, fn0: (x0: V0) => T1): CurriedFn1<V0, T6>;
compose<V0, V1, T1, T2, T3, T4, T5, T6>(fn5: (x: T5) => T6, fn4: (x: T4) => T5, fn3: (x: T3) => T4, fn2: (x: T2) => T3, fn1: (x: T1) => T2, fn0: (x0: V0, x1: V1) => T1): CurriedFn2<V0, V1, T6>;
compose<V0, V1, V2, T1, T2, T3, T4, T5, T6>(fn5: (x: T5) => T6, fn4: (x: T4) => T5, fn3: (x: T3) => T4, fn2: (x: T2) => T3, fn1: (x: T1) => T2, fn0: (x0: V0, x1: V1, x2: V2) => T1): CurriedFn3<V0, V1, V2, T6>;
compose<V0, V1, V2, V3, T1, T2, T3, T4, T5, T6>(fn5: (x: T5) => T6, fn4: (x: T4) => T5, fn3: (x: T3) => T4, fn2: (x: T2) => T3, fn1: (x: T1) => T2, fn0: (x0: V0, x1: V1, x2: V2, x3: V3) => T1): CurriedFn4<V0, V1, V2, V3, T6>;
compose<V0, T1, T2, T3, T4, T5, T6, T7>(fn6: (x: T6) => T7, fn5: (x: T5) => T6, fn4: (x: T4) => T5, fn3: (x: T3) => T4, fn2: (x: T2) => T3, fn1: (x: T1) => T2, fn0: (x0: V0) => T1): CurriedFn1<V0, T7>;
compose<V0, V1, T1, T2, T3, T4, T5, T6, T7>(fn6: (x: T6) => T7, fn5: (x: T5) => T6, fn4: (x: T4) => T5, fn3: (x: T3) => T4, fn2: (x: T2) => T3, fn1: (x: T1) => T2, fn0: (x0: V0, x1: V1) => T1): CurriedFn2<V0, V1, T7>;
compose<V0, V1, V2, T1, T2, T3, T4, T5, T6, T7>(fn6: (x: T6) => T7, fn5: (x: T5) => T6, fn4: (x: T4) => T5, fn3: (x: T3) => T4, fn2: (x: T2) => T3, fn1: (x: T1) => T2, fn0: (x0: V0, x1: V1, x2: V2) => T1): CurriedFn3<V0, V1, V2, T7>;
compose<V0, V1, V2, V3, T1, T2, T3, T4, T5, T6, T7>(fn6: (x: T6) => T7, fn5: (x: T5) => T6, fn4: (x: T4) => T5, fn3: (x: T3) => T4, fn2: (x: T2) => T3, fn1: (x: T1) => T2, fn0: (x0: V0, x1: V1, x2: V2, x3: V3) => T1): CurriedFn4<V0, V1, V2, V3, T7>;
compose<V0, T1, T2, T3, T4, T5, T6, T7, T8>(fn7: (x: T7) => T8, fn6: (x: T6) => T7, fn5: (x: T5) => T6, fn4: (x: T4) => T5, fn3: (x: T3) => T4, fn2: (x: T2) => T3, fn1: (x: T1) => T2, fn0: (x0: V0) => T1): CurriedFn1<V0, T8>;
compose<V0, V1, T1, T2, T3, T4, T5, T6, T7, T8>(fn7: (x: T7) => T8, fn6: (x: T6) => T7, fn5: (x: T5) => T6, fn4: (x: T4) => T5, fn3: (x: T3) => T4, fn2: (x: T2) => T3, fn1: (x: T1) => T2, fn0: (x0: V0, x1: V1) => T1): CurriedFn2<V0, V1, T8>;
compose<V0, V1, V2, T1, T2, T3, T4, T5, T6, T7, T8>(fn7: (x: T7) => T8, fn6: (x: T6) => T7, fn5: (x: T5) => T6, fn4: (x: T4) => T5, fn3: (x: T3) => T4, fn2: (x: T2) => T3, fn1: (x: T1) => T2, fn0: (x0: V0, x1: V1, x2: V2) => T1): CurriedFn3<V0, V1, V2, T8>;
compose<V0, V1, V2, V3, T1, T2, T3, T4, T5, T6, T7, T8>(fn7: (x: T7) => T8, fn6: (x: T6) => T7, fn5: (x: T5) => T6, fn4: (x: T4) => T5, fn3: (x: T3) => T4, fn2: (x: T2) => T3, fn1: (x: T1) => T2, fn0: (x0: V0, x1: V1, x2: V2, x3: V3) => T1): CurriedFn4<V0, V1, V2, V3, T8>;
compose<V0, T1, T2, T3, T4, T5, T6, T7, T8, T9>(fn8: (x: T8) => T9, fn7: (x: T7) => T8, fn6: (x: T6) => T7, fn5: (x: T5) => T6, fn4: (x: T4) => T5, fn3: (x: T3) => T4, fn2: (x: T2) => T3, fn1: (x: T1) => T2, fn0: (x0: V0) => T1): CurriedFn1<V0, T9>;
compose<V0, V1, T1, T2, T3, T4, T5, T6, T7, T8, T9>(fn8: (x: T8) => T9, fn7: (x: T7) => T8, fn6: (x: T6) => T7, fn5: (x: T5) => T6, fn4: (x: T4) => T5, fn3: (x: T3) => T4, fn2: (x: T2) => T3, fn1: (x: T1) => T2, fn0: (x0: V0, x1: V1) => T1): CurriedFn2<V0, V1, T9>;
compose<V0, V1, V2, T1, T2, T3, T4, T5, T6, T7, T8, T9>(fn8: (x: T8) => T9, fn7: (x: T7) => T8, fn6: (x: T6) => T7, fn5: (x: T5) => T6, fn4: (x: T4) => T5, fn3: (x: T3) => T4, fn2: (x: T2) => T3, fn1: (x: T1) => T2, fn0: (x0: V0, x1: V1, x2: V2) => T1): CurriedFn3<V0, V1, V2, T9>;
compose<V0, V1, V2, V3, T1, T2, T3, T4, T5, T6, T7, T8, T9>(fn8: (x: T8) => T9, fn7: (x: T7) => T8, fn6: (x: T6) => T7, fn5: (x: T5) => T6, fn4: (x: T4) => T5, fn3: (x: T3) => T4, fn2: (x: T2) => T3, fn1: (x: T1) => T2, fn0: (x0: V0, x1: V1, x2: V2, x3: V3) => T1): CurriedFn4<V0, V1, V2, V3, T9>;
/**
* Returns the right-to-left Kleisli composition of the provided functions, each of which must return a value of a type supported by chain.
*/
composeK<V, T1>(fn0: (v: Chain<V>) => Chain<T1>): (v: Chain<V>) => Chain<T1>;
composeK<V, T1, T2>(fn1: (x: T1) => Chain<T2>, fn0: (v: Chain<V>) => Chain<T1>): (v: Chain<V>) => Chain<T2>;
composeK<V, T1, T2, T3>(fn2: (x: T2) => Chain<T3>, fn1: (x: T1) => Chain<T2>, fn0: (v: Chain<V>) => Chain<T1>): (v: Chain<V>) => Chain<T3>;
composeK<V, T1, T2, T3, T4>(fn3: (x: T3) => Chain<T4>, fn2: (x: T2) => Chain<T3>, fn1: (x: T1) => Chain<T2>, fn0: (v: Chain<V>) => Chain<T1>): (v: Chain<V>) => Chain<T4>;
composeK<V, T1, T2, T3, T4, T5>(fn4: (x: T4) => Chain<T5>, fn3: (x: T3) => Chain<T4>, fn2: (x: T2) => Chain<T3>, fn1: (x: T1) => Chain<T2>, fn0: (v: Chain<V>) => Chain<T1>): (v: Chain<V>) => Chain<T5>;
composeK<V, T1, T2, T3, T4, T5, T6>(fn5: (x: T5) => Chain<T6>, fn4: (x: T4) => Chain<T5>, fn3: (x: T3) => Chain<T4>, fn2: (x: T2) => Chain<T3>, fn1: (x: T1) => Chain<T2>, fn0: (v: Chain<V>) => Chain<T1>): (v: Chain<V>) => Chain<T6>;
composeK<V, T1, T2, T3, T4, T5, T6, T7>(fn6: (x: T6) => Chain<T7>, fn5: (x: T5) => Chain<T6>, fn4: (x: T4) => Chain<T5>, fn3: (x: T3) => Chain<T4>, fn2: (x: T2) => Chain<T3>, fn1: (x: T1) => Chain<T2>, fn0: (v: Chain<V>) => Chain<T1>): (v: Chain<V>) => Chain<T7>;
composeK<V, T1, T2, T3, T4, T5, T6, T7, T8>(fn7: (x: T7) => Chain<T8>, fn6: (x: T6) => Chain<T7>, fn5: (x: T5) => Chain<T6>, fn4: (x: T4) => Chain<T5>, fn3: (x: T3) => Chain<T4>, fn2: (x: T2) => Chain<T3>, fn1: (x: T1) => Chain<T2>, fn0: (v: Chain<V>) => Chain<T1>): (v: Chain<V>) => Chain<T8>;
composeK<V, T1, T2, T3, T4, T5, T6, T7, T8, T9>(fn8: (x: T8) => Chain<T9>, fn7: (x: T7) => Chain<T8>, fn6: (x: T6) => Chain<T7>, fn5: (x: T5) => Chain<T6>, fn4: (x: T4) => Chain<T5>, fn3: (x: T3) => Chain<T4>, fn2: (x: T2) => Chain<T3>, fn1: (x: T1) => Chain<T2>, fn0: (v: Chain<V>) => Chain<T1>): (v: Chain<V>) => Chain<T9>;
/**
* Performs right-to-left composition of one or more Promise-returning functions. The rightmost function may have any arity; the remaining functions must be unary.
*/
composeP<V0, T1>(fn0: (x0: V0) => Promise<T1>): CurriedFn1<V0, Promise<T1>>;
composeP<V0, V1, T1>(fn0: (x0: V0, x1: V1) => Promise<T1>): CurriedFn2<V0, V1, Promise<T1>>;
composeP<V0, V1, V2, T1>(fn0: (x0: V0, x1: V1, x2: V2) => Promise<T1>): CurriedFn3<V0, V1, V2, Promise<T1>>;
composeP<V0, V1, V2, V3, T1>(fn0: (x0: V0, x1: V1, x2: V2, x3: V3) => Promise<T1>): CurriedFn4<V0, V1, V2, V3, Promise<T1>>;
composeP<V0, T1, T2>(fn1: (x: T1) => Promise<T2>|T2, fn0: (x0: V0) => Promise<T1>): CurriedFn1<V0, Promise<T2>>;
composeP<V0, V1, T1, T2>(fn1: (x: T1) => Promise<T2>|T2, fn0: (x0: V0, x1: V1) => Promise<T1>): CurriedFn2<V0, V1, Promise<T2>>;
composeP<V0, V1, V2, T1, T2>(fn1: (x: T1) => Promise<T2>|T2, fn0: (x0: V0, x1: V1, x2: V2) => Promise<T1>): CurriedFn3<V0, V1, V2, Promise<T2>>;
composeP<V0, V1, V2, V3, T1, T2>(fn1: (x: T1) => Promise<T2>|T2, fn0: (x0: V0, x1: V1, x2: V2, x3: V3) => Promise<T1>): CurriedFn4<V0, V1, V2, V3, Promise<T2>>;
composeP<V0, T1, T2, T3>(fn2: (x: T2) => Promise<T3>|T3, fn1: (x: T1) => Promise<T2>|T2, fn0: (x0: V0) => Promise<T1>): CurriedFn1<V0, Promise<T3>>;
composeP<V0, V1, T1, T2, T3>(fn2: (x: T2) => Promise<T3>|T3, fn1: (x: T1) => Promise<T2>|T2, fn0: (x0: V0, x1: V1) => Promise<T1>): CurriedFn2<V0, V1, Promise<T3>>;
composeP<V0, V1, V2, T1, T2, T3>(fn2: (x: T2) => Promise<T3>|T3, fn1: (x: T1) => Promise<T2>|T2, fn0: (x0: V0, x1: V1, x2: V2) => Promise<T1>): CurriedFn3<V0, V1, V2, Promise<T3>>;
composeP<V0, V1, V2, V3, T1, T2, T3>(fn2: (x: T2) => Promise<T3>|T3, fn1: (x: T1) => Promise<T2>|T2, fn0: (x0: V0, x1: V1, x2: V2, x3: V3) => Promise<T1>): CurriedFn4<V0, V1, V2, V3, Promise<T3>>;
composeP<V0, T1, T2, T3, T4>(fn3: (x: T3) => Promise<T4>|T4, fn2: (x: T2) => Promise<T3>|T3, fn1: (x: T1) => Promise<T2>|T2, fn0: (x0: V0) => Promise<T1>): CurriedFn1<V0, Promise<T4>>;
composeP<V0, V1, T1, T2, T3, T4>(fn3: (x: T3) => Promise<T4>|T4, fn2: (x: T2) => Promise<T3>|T3, fn1: (x: T1) => Promise<T2>|T2, fn0: (x0: V0, x1: V1) => Promise<T1>): CurriedFn2<V0, V1, Promise<T4>>;
composeP<V0, V1, V2, T1, T2, T3, T4>(fn3: (x: T3) => Promise<T4>|T4, fn2: (x: T2) => Promise<T3>|T3, fn1: (x: T1) => Promise<T2>|T2, fn0: (x0: V0, x1: V1, x2: V2) => Promise<T1>): CurriedFn3<V0, V1, V2, Promise<T4>>;
composeP<V0, V1, V2, V3, T1, T2, T3, T4>(fn3: (x: T3) => Promise<T4>|T4, fn2: (x: T2) => Promise<T3>|T3, fn1: (x: T1) => Promise<T2>|T2, fn0: (x0: V0, x1: V1, x2: V2, x3: V3) => Promise<T1>): CurriedFn4<V0, V1, V2, V3, Promise<T4>>;
composeP<V0, T1, T2, T3, T4, T5>(fn4: (x: T4) => Promise<T5>|T5, fn3: (x: T3) => Promise<T4>|T4, fn2: (x: T2) => Promise<T3>|T3, fn1: (x: T1) => Promise<T2>|T2, fn0: (x0: V0) => Promise<T1>): CurriedFn1<V0, Promise<T5>>;
composeP<V0, V1, T1, T2, T3, T4, T5>(fn4: (x: T4) => Promise<T5>|T5, fn3: (x: T3) => Promise<T4>|T4, fn2: (x: T2) => Promise<T3>|T3, fn1: (x: T1) => Promise<T2>|T2, fn0: (x0: V0, x1: V1) => Promise<T1>): CurriedFn2<V0, V1, Promise<T5>>;
composeP<V0, V1, V2, T1, T2, T3, T4, T5>(fn4: (x: T4) => Promise<T5>|T5, fn3: (x: T3) => Promise<T4>|T4, fn2: (x: T2) => Promise<T3>|T3, fn1: (x: T1) => Promise<T2>|T2, fn0: (x0: V0, x1: V1, x2: V2) => Promise<T1>): CurriedFn3<V0, V1, V2, Promise<T5>>;
composeP<V0, V1, V2, V3, T1, T2, T3, T4, T5>(fn4: (x: T4) => Promise<T5>|T5, fn3: (x: T3) => Promise<T4>|T4, fn2: (x: T2) => Promise<T3>|T3, fn1: (x: T1) => Promise<T2>|T2, fn0: (x0: V0, x1: V1, x2: V2, x3: V3) => Promise<T1>): CurriedFn4<V0, V1, V2, V3, Promise<T5>>;
composeP<V0, T1, T2, T3, T4, T5, T6>(fn5: (x: T5) => Promise<T6>|T6, fn4: (x: T4) => Promise<T5>|T5, fn3: (x: T3) => Promise<T4>|T4, fn2: (x: T2) => Promise<T3>|T3, fn1: (x: T1) => Promise<T2>|T2, fn0: (x0: V0) => Promise<T1>): CurriedFn1<V0, Promise<T6>>;
composeP<V0, V1, T1, T2, T3, T4, T5, T6>(fn5: (x: T5) => Promise<T6>|T6, fn4: (x: T4) => Promise<T5>|T5, fn3: (x: T3) => Promise<T4>|T4, fn2: (x: T2) => Promise<T3>|T3, fn1: (x: T1) => Promise<T2>|T2, fn0: (x0: V0, x1: V1) => Promise<T1>): CurriedFn2<V0, V1, Promise<T6>>;
composeP<V0, V1, V2, T1, T2, T3, T4, T5, T6>(fn5: (x: T5) => Promise<T6>|T6, fn4: (x: T4) => Promise<T5>|T5, fn3: (x: T3) => Promise<T4>|T4, fn2: (x: T2) => Promise<T3>|T3, fn1: (x: T1) => Promise<T2>|T2, fn0: (x0: V0, x1: V1, x2: V2) => Promise<T1>): CurriedFn3<V0, V1, V2, Promise<T6>>;
composeP<V0, V1, V2, V3, T1, T2, T3, T4, T5, T6>(fn5: (x: T5) => Promise<T6>|T6, fn4: (x: T4) => Promise<T5>|T5, fn3: (x: T3) => Promise<T4>|T4, fn2: (x: T2) => Promise<T3>|T3, fn1: (x: T1) => Promise<T2>|T2, fn0: (x0: V0, x1: V1, x2: V2, x3: V3) => Promise<T1>): CurriedFn4<V0, V1, V2, V3, Promise<T6>>;
composeP<V0, T1, T2, T3, T4, T5, T6, T7>(fn6: (x: T6) => Promise<T7>|T7, fn5: (x: T5) => Promise<T6>|T6, fn4: (x: T4) => Promise<T5>|T5, fn3: (x: T3) => Promise<T4>|T4, fn2: (x: T2) => Promise<T3>|T3, fn1: (x: T1) => Promise<T2>|T2, fn0: (x0: V0) => Promise<T1>): CurriedFn1<V0, Promise<T7>>;
composeP<V0, V1, T1, T2, T3, T4, T5, T6, T7>(fn6: (x: T6) => Promise<T7>|T7, fn5: (x: T5) => Promise<T6>|T6, fn4: (x: T4) => Promise<T5>|T5, fn3: (x: T3) => Promise<T4>|T4, fn2: (x: T2) => Promise<T3>|T3, fn1: (x: T1) => Promise<T2>|T2, fn0: (x0: V0, x1: V1) => Promise<T1>): CurriedFn2<V0, V1, Promise<T7>>;
composeP<V0, V1, V2, T1, T2, T3, T4, T5, T6, T7>(fn6: (x: T6) => Promise<T7>|T7, fn5: (x: T5) => Promise<T6>|T6, fn4: (x: T4) => Promise<T5>|T5, fn3: (x: T3) => Promise<T4>|T4, fn2: (x: T2) => Promise<T3>|T3, fn1: (x: T1) => Promise<T2>|T2, fn0: (x0: V0, x1: V1, x2: V2) => Promise<T1>): CurriedFn3<V0, V1, V2, Promise<T7>>;
composeP<V0, V1, V2, V3, T1, T2, T3, T4, T5, T6, T7>(fn6: (x: T6) => Promise<T7>|T7, fn5: (x: T5) => Promise<T6>|T6, fn4: (x: T4) => Promise<T5>|T5, fn3: (x: T3) => Promise<T4>|T4, fn2: (x: T2) => Promise<T3>|T3, fn1: (x: T1) => Promise<T2>|T2, fn0: (x0: V0, x1: V1, x2: V2, x3: V3) => Promise<T1>): CurriedFn4<V0, V1, V2, V3, Promise<T7>>;
composeP<V0, T1, T2, T3, T4, T5, T6, T7, T8>(fn7: (x: T7) => Promise<T8>|T8, fn6: (x: T6) => Promise<T7>|T7, fn5: (x: T5) => Promise<T6>|T6, fn4: (x: T4) => Promise<T5>|T5, fn3: (x: T3) => Promise<T4>|T4, fn2: (x: T2) => Promise<T3>|T3, fn1: (x: T1) => Promise<T2>|T2, fn0: (x0: V0) => Promise<T1>): CurriedFn1<V0, Promise<T8>>;
composeP<V0, V1, T1, T2, T3, T4, T5, T6, T7, T8>(fn7: (x: T7) => Promise<T8>|T8, fn6: (x: T6) => Promise<T7>|T7, fn5: (x: T5) => Promise<T6>|T6, fn4: (x: T4) => Promise<T5>|T5, fn3: (x: T3) => Promise<T4>|T4, fn2: (x: T2) => Promise<T3>|T3, fn1: (x: T1) => Promise<T2>|T2, fn0: (x0: V0, x1: V1) => Promise<T1>): CurriedFn2<V0, V1, Promise<T8>>;
composeP<V0, V1, V2, T1, T2, T3, T4, T5, T6, T7, T8>(fn7: (x: T7) => Promise<T8>|T8, fn6: (x: T6) => Promise<T7>|T7, fn5: (x: T5) => Promise<T6>|T6, fn4: (x: T4) => Promise<T5>|T5, fn3: (x: T3) => Promise<T4>|T4, fn2: (x: T2) => Promise<T3>|T3, fn1: (x: T1) => Promise<T2>|T2, fn0: (x0: V0, x1: V1, x2: V2) => Promise<T1>): CurriedFn3<V0, V1, V2, Promise<T8>>;
composeP<V0, V1, V2, V3, T1, T2, T3, T4, T5, T6, T7, T8>(fn7: (x: T7) => Promise<T8>|T8, fn6: (x: T6) => Promise<T7>|T7, fn5: (x: T5) => Promise<T6>|T6, fn4: (x: T4) => Promise<T5>|T5, fn3: (x: T3) => Promise<T4>|T4, fn2: (x: T2) => Promise<T3>|T3, fn1: (x: T1) => Promise<T2>|T2, fn0: (x0: V0, x1: V1, x2: V2, x3: V3) => Promise<T1>): CurriedFn4<V0, V1, V2, V3, Promise<T8>>;
composeP<V0, T1, T2, T3, T4, T5, T6, T7, T8, T9>(fn8: (x: T8) => Promise<T9>|T9, fn7: (x: T7) => Promise<T8>|T8, fn6: (x: T6) => Promise<T7>|T7, fn5: (x: T5) => Promise<T6>|T6, fn4: (x: T4) => Promise<T5>|T5, fn3: (x: T3) => Promise<T4>|T4, fn2: (x: T2) => Promise<T3>|T3, fn1: (x: T1) => Promise<T2>|T2, fn0: (x0: V0) => Promise<T1>): CurriedFn1<V0, Promise<T9>>;
composeP<V0, V1, T1, T2, T3, T4, T5, T6, T7, T8, T9>(fn8: (x: T8) => Promise<T9>|T9, fn7: (x: T7) => Promise<T8>|T8, fn6: (x: T6) => Promise<T7>|T7, fn5: (x: T5) => Promise<T6>|T6, fn4: (x: T4) => Promise<T5>|T5, fn3: (x: T3) => Promise<T4>|T4, fn2: (x: T2) => Promise<T3>|T3, fn1: (x: T1) => Promise<T2>|T2, fn0: (x0: V0, x1: V1) => Promise<T1>): CurriedFn2<V0, V1, Promise<T9>>;
composeP<V0, V1, V2, T1, T2, T3, T4, T5, T6, T7, T8, T9>(fn8: (x: T8) => Promise<T9>|T9, fn7: (x: T7) => Promise<T8>|T8, fn6: (x: T6) => Promise<T7>|T7, fn5: (x: T5) => Promise<T6>|T6, fn4: (x: T4) => Promise<T5>|T5, fn3: (x: T3) => Promise<T4>|T4, fn2: (x: T2) => Promise<T3>|T3, fn1: (x: T1) => Promise<T2>|T2, fn0: (x0: V0, x1: V1, x2: V2) => Promise<T1>): CurriedFn3<V0, V1, V2, Promise<T9>>;
composeP<V0, V1, V2, V3, T1, T2, T3, T4, T5, T6, T7, T8, T9>(fn8: (x: T8) => Promise<T9>|T9, fn7: (x: T7) => Promise<T8>|T8, fn6: (x: T6) => Promise<T7>|T7, fn5: (x: T5) => Promise<T6>|T6, fn4: (x: T4) => Promise<T5>|T5, fn3: (x: T3) => Promise<T4>|T4, fn2: (x: T2) => Promise<T3>|T3, fn1: (x: T1) => Promise<T2>|T2, fn0: (x0: V0, x1: V1, x2: V2, x3: V3) => Promise<T1>): CurriedFn4<V0, V1, V2, V3, Promise<T9>>;
/**
* Returns a new list consisting of the elements of the first list followed by the elements
* of the second.
*/
concat<T>(list1: T[], list2: T[]): T[];
concat<T>(list1: T[]): (list2: T[]) => T[];
// concat<T>: CurriedFn2<T[], T[], T[]>;
concat(list1: string, list2: string): string;
concat(list1: string): (list2: string) => string;
// concat: CurriedFn2<string, string, string>;
/**
* Returns a function, fn, which encapsulates if/else-if/else logic. R.cond takes a list of [predicate, transform] pairs.
* All of the arguments to fn are applied to each of the predicates in turn until one returns a "truthy" value, at which
* point fn returns the result of applying its arguments to the corresponding transformer. If none of the predicates
* matches, fn returns undefined.
*/
cond<T, U>(fns: [Pred<T>, (v: T) => U][]): (v: T) => U;
/**
* Wraps a constructor function inside a curried function that can be called with the same arguments and returns the same type.
*/
construct(fn: Function): Function;
/**
* Wraps a constructor function inside a curried function that can be called with the same arguments and returns the same type.
* The arity of the function returned is specified to allow using variadic constructor functions.
*/
constructN(n: number, fn: Function): Function;
// constructN: CurriedFn2<number, Function, Function>;
/**
* Returns `true` if the specified item is somewhere in the list, `false` otherwise.
* Equivalent to `indexOf(a)(list) > -1`. Uses strict (`===`) equality checking.
*/
contains(a: string, list: string): boolean;
contains(a: string): (list: string) => boolean;
// contains: CurriedFn2<string, string, boolean>;
contains<T>(a: T, list: T[]): boolean;
contains<T>(a: T): (list: T[]) => boolean;
// contains<T>: CurriedFn2<T, T[], boolean>;
/**
* Accepts a converging function and a list of branching functions and returns a new
* function. When invoked, this new function is applied to some arguments, each branching
* function is applied to those same arguments. The results of each branching function
* are passed as arguments to the converging function to produce the return value.
*/
converge<T>(after: (...fn_results: any[]) => T, fns: Array<(...args: any[]) => any>): (...args: any[]) => T;
// converge<T>: CurriedFn2<(...fn_results: any[]) => T, Array<(...args: any[]) => any>, (...args: any[]) => T>;
/**
* Counts the elements of a list according to how many match each value
* of a key generated by the supplied function. Returns an object
* mapping the keys produced by `fn` to the number of occurrences in
* the list. Note that all keys are coerced to strings because of how
* JavaScript objects work.
*/
countBy<T>(fn: (a: T) => string|number, list: T[]): { [index: string]: number };
countBy<T>(fn: (a: T) => string|number): (list: T[]) => { [index: string]: number };
// countBy<T>: CurriedFn2<(a: T) => string|number, T[], { [index: string]: number }>;
/**
* Returns a curried equivalent of the provided function.
*/
curry<T1, T2, TResult>(fn: (a: T1, b: T2) => TResult): CurriedFn2<T1, T2, TResult>;
curry<T1, T2, T3, TResult>(fn: (a: T1, b: T2, c: T3) => TResult): CurriedFn3<T1, T2, T3, TResult>;
curry<T1, T2, T3, T4, TResult>(fn: (a: T1, b: T2, c: T3, d: T4) => TResult): CurriedFn4<T1, T2, T3, T4, TResult>;
curry<T1, T2, T3, T4, T5, TResult>(fn: (a: T1, b: T2, c: T3, d: T4, e: T5) => TResult): CurriedFn5<T1, T2, T3, T4, T5, TResult>;
curry<T1, T2, T3, T4, T5, T6, TResult>(fn: (a: T1, b: T2, c: T3, d: T4, e: T5, f: T6) => TResult): CurriedFn6<T1, T2, T3, T4, T5, T6, TResult>;
curry<T1, T2, T3, T4, T5, T6, T7, TResult>(fn: (a: T1, b: T2, c: T3, d: T4, e: T5, f: T6, g: T7) => TResult): CurriedFn7<T1, T2, T3, T4, T5, T6, T7, TResult>;
curry<T1, T2, T3, T4, T5, T6, T7, T8, TResult>(fn: (a: T1, b: T2, c: T3, d: T4, e: T5, f: T6, g: T7, h: T8) => TResult): CurriedFn8<T1, T2, T3, T4, T5, T6, T7, T8, TResult>;
curry<T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>(fn: (a: T1, b: T2, c: T3, d: T4, e: T5, f: T6, g: T7, h: T8, i: T9) => TResult): CurriedFn9<T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>;
// curry(fn: Function): Function
/**
* Returns a curried equivalent of the provided function, with the specified arity.
*/
curryN<T>(length: number, fn: (...args: any[]) => T): (...args: any[]) => T;
// curryN<T>: CurriedFn2<number, (...args: any[]) => T, (...args: any[]) => T>;
/**
* Decrements its argument.
*/
dec(n: number): number;
/**
* Returns the second argument if it is not null or undefined. If it is null or undefined, the
* first (default) argument is returned.
*/
defaultTo<T,U>(a: T, b: U): T|U;
defaultTo<T>(a: T): <U>(b: U) => T|U;
// defaultTo<T,U>: CurriedFn2<T, U, T|U>;
/**
* Finds the set (i.e. no duplicates) of all elements in the first list not contained in the second list.
*/
difference<T>(list1: T[], list2: T[]): T[];
difference<T>(list1: T[]): (list2: T[]) => T[];
// difference<T>: CurriedFn2<T[], T[], T[]>;
/**
* Finds the set (i.e. no duplicates) of all elements in the first list not contained in the second list.
* Duplication is determined according to the value returned by applying the supplied predicate to two list
* elements.
*/
differenceWith<T>(pred: (a: T, b: T) => boolean, list1: T[], list2: T[]): T[];
differenceWith<T>(pred: (a: T, b: T) => boolean, list1: T[]): (list2: T[]) => T[];
differenceWith<T>(pred: (a: T, b: T) => boolean): CurriedFn2<T,T,T>;
// differenceWith<T>: CurriedFn3<(a: T, b: T) => boolean, T[], T[], T[]>;
/*
* Returns a new object that does not contain a prop property.
*/
// TODO: fix, can't yet calculate type of object minus this key
// dissoc<T,U>(prop: Prop, obj: T & { [prop: Prop]: any }): T; // wanna say the original object is the same with the extra key, but can't bind it to prop
// dissoc<T,U extends Struct<any>>(prop: keyof U, obj: U): T;
// It seems impossible to infer the return type, so this may have to be specified explicitly
dissoc<T>(prop: Prop, obj: Struct<any>): T;
dissoc(prop: Prop): <T>(obj: Struct<any>) => T;
// dissoc<T>: CurriedFn2<Prop, Struct<any>, T>;
// dissoc<U extends Struct<any>>(prop: keyof U): <T>(obj: U) => T; // can't do this, don't know U in time
// simplified but inferrable: leave the key in
dissoc<T>(prop: keyof T, obj: T): T;
dissoc(prop: Prop): <T>(obj: T) => T;
// dissoc<T>: CurriedFn2<keyof T, T, T>;
// dissoc<T>: CurriedFn2<Prop, T, T>;
/**
* Makes a shallow clone of an object, omitting the property at the given path.
*/
dissocPath<T>(path: Path, obj: Struct<any>): T;
dissocPath(path: Path): <T>(obj: Struct<any>) => T;
// dissocPath<T>: CurriedFn2<Path, Struct<any>, T>;
/**
* Divides two numbers. Equivalent to a / b.
*/
divide(a: number, b: number): number;
divide(a: number): (b: number) => number;
// divide: CurriedFn2<number, number, number>;
/**
* Returns a new list containing all but the first n elements of the given list.
*/
drop<T>(n: number, xs: T[]): T[];
drop(n: number, xs: string): string;
drop<T>(n: number): {
(xs: string): string;
(xs: T[]): T[];
}
// drop<T>: CurriedFn2<number, T[], T[]>;
// drop: CurriedFn2<number, string, string>;
/**
* Returns a list containing all but the last n elements of the given list.
*/
dropLast<T>(n: number, xs: T[]): T[];
dropLast(n: number, xs: string): string;
dropLast<T>(n: number): {
(xs: T[]): T[];
(xs: string): string;
}
// dropLast<T>: CurriedFn2<number, T[], T[]>;
// dropLast: CurriedFn2<number, string, string>;
/**
* Returns a new list containing all but last then elements of a given list, passing each value from the
* right to the supplied predicate function, skipping elements while the predicate function returns true.
*/
dropLastWhile<T>(fn: (a: T) => boolean, list: T[]): T[];
dropLastWhile<T>(fn: (a: T) => boolean): (list: T[]) => T[];
// dropLastWhile<T>: CurriedFn2<(a: T) => boolean, T[], T[]>;
/**
* Returns a new list containing the last n elements of a given list, passing each value to the supplied
* predicate function, skipping elements while the predicate function returns true.
*/
dropWhile<T>(fn: (a: T) => boolean, list: T[]): T[];
dropWhile<T>(fn: (a: T) => boolean): (list: T[]) => T[];
// dropWhile<T>: CurriedFn2<(a: T) => boolean, T[], T[]>;
/**
* A function wrapping calls to the two functions in an || operation, returning the result of the first
* function if it is truth-y and the result of the second function otherwise. Note that this is
* short-circuited, meaning that the second function will not be invoked if the first returns a truth-y value.
*/
either<T>(pred1: Pred<T>, pred2: Pred<T>): Pred<T>;
either<T>(pred1: Pred<T>): (pred2: Pred<T>) => Pred<T>;
// either<T>: CurriedFn2<Pred<T>, Pred<T>, Pred<T>>;
/**
* Returns the empty value of its argument's type. Ramda defines the empty value of Array ([]), Object ({}),
* String (''), and Arguments. Other types are supported if they define <Type>.empty and/or <Type>.prototype.empty.
* Dispatches to the empty method of the first argument, if present.
*/
empty<T>(x: T): T;
/**
* Takes a function and two values in its domain and returns true if the values map to the same value in the
* codomain; false otherwise.
*/
eqBy<T>(fn: (a: T) => T, a: T, b: T): boolean;
eqBy<T>(fn: (a: T) => T, a: T): (b: T) => boolean;
eqBy<T>(fn: (a: T) => T): CurriedFn2<T,T,boolean>;
// eqBy<T>: CurriedFn3<(a: T) => T, T, T, boolean>;
/**
* Reports whether two functions have the same value for the specified property.
*/
// more generics
eqProps<T,U>(prop: Prop, obj1: T, obj2: U): boolean;
eqProps<T,U>(prop: Prop): CurriedFn2<T,U,boolean>;
eqProps(prop: Prop): <T,U>(obj1: T, obj2: U) => boolean;
eqProps<T>(prop: Prop, obj1: T): <U>(obj2: U) => boolean;
// eqProps<T,U>: CurriedFn3<Prop, T, U, boolean>;
// less generics
eqProps(prop: Prop, obj1: any, obj2: any): boolean;
eqProps(prop: Prop): (obj1: any, obj2: any) => boolean;
eqProps(prop: Prop): (obj1: any) => (obj2: any) => boolean;
// eqProps: CurriedFn3<Prop, any, any, boolean>;
/**
* Returns true if its arguments are equivalent, false otherwise. Dispatches to an equals method if present.
* Handles cyclical data structures.
*/
equals<T>(a: T, b: T): boolean;
equals<T>(a: T): (b: T) => boolean;
// equals<T>: CurriedFn2<T, T, boolean>;
/**
* Creates a new object by evolving a shallow copy of object, according to the transformation functions.
*/
evolve(transformations: Dictionary<Function>, obj: any): any;
evolve(transformations: Dictionary<Function>): (obj: any) => any;
// evolve<V>: CurriedFn2<Dictionary<Function>, any, any>;
evolve<V>(transformations: Nested<V>, obj: V): Nested<V>;
evolve<V>(transformations: Nested<V>): <V>(obj: V) => Nested<V>;
// evolve<V>: CurriedFn2<Nested<V>, V, Nested<V>>;
/*
* A function that always returns false. Any passed in parameters are ignored.
*/
F(): false;
/**
* Returns a new list containing only those items that match a given predicate function. The predicate function is passed one argument: (value).
*/
// array
filter<T>(fn: (value: T) => boolean, list: T[]): T[];
filter<T>(fn: (value: T) => boolean): <T>(list: T[]) => T[];
// filter<T>: CurriedFn2<(value: T) => boolean, T[], T[]>;
// functor
filter<T>(fn: (value: T) => boolean, list: Functor<T>): T[];
filter<T>(fn: (value: T) => boolean): <T>(list: Functor<T>) => T[];
// filter<T>: CurriedFn2<(value: T) => boolean, Functor<T>, T[]>;
// object
filter<T,U extends Dictionary<T>>(fn: (value: T) => boolean, obj: U) : Partial<U>;
filter<T>(fn: (value: T) => boolean): <U extends Dictionary<T>>(obj: U) => Partial<U>;
// filter<T,U extends Dictionary<T>>: CurriedFn2<(value: T) => boolean, U, Partial<U>>;
/**
* Returns the first element of the list which matches the predicate, or `undefined` if no
* element matches.
*/
find<T>(fn: (a: T) => boolean, list: T[]): T;
find<T>(fn: (a: T) => boolean): <T>(list: T[]) => T;
// find<T>: CurriedFn2<(a: T) => boolean, T[], T>;
/**
* Returns the index of the first element of the list which matches the predicate, or `-1`
* if no element matches.
*/
findIndex<T>(fn: (a: T) => boolean, list: T[]): number;
findIndex<T>(fn: (a: T) => boolean): <T>(list: T[]) => number;
// findIndex<T>: CurriedFn2<(a: T) => boolean, T[], number>;
/**
* Returns the last element of the list which matches the predicate, or `undefined` if no
* element matches.
*/
findLast<T>(fn: (a: T) => boolean, list: T[]): T;
findLast<T>(fn: (a: T) => boolean): <T>(list: T[]) => T;
// findLast<T>: CurriedFn2<(a: T) => boolean, T[], T>;
/**
* Returns the index of the last element of the list which matches the predicate, or
* `-1` if no element matches.
*/
findLastIndex<T>(fn: (a: T) => boolean, list: T[]): number;
findLastIndex<T>(fn: (a: T) => boolean): <T>(list: T[]) => number;
// findLastIndex<T>: CurriedFn2<(a: T) => boolean, T[], number>;
/**
* Returns a new list by pulling every item out of it (and all its sub-arrays) and putting
* them in a new array, depth-first.
*/
flatten<T>(x: T[][]): T[];
flatten<T>(x: T[]): T[];
/**
* Returns a new function much like the supplied one, except that the first two arguments'
* order is reversed.
*/
flip<T,U,TResult>(fn: (arg0: T, arg1: U) => TResult): (arg1: U, arg0?: T) => TResult;
flip<T,U,Rest,TResult>(fn: (arg0: T, arg1: U, ...args: Rest[]) => TResult): (arg1: U, arg0?: T, ...args: Rest[]) => TResult;
/**
* Iterate over an input list, calling a provided function fn for each element in the list.
*/
forEach<T>(fn: (x: T) => void, list: T[]): T[];
forEach<T>(fn: (x: T) => void): (list: T[]) => T[];
// forEach<T>: CurriedFn2<(x: T) => void, T[], T[]>;
/**
* Creates a new object out of a list key-value pairs.
*/
fromPairs<V>(pairs: KeyValuePair<Prop, V>[]): {[index: string]: V};
/**
* Splits a list into sublists stored in an object, based on the result of
* calling a String-returning function
* on each element, and grouping the results according to values returned.
*/
groupBy<T>(fn: (a: T) => string, list: T[]): {[index: string]: T[]};
groupBy<T>(fn: (a: T) => string): <T>(list: T[]) => {[index: string]: T[]};
// groupBy<T>: CurriedFn2<(a: T) => string, T[], {[index: string]: T[]}>;
/**
* Takes a list and returns a list of lists where each sublist's elements are all "equal" according to the provided equality function
*/
groupWith<T>(fn: (x: T, y: T) => boolean, list: T[]): T[][];
groupWith<T>(fn: (x: T, y: T) => boolean): (list: T[]) => T[][];
groupWith<T>(fn: (x: T, y: T) => boolean, list: string): string[];
groupWith<T>(fn: (x: T, y: T) => boolean): (list: string) => string[];
// groupWith<T>: CurriedFn2<(x: T, y: T) => boolean, T[], T[][]>;
// groupWith<T>: CurriedFn2<(x: T, y: T) => boolean, string, string[]>;
/**
* Returns true if the first parameter is greater than the second.
*/
gt(a: number, b: number): boolean;
gt(a: number): (b: number) => boolean;
// gt: CurriedFn2<number, number, boolean>;
/**
* Returns true if the first parameter is greater than or equal to the second.
*/
gte(a: number, b: number): boolean;
gte(a: number): (b: number) => boolean;
// gte: CurriedFn2<number, number, boolean>;
/**
* Returns whether or not an object has an own property with the specified name.
*/
has<T>(s: string, obj: T): boolean;
has(s: string): <T>(obj: T) => boolean;
// has<T>: CurriedFn2<string, T, boolean>;
/**
* Returns whether or not an object or its prototype chain has a property with the specified name
*/
hasIn<T>(s: string, obj: T): boolean;
hasIn(s: string): <T>(obj: T) => boolean;
// hasIn<T>: CurriedFn2<string, T, boolean>;
/**
* Returns the first element in a list.
* In some libraries this function is named `first`.
*/
head<T extends Array<any>>(list: T): T[0];
head(list: string): string;
/**
* Returns true if its arguments are identical, false otherwise. Values are identical if they reference the
* same memory. NaN is identical to NaN; 0 and -0 are not identical.
*/
identical<T>(a: T, b: T): boolean;
identical<T>(a: T): (b: T) => boolean;
// identical<T>: CurriedFn2<T, T, boolean>;
/**
* A function that does nothing but return the parameter supplied to it. Good as a default
* or placeholder function.
*/
identity<T>(a: T): T;
/**
* Creates a function that will process either the onTrue or the onFalse function depending upon the result
* of the condition predicate.
*/
ifElse<T,U,V>(fn: Pred<T>, onTrue: (v: T) => U, onFalse: (v: T) => V): (v: T) => U|V;
// ifElse<T,U,V>: CurriedFn3<Pred<T>, (v: T) => U, (v: T) => V, (v: T) => U|V>;
/**
* Increments its argument.
*/
inc(n: number): number;
/**
* Given a function that generates a key, turns a list of objects into an object indexing the objects
* by the given key.
*/
indexBy<T,U>(fn: (a: T) => string, list: T[]): U;
indexBy<T>(fn: (a: T) => string): <U>(list: T[]) => U;
// indexBy<T,U>: CurriedFn2<(a: T) => string, T[], U>;
/**
* Returns the position of the first occurrence of an item in an array
* (by strict equality),
* or -1 if the item is not included in the array.
*/
indexOf<T>(target: T, list: T[]): number;
indexOf<T>(target: T): (list: T[]) => number;
// indexOf<T>: CurriedFn2<T, T[], number>;
/**
* Returns all but the last element of a list.
*/
init<T>(list: T[]): T[];
/**
* Inserts the supplied element into the list, at index index. Note that
* this is not destructive: it returns a copy of the list with the changes.
*/
insert<T>(index: number, elt: T, list: T[]): T[];
insert<T>(index: number, elt: T): (list: T[]) => T[];
insert<T>(index: number): CurriedFn2<T, T[], T[]>;
insert(index: number): <T>(elt: T, list: T[]) => T[];
insert(index: number): <T>(elt: T) => (list: T[]) => T[];
// insert<T>: CurriedFn3<number, T, T[], T[]>;
/**
* Inserts the sub-list into the list, at index `index`. _Note that this
* is not destructive_: it returns a copy of the list with the changes.
*/
insertAll<T>(index: number, elts: T[], list: T[]): T[];
insertAll<T>(index: number, elts: T[]): (list: T[]) => T[];
insertAll<T>(index: number): CurriedFn2<T[], T[], T[]>;
insertAll(index: number): <T>(elts: T[], list: T[]) => T[];
insertAll(index: number): <T>(elts: T[]) => (list: T[]) => T[];
// insertAll<T>: CurriedFn3<number, T[], T[], T[]>;
// alternative version?
insertAll<T>(index: number): CurriedFn2<T, T, T>;
/**
* Combines two lists into a set (i.e. no duplicates) composed of those elements common to both lists.
*/
intersection<T>(list1: T[], list2: T[]): T[];
intersection<T>(list1: T[]): (list2: T[]) => T[];
// intersection<T>: CurriedFn2<T[], T[], T[]>;
/**
* Combines two lists into a set (i.e. no duplicates) composed of those
* elements common to both lists. Duplication is determined according
* to the value returned by applying the supplied predicate to two list
* elements.
*/
intersectionWith<T>(pred: (a: T, b: T) => boolean, list1: T[], list2: T[]): T[];
intersectionWith<T>(pred: (a: T, b: T) => boolean): CurriedFn2<T[], T[], T[]>;
// intersectionWith<T>: CurriedFn3<(a: T, b: T) => boolean, T[], T[], T[]>;
/**
* Creates a new list with the separator interposed between elements.
*/
intersperse<T>(separator: T, list: T[]): T[];
intersperse<T>(separator: T): (list: T[]) => T[];
// intersperse<T>: CurriedFn2<T, T[], T[]>;
/**
* Transforms the items of the list with the transducer and appends the transformed items to the accumulator
* using an appropriate iterator function based on the accumulator type.
*/
into<T,U,V extends AccOpts<T,U>>(acc: V, xf: (list: T[]) => U, list: T[]): U;
into<T,U,V extends AccOpts<T,U>>(acc: V): CurriedFn2<(list: T[]) => U, T[], U>;
into<T,U,V extends AccOpts<T,U>>(acc: V, xf: (list: T[]) => U): <T>(list: T[]) => U;
into<T,U,V extends AccOpts<T,U>>(acc: V): CurriedFn2<(list: T[]) => U, T[], U>;
into<T,U,V extends AccOpts<T,U>>(acc: V): <T>(xf: (list: T[]) => U, list: T[]) => U;
into<T,U,V extends AccOpts<T,U>>(acc: V): <T>(xf: (list: T[]) => U) => (list: T[]) => U;
// into<T,U,V extends AccOpts<T,U>>: CurriedFn3<V, (list: T[]) => U, T[], U>;
/**
* Same as R.invertObj, however this accounts for objects with duplicate values by putting the values into an array.
*/
invert(obj: Object): {[index: string]: string[]};
invert(obj: Object): {[index: number]: string[]};
/**
* Returns a new object with the keys of the given object as values, and the values of the given object as keys.
*/
invertObj(obj: Object): {[index: string]: string};
invertObj(obj: Object): {[index: number]: string};
/**
* Turns a named method of an object (or object prototype) into a function that can be
* called directly. Passing the optional `len` parameter restricts the returned function to
* the initial `len` parameters of the method.
*
* The returned function is curried and accepts `len + 1` parameters (or `method.length + 1`
* when `len` is not specified), and the final parameter is the target object.
*/
// with keyof -- currently can't seem do to function application like this yet
// invoker<T, K extends keyof T, R> (len: number /* = 0 */, name: K, obj: T): obj[K]();
// // invoker<T, K extends keyof T, R>: CurriedFn3<number /* = 0 */, K, T, obj[K]()>;