pepka 0.13.0-b1 → 0.13.0-b10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bundle.d.ts CHANGED
@@ -1,28 +1,76 @@
1
- // Generated by dts-bundle-generator v5.9.0
1
+ import {F as FT} from 'ts-toolbelt'
2
+ export { __ }
2
3
 
3
- export declare type Args = any[];
4
- declare const __: () => void;
5
- export declare const curry: (fn: Function) => (...args: Args) => any;
6
- export declare const toLower: (s: string) => string;
7
- export declare const toUpper: (s: string) => string;
8
- export declare const type: (s: any) => any;
4
+ // Generated by dts-bundle-generator v7.1.0
5
+
6
+ export type Cond = (...xs: any[]) => boolean;
9
7
  export interface AnyObject {
10
8
  [k: string]: any;
11
9
  }
12
- export declare type AnyFunc = (...args: any[]) => any;
13
- export declare const equals: (...args: any[]) => any;
14
- export declare const ifElse: (...args: any[]) => any;
15
- export declare const when: (...args: any[]) => any;
16
- export declare const compose: (...fns: Function[]) => (s?: any) => any;
17
- export declare const bind: (...args: any[]) => any;
18
- export declare const nth: (...args: any[]) => any;
19
- export declare const includes: (...args: any[]) => any;
20
- export declare const slice: (...args: any[]) => any;
21
- export declare const head: any;
22
- export declare const tail: any;
23
- export declare const add: (...args: any[]) => any;
24
- export declare const subtract: (...args: any[]) => any;
25
- export declare const flip: (fn: Function) => (...args: any[]) => any;
10
+ export type AnyArgs = any[];
11
+ export type Curried<Args extends AnyArgs = AnyArgs, ReturnT = any> = (arg: Args[number]) => Curried<Args> | ReturnT;
12
+ export type Reducer = <T = any>(accum: T, cur: any, index: number) => T;
13
+ export type AnyFunc<ReturnT = any, Args extends AnyArgs = AnyArgs> = (...args: Args) => ReturnT;
14
+ export type Placeholder = symbol;
15
+ declare const __: Placeholder;
16
+ export declare const curry: <Func extends AnyFunc<any, AnyArgs>>(fn: AnyFunc) => FT.Curry<Func>;
17
+ export type Func2 = (a: any, b: any) => any;
18
+ export declare function curry2<Func extends Func2>(fn: Func): {
19
+ (a: Placeholder, b: Parameters<Func>[1]): (a: Parameters<Func>[0]) => ReturnType<Func>;
20
+ (a: Parameters<Func>[0], b: Placeholder): (b: Parameters<Func>[1]) => ReturnType<Func>;
21
+ (a: Parameters<Func>[0]): (b: Parameters<Func>[1]) => ReturnType<Func>;
22
+ (a: Parameters<Func>[0], b: Parameters<Func>[1]): ReturnType<Func>;
23
+ };
24
+ export type Func3 = (a: any, b: any, c: any) => any;
25
+ export declare function curry3<Func extends Func3>(fn: Func): FT.Curry<Func>;
26
+ export declare const uncurry: <Args extends any[] = any[], ReturnT = any>(fn: Curried<Args, any>) => AnyFunc;
27
+ export declare const toLower: (s: string) => string;
28
+ export declare const toUpper: (s: string) => string;
29
+ export declare const type: (s: any) => any;
30
+ export declare const equals: {
31
+ (a: symbol, b: any): (a: any) => boolean;
32
+ (a: any, b: symbol): (b: any) => boolean;
33
+ (a: any): (b: any) => boolean;
34
+ (a: any, b: any): boolean;
35
+ };
36
+ export declare const ifElse: FT.Curry<AnyFunc<any, AnyArgs>>;
37
+ export declare const when: FT.Curry<(cond: (s: any) => boolean, pipe: (s: any) => any, s: any) => any>;
38
+ export type Composed<TIn, TOut> = (x: TIn) => TOut;
39
+ export declare const compose: <TIn = any, TOut = any>(...fns: AnyFunc[]) => Composed<TIn, TOut>;
40
+ export declare const bind: {
41
+ (a: symbol, b: any): (a: any) => any;
42
+ (a: any, b: symbol): (b: any) => any;
43
+ (a: any): (b: any) => any;
44
+ (a: any, b: any): any;
45
+ };
46
+ export declare const nth: {
47
+ (a: symbol, b: string | unknown[]): (a: number) => unknown;
48
+ (a: number, b: symbol): (b: string | unknown[]) => unknown;
49
+ (a: number): (b: string | unknown[]) => unknown;
50
+ (a: number, b: string | unknown[]): unknown;
51
+ };
52
+ export declare const includes: {
53
+ (a: symbol, b: unknown[]): (a: unknown) => boolean;
54
+ (a: unknown, b: symbol): (b: unknown[]) => boolean;
55
+ (a: unknown): (b: unknown[]) => boolean;
56
+ (a: unknown, b: unknown[]): boolean;
57
+ };
58
+ export declare const slice: FT.Curry<(from: number, to: number, o: any[] | string) => string | any[]>;
59
+ export declare const head: (b: string | unknown[]) => unknown;
60
+ export declare const tail: FT.Curry<(o: string | any[]) => string | any[]>;
61
+ export declare const add: {
62
+ (a: symbol, b: number): (a: number) => number;
63
+ (a: number, b: symbol): (b: number) => number;
64
+ (a: number): (b: number) => number;
65
+ (a: number, b: number): number;
66
+ };
67
+ export declare const subtract: {
68
+ (a: symbol, b: number): (a: number) => number;
69
+ (a: number, b: symbol): (b: number) => number;
70
+ (a: number): (b: number) => number;
71
+ (a: number, b: number): number;
72
+ };
73
+ export declare const flip: (fn: Function) => FT.Curry<AnyFunc<any, AnyArgs>>;
26
74
  export declare const isNil: (s: any) => boolean;
27
75
  export declare const length: (s: any[] | string) => number;
28
76
  export declare const always: <T = any>(s: T) => () => T;
@@ -37,91 +85,433 @@ export declare const toPairs: (o: AnyObject | any[]) => [
37
85
  string,
38
86
  any
39
87
  ][];
40
- export declare const test: (...args: any[]) => any;
41
- export declare const tap: (...args: any[]) => any;
42
- export declare const append: (...args: any[]) => any;
43
- export declare const split: (...args: any[]) => any;
88
+ export declare const test: {
89
+ (a: symbol, b: string): (a: RegExp) => boolean;
90
+ (a: RegExp, b: symbol): (b: string) => boolean;
91
+ (a: RegExp): (b: string) => boolean;
92
+ (a: RegExp, b: string): boolean;
93
+ };
94
+ export declare const tap: {
95
+ (a: symbol, b: any): (a: Function) => any;
96
+ (a: Function, b: symbol): (b: any) => any;
97
+ (a: Function): (b: any) => any;
98
+ (a: Function, b: any): any;
99
+ };
100
+ export declare const append: {
101
+ (a: symbol, b: any[]): (a: any) => any[];
102
+ (a: any, b: symbol): (b: any[]) => any[];
103
+ (a: any): (b: any[]) => any[];
104
+ (a: any, b: any[]): any[];
105
+ };
106
+ export declare const split: {
107
+ (a: symbol, b: string): (a: string) => string[];
108
+ (a: string, b: symbol): (b: string) => string[];
109
+ (a: string): (b: string) => string[];
110
+ (a: string, b: string): string[];
111
+ };
44
112
  export declare const T: (...args: any[]) => true;
45
113
  export declare const F: (...args: any[]) => false;
46
114
  export declare const sizeof: (s: any[] | string | AnyObject) => number;
47
- export declare const range: (...args: any[]) => any;
115
+ export declare const range: {
116
+ (a: symbol, b: number): (a: number) => any[];
117
+ (a: number, b: symbol): (b: number) => any[];
118
+ (a: number): (b: number) => any[];
119
+ (a: number, b: number): any[];
120
+ };
48
121
  export declare const uniq: (xs: any[]) => any;
49
- export declare const intersection: (...args: any[]) => any;
50
- export declare const genBy: (...args: any[]) => any;
51
- export declare const once: <Func extends AnyFunc>(fn: Func) => (...args: Parameters<Func>) => any;
122
+ export declare const intersection: {
123
+ (a: symbol, b: any[]): (a: any[]) => any[];
124
+ (a: any[], b: symbol): (b: any[]) => any[];
125
+ (a: any[]): (b: any[]) => any[];
126
+ (a: any[], b: any[]): any[];
127
+ };
128
+ export declare const genBy: {
129
+ (a: symbol, b: number): (a: (i: number) => any) => any[];
130
+ (a: (i: number) => any, b: symbol): (b: number) => any[];
131
+ (a: (i: number) => any): (b: number) => any[];
132
+ (a: (i: number) => any, b: number): any[];
133
+ };
134
+ export declare const once: <Func extends AnyFunc<any, AnyArgs>>(fn: Func) => (...args: Parameters<Func>) => any;
52
135
  export declare const reverse: (xs: any[]) => any;
53
- export declare const gt: (...args: any[]) => any;
54
- export declare const lt: (...args: any[]) => any;
55
- export declare const gte: (...args: any[]) => any;
56
- export declare const lte: (...args: any[]) => any;
57
- export declare const sort: (...args: any[]) => any;
58
- export declare const find: (...args: any[]) => any;
59
- export declare const findIndex: (...args: any[]) => any;
60
- export declare const indexOf: (...args: any[]) => any;
61
- export declare const explore: (caption: string, level?: string) => any;
62
- export declare const cond: (...args: any[]) => any;
63
- export declare const assoc: (...args: any[]) => any;
64
- export declare const assocPath: (...args: any[]) => any;
65
- export declare const all: (...args: any[]) => any;
66
- export declare const any: (...args: any[]) => any;
67
- export declare const allPass: (...args: any[]) => any;
68
- export declare const anyPass: (...args: any[]) => any;
69
- export declare const prop: (...args: any[]) => any;
70
- export declare const propEq: (...args: any[]) => any;
71
- export declare const propsEq: (...args: any[]) => any;
72
- export declare const pathOr: (...args: any[]) => any;
73
- export declare const path: any;
74
- export declare const pathEq: (...args: any[]) => any;
75
- export declare const pathsEq: (...args: any[]) => any;
76
- export declare const clone: (s: any) => any;
77
- export declare const reduce: (...args: any[]) => any;
78
- export declare const pickBy: (...args: any[]) => any;
79
- export declare const pick: (...args: any[]) => any;
80
- export declare const omit: (...args: any[]) => any;
136
+ export declare const gt: {
137
+ (a: symbol, b: number): (a: number) => boolean;
138
+ (a: number, b: symbol): (b: number) => boolean;
139
+ (a: number): (b: number) => boolean;
140
+ (a: number, b: number): boolean;
141
+ };
142
+ export declare const lt: {
143
+ (a: symbol, b: number): (a: number) => boolean;
144
+ (a: number, b: symbol): (b: number) => boolean;
145
+ (a: number): (b: number) => boolean;
146
+ (a: number, b: number): boolean;
147
+ };
148
+ export declare const gte: {
149
+ (a: symbol, b: number): (a: number) => boolean;
150
+ (a: number, b: symbol): (b: number) => boolean;
151
+ (a: number): (b: number) => boolean;
152
+ (a: number, b: number): boolean;
153
+ };
154
+ export declare const lte: {
155
+ (a: symbol, b: number): (a: number) => boolean;
156
+ (a: number, b: symbol): (b: number) => boolean;
157
+ (a: number): (b: number) => boolean;
158
+ (a: number, b: number): boolean;
159
+ };
160
+ export declare const sort: {
161
+ (a: symbol, b: any[]): (a: any) => any[];
162
+ (a: any, b: symbol): (b: any[]) => any[];
163
+ (a: any): (b: any[]) => any[];
164
+ (a: any, b: any[]): any[];
165
+ };
166
+ export declare const find: {
167
+ (a: symbol, b: any[]): (a: Cond) => any;
168
+ (a: Cond, b: symbol): (b: any[]) => any;
169
+ (a: Cond): (b: any[]) => any;
170
+ (a: Cond, b: any[]): any;
171
+ };
172
+ export declare const findIndex: {
173
+ (a: symbol, b: any[]): (a: Cond) => number;
174
+ (a: Cond, b: symbol): (b: any[]) => number;
175
+ (a: Cond): (b: any[]) => number;
176
+ (a: Cond, b: any[]): number;
177
+ };
178
+ export declare const indexOf: {
179
+ (a: symbol, b: any[]): (a: any) => number;
180
+ (a: any, b: symbol): (b: any[]) => number;
181
+ (a: any): (b: any[]) => number;
182
+ (a: any, b: any[]): number;
183
+ };
184
+ export declare const explore: (caption: string, level?: string) => (b: any) => any;
185
+ export declare const cond: {
186
+ (a: symbol, b: any): (a: [
187
+ Cond,
188
+ Function
189
+ ][]) => any;
190
+ (a: [
191
+ Cond,
192
+ Function
193
+ ][], b: symbol): (b: any) => any;
194
+ (a: [
195
+ Cond,
196
+ Function
197
+ ][]): (b: any) => any;
198
+ (a: [
199
+ Cond,
200
+ Function
201
+ ][], b: any): any;
202
+ };
203
+ export declare const assoc: FT.Curry<(prop: string, v: any, obj: AnyObject) => {
204
+ [x: string]: any;
205
+ }>;
206
+ export declare const assocPath: any;
207
+ export declare const all: {
208
+ (a: symbol, b: any[]): (a: Cond) => boolean;
209
+ (a: Cond, b: symbol): (b: any[]) => boolean;
210
+ (a: Cond): (b: any[]) => boolean;
211
+ (a: Cond, b: any[]): boolean;
212
+ };
213
+ export declare const any: {
214
+ (a: symbol, b: any[]): (a: Cond) => boolean;
215
+ (a: Cond, b: symbol): (b: any[]) => boolean;
216
+ (a: Cond): (b: any[]) => boolean;
217
+ (a: Cond, b: any[]): boolean;
218
+ };
219
+ export declare const allPass: {
220
+ (a: symbol, b: any): (a: Cond[]) => boolean;
221
+ (a: Cond[], b: symbol): (b: any) => boolean;
222
+ (a: Cond[]): (b: any) => boolean;
223
+ (a: Cond[], b: any): boolean;
224
+ };
225
+ export declare const anyPass: {
226
+ (a: symbol, b: any): (a: Cond[]) => boolean;
227
+ (a: Cond[], b: symbol): (b: any) => boolean;
228
+ (a: Cond[]): (b: any) => boolean;
229
+ (a: Cond[], b: any): boolean;
230
+ };
231
+ export declare const prop: {
232
+ (a: symbol, b: AnyObject): (a: string) => any;
233
+ (a: string, b: symbol): (b: AnyObject) => any;
234
+ (a: string): (b: AnyObject) => any;
235
+ (a: string, b: AnyObject): any;
236
+ };
237
+ export declare const propEq: FT.Curry<(key: string, value: any, o: AnyObject) => boolean>;
238
+ export declare const propsEq: FT.Curry<(key: string, o1: any, o2: AnyObject) => boolean>;
239
+ export declare const pathOr: FT.Curry<(_default: any, path: string[], o: any) => any>;
240
+ export declare const path: FT.Curry<(path: string[], o: any) => any>;
241
+ export declare const pathEq: FT.Curry<(_path: string[], value: any, o: AnyObject) => (a: any) => boolean>;
242
+ export declare const pathsEq: FT.Curry<(_path: string[], o1: AnyObject, o2: AnyObject) => (a: any) => boolean>;
243
+ export declare const clone: (s: any, shallow?: boolean) => any;
244
+ export declare const cloneShallow: (s: any) => any;
245
+ export declare const reduce: FT.Curry<(fn: Reducer, accum: any, arr: any[]) => FT.Curry<(...p: [
246
+ ] | [
247
+ accum: any
248
+ ]) => any>>;
249
+ export declare const pickBy: {
250
+ (a: symbol, b: AnyObject): (a: Cond) => any;
251
+ (a: Cond, b: symbol): (b: AnyObject) => any;
252
+ (a: Cond): (b: AnyObject) => any;
253
+ (a: Cond, b: AnyObject): any;
254
+ };
255
+ export declare const pick: {
256
+ (a: symbol, b: AnyObject): (a: string[]) => {};
257
+ (a: string[], b: symbol): (b: AnyObject) => {};
258
+ (a: string[]): (b: AnyObject) => {};
259
+ (a: string[], b: AnyObject): {};
260
+ };
261
+ export declare const omit: {
262
+ (a: symbol, b: AnyObject): (a: string[]) => any;
263
+ (a: string[], b: symbol): (b: AnyObject) => any;
264
+ (a: string[]): (b: AnyObject) => any;
265
+ (a: string[], b: AnyObject): any;
266
+ };
81
267
  export declare const fromPairs: (pairs: [
82
268
  string,
83
269
  any
84
- ][]) => any;
85
- export declare const concat: (...args: any[]) => any;
86
- export declare const join: (...args: any[]) => any;
87
- export declare const map: (...args: any[]) => any;
88
- export declare const forEach: (...args: any[]) => any;
89
- export declare const both: (...args: any[]) => any;
270
+ ][]) => FT.Curry<(fn: Reducer, accum: any, arr: any[]) => FT.Curry<(...p: [
271
+ ] | [
272
+ accum: any
273
+ ]) => any>>;
274
+ export declare const concat: {
275
+ (a: symbol, b: string | any[]): (a: string | any[]) => string | any[];
276
+ (a: string | any[], b: symbol): (b: string | any[]) => string | any[];
277
+ (a: string | any[]): (b: string | any[]) => string | any[];
278
+ (a: string | any[], b: string | any[]): string | any[];
279
+ };
280
+ export declare const join: {
281
+ (a: symbol, b: string[]): (a: string) => string;
282
+ (a: string, b: symbol): (b: string[]) => string;
283
+ (a: string): (b: string[]) => string;
284
+ (a: string, b: string[]): string;
285
+ };
286
+ export declare const map: {
287
+ (a: symbol, b: any[]): (a: (s: any) => any) => any[];
288
+ (a: (s: any) => any, b: symbol): (b: any[]) => any[];
289
+ (a: (s: any) => any): (b: any[]) => any[];
290
+ (a: (s: any) => any, b: any[]): any[];
291
+ };
292
+ export declare const forEach: {
293
+ (a: symbol, b: any[]): (a: (s: any) => any) => void;
294
+ (a: (s: any) => any, b: symbol): (b: any[]) => void;
295
+ (a: (s: any) => any): (b: any[]) => void;
296
+ (a: (s: any) => any, b: any[]): void;
297
+ };
298
+ export declare const both: FT.Curry<(cond1: Cond, cond2: Cond, s: any) => boolean>;
90
299
  export declare const isEmpty: (s: any) => boolean | null;
91
300
  export declare const empty: (s: any) => {} | undefined;
92
- export declare const replace: (...args: any[]) => any;
93
- export declare const filter: (...args: any[]) => any;
301
+ export declare const replace: FT.Curry<(a: string | RegExp, b: string, where: string) => string>;
302
+ export declare const filter: any;
94
303
  export declare const memoize: (fn: Function) => () => any;
95
- export declare const mergeShallow: (...args: any[]) => any;
96
- export declare const mergeDeep: (...args: any[]) => any;
97
- export declare const mergeDeepX: (...args: any[]) => any;
98
- export declare const mergeDeepAdd: (...args: any[]) => any;
99
- export declare const overProp: (...args: any[]) => any;
304
+ export declare const mergeShallow: {
305
+ (a: symbol, b: AnyObject): (a: AnyObject) => AnyObject;
306
+ (a: AnyObject, b: symbol): (b: AnyObject) => AnyObject;
307
+ (a: AnyObject): (b: AnyObject) => AnyObject;
308
+ (a: AnyObject, b: AnyObject): AnyObject;
309
+ };
310
+ export declare const mergeDeep: {
311
+ (a: symbol, b: AnyObject): (a: AnyObject) => FT.Curry<(...p: [
312
+ ] | [
313
+ o1: AnyObject,
314
+ o2: AnyObject
315
+ ] | [
316
+ o2: AnyObject
317
+ ] | [
318
+ o1: AnyObject
319
+ ]) => any>;
320
+ (a: AnyObject, b: symbol): (b: AnyObject) => FT.Curry<(...p: [
321
+ ] | [
322
+ o1: AnyObject,
323
+ o2: AnyObject
324
+ ] | [
325
+ o2: AnyObject
326
+ ] | [
327
+ o1: AnyObject
328
+ ]) => any>;
329
+ (a: AnyObject): (b: AnyObject) => FT.Curry<(...p: [
330
+ ] | [
331
+ o1: AnyObject,
332
+ o2: AnyObject
333
+ ] | [
334
+ o2: AnyObject
335
+ ] | [
336
+ o1: AnyObject
337
+ ]) => any>;
338
+ (a: AnyObject, b: AnyObject): FT.Curry<(...p: [
339
+ ] | [
340
+ o1: AnyObject,
341
+ o2: AnyObject
342
+ ] | [
343
+ o2: AnyObject
344
+ ] | [
345
+ o1: AnyObject
346
+ ]) => any>;
347
+ };
348
+ export declare const mergeDeepX: {
349
+ (a: symbol, b: AnyObject): (a: AnyObject) => FT.Curry<(...p: [
350
+ ] | [
351
+ o1: AnyObject,
352
+ o2: AnyObject
353
+ ] | [
354
+ o2: AnyObject
355
+ ] | [
356
+ o1: AnyObject
357
+ ]) => any>;
358
+ (a: AnyObject, b: symbol): (b: AnyObject) => FT.Curry<(...p: [
359
+ ] | [
360
+ o1: AnyObject,
361
+ o2: AnyObject
362
+ ] | [
363
+ o2: AnyObject
364
+ ] | [
365
+ o1: AnyObject
366
+ ]) => any>;
367
+ (a: AnyObject): (b: AnyObject) => FT.Curry<(...p: [
368
+ ] | [
369
+ o1: AnyObject,
370
+ o2: AnyObject
371
+ ] | [
372
+ o2: AnyObject
373
+ ] | [
374
+ o1: AnyObject
375
+ ]) => any>;
376
+ (a: AnyObject, b: AnyObject): FT.Curry<(...p: [
377
+ ] | [
378
+ o1: AnyObject,
379
+ o2: AnyObject
380
+ ] | [
381
+ o2: AnyObject
382
+ ] | [
383
+ o1: AnyObject
384
+ ]) => any>;
385
+ };
386
+ export declare const mergeDeepAdd: {
387
+ (a: symbol, b: AnyObject): (a: AnyObject) => FT.Curry<(...p: [
388
+ ] | [
389
+ o1: AnyObject,
390
+ o2: AnyObject
391
+ ] | [
392
+ o2: AnyObject
393
+ ] | [
394
+ o1: AnyObject
395
+ ]) => any>;
396
+ (a: AnyObject, b: symbol): (b: AnyObject) => FT.Curry<(...p: [
397
+ ] | [
398
+ o1: AnyObject,
399
+ o2: AnyObject
400
+ ] | [
401
+ o2: AnyObject
402
+ ] | [
403
+ o1: AnyObject
404
+ ]) => any>;
405
+ (a: AnyObject): (b: AnyObject) => FT.Curry<(...p: [
406
+ ] | [
407
+ o1: AnyObject,
408
+ o2: AnyObject
409
+ ] | [
410
+ o2: AnyObject
411
+ ] | [
412
+ o1: AnyObject
413
+ ]) => any>;
414
+ (a: AnyObject, b: AnyObject): FT.Curry<(...p: [
415
+ ] | [
416
+ o1: AnyObject,
417
+ o2: AnyObject
418
+ ] | [
419
+ o2: AnyObject
420
+ ] | [
421
+ o1: AnyObject
422
+ ]) => any>;
423
+ };
424
+ export declare const overProp: FT.Curry<(prop: string, pipe: AnyFunc, data: any) => FT.Curry<(...p: [
425
+ ] | [
426
+ v: any,
427
+ obj: AnyObject
428
+ ] | [
429
+ obj: AnyObject
430
+ ] | [
431
+ v: any
432
+ ]) => any>>;
100
433
  /** mapKeys({ a: 'b' }, { a: 44 }) -> { b: 44 } */
101
- export declare const mapKeys: (...args: any[]) => any;
434
+ export declare const mapKeys: {
435
+ (a: symbol, b: AnyObject): (a: {
436
+ [oldKey: string]: string;
437
+ }) => AnyObject;
438
+ (a: {
439
+ [oldKey: string]: string;
440
+ }, b: symbol): (b: AnyObject) => AnyObject;
441
+ (a: {
442
+ [oldKey: string]: string;
443
+ }): (b: AnyObject) => AnyObject;
444
+ (a: {
445
+ [oldKey: string]: string;
446
+ }, b: AnyObject): AnyObject;
447
+ };
102
448
  /** One promise waits for another. */
103
- export declare const forEachSerial: (...args: any[]) => any;
449
+ export declare const forEachSerial: {
450
+ (a: symbol, b: any[]): (a: AnyFunc<any, AnyArgs>) => Promise<void>;
451
+ (a: AnyFunc<any, AnyArgs>, b: symbol): (b: any[]) => Promise<void>;
452
+ (a: AnyFunc<any, AnyArgs>): (b: any[]) => Promise<void>;
453
+ (a: AnyFunc<any, AnyArgs>, b: any[]): Promise<void>;
454
+ };
104
455
  /** Promise.all wrapper for functional pipelining. */
105
456
  export declare const waitAll: (promises: Promise<any>[]) => Promise<any[]>;
457
+ export declare const waitTap: {
458
+ (a: symbol, b: any): (a: Function) => Promise<any>;
459
+ (a: Function, b: symbol): (b: any) => Promise<any>;
460
+ (a: Function): (b: any) => Promise<any>;
461
+ (a: Function, b: any): Promise<any>;
462
+ };
106
463
  /** Waits for all promises mapped by the fn. */
107
- export declare const forEachAsync: (...args: any[]) => any;
464
+ export declare const forEachAsync: {
465
+ (a: symbol, b: any[]): (a: (item: any) => Promise<any>) => Promise<any[]>;
466
+ (a: (item: any) => Promise<any>, b: symbol): (b: any[]) => Promise<any[]>;
467
+ (a: (item: any) => Promise<any>): (b: any[]) => Promise<any[]>;
468
+ (a: (item: any) => Promise<any>, b: any[]): Promise<any[]>;
469
+ };
108
470
  /** The same as compose, but waits for promises in chains and returns a Promise. */
109
- export declare const composeAsync: <T = any>(...fns: AnyFunc[]) => (data?: any) => Promise<T>;
471
+ export declare const composeAsync: import("ts-toolbelt/out/Function/Compose/Multi/Async").ComposeMultiAsync;
110
472
  export declare const mirror: (s: any) => any;
111
473
  export declare const reflect: (s: any) => any;
112
474
  export declare const echo: (s: any) => any;
113
- export declare const qappend: (...args: any[]) => any;
114
- export declare const qassoc: (...args: any[]) => any;
115
- export declare const qreduce: (...args: any[]) => any;
116
- export declare const qmergeDeep: any;
117
- export declare const qmergeDeepX: any;
118
- export declare const qmergeDeepAdd: any;
475
+ export declare const qappend: {
476
+ (a: symbol, b: any[]): (a: any) => any[];
477
+ (a: any, b: symbol): (b: any[]) => any[];
478
+ (a: any): (b: any[]) => any[];
479
+ (a: any, b: any[]): any[];
480
+ };
481
+ export declare const qassoc: import("ts-toolbelt/out/Function/Curry").Curry<(prop: string, v: any, obj: AnyObject) => AnyObject>;
482
+ export declare const qreduce: import("ts-toolbelt/out/Function/Curry").Curry<(<T>(fn: Reducer, accum: any, arr: T[]) => any)>;
483
+ export declare const qmergeDeep: import("ts-toolbelt/out/Function/Curry").Curry<(o1: AnyObject, o2: AnyObject) => AnyObject>;
484
+ export declare const qmergeDeepX: import("ts-toolbelt/out/Function/Curry").Curry<(o1: AnyObject, o2: AnyObject) => AnyObject>;
485
+ export declare const qmergeDeepAdd: import("ts-toolbelt/out/Function/Curry").Curry<(o1: AnyObject, o2: AnyObject) => AnyObject>;
119
486
  /** qmapKeys({ a: 'b' }, { a: 44 }) -> { b: 44 } */
120
- export declare const qmapKeys: (...args: any[]) => any;
121
- export declare const qfilter: (...args: any[]) => any;
487
+ export declare const qmapKeys: {
488
+ (a: symbol, b: AnyObject): (a: {
489
+ [oldKey: string]: string;
490
+ }) => AnyObject;
491
+ (a: {
492
+ [oldKey: string]: string;
493
+ }, b: symbol): (b: AnyObject) => AnyObject;
494
+ (a: {
495
+ [oldKey: string]: string;
496
+ }): (b: AnyObject) => AnyObject;
497
+ (a: {
498
+ [oldKey: string]: string;
499
+ }, b: AnyObject): AnyObject;
500
+ };
501
+ export declare const qfilter: {
502
+ (a: symbol, b: any[] | AnyObject): (a: (v: any, k: string | number) => boolean) => any[] | AnyObject;
503
+ (a: (v: any, k: string | number) => boolean, b: symbol): (b: any[] | AnyObject) => any[] | AnyObject;
504
+ (a: (v: any, k: string | number) => boolean): (b: any[] | AnyObject) => any[] | AnyObject;
505
+ (a: (v: any, k: string | number) => boolean, b: any[] | AnyObject): any[] | AnyObject;
506
+ };
122
507
  /** @deprecated */
123
- export declare const qindexOf: (...args: any[]) => any;
124
- export declare type StrTmpl = ((data: AnyObject) => string);
508
+ export declare const qindexOf: {
509
+ (a: symbol, b: any[]): (a: any) => number;
510
+ (a: any, b: symbol): (b: any[]) => number;
511
+ (a: any): (b: any[]) => number;
512
+ (a: any, b: any[]): number;
513
+ };
514
+ export type StrTmpl = ((data: AnyObject) => string);
125
515
  export declare const getTmpl: (tmpl: string) => StrTmpl;
126
516
 
127
517
  export {};
@@ -38,9 +38,6 @@ const _curry = (fn, args, new_args) => {
38
38
  const curry = ((fn) => ((...args) => fn.length > countArgs(args)
39
39
  ? _curry(fn, [], args)
40
40
  : fn(...args)));
41
- // type EndlessPh<Func extends FT.Function, ArgT> =
42
- // (a: ArgT) => ReturnType<Func>
43
- // | ((a: A.x) => EndlessPh<Func, ArgT>)
44
41
  const endlessph = (fn) => {
45
42
  function _endlessph(a) {
46
43
  return a === __ ? fn : fn(a);
@@ -72,6 +69,7 @@ function curry3(fn) {
72
69
 
73
70
  const undef = undefined;
74
71
  const nul = null;
72
+ const inf = Infinity;
75
73
  const to = (s) => typeof s;
76
74
  const isNull = (s) => s === nul;
77
75
  const isUndef = (s) => s === undef;
@@ -200,7 +198,7 @@ const equals = curry2((a, b) => {
200
198
  });
201
199
  const ifElse = curry((cond, pipeYes, pipeNo, s) => cond(s) ? pipeYes(s) : pipeNo(s));
202
200
  const when = curry3((cond, pipe, s) => ifElse(cond, pipe, identity, s));
203
- const compose = ((...fns) => (s = __) => {
201
+ const compose = ((...fns) => (s = Symbol()) => {
204
202
  for (let i = length(fns) - 1; i > -1; i--) {
205
203
  s = s === __ ? fns[i]() : fns[i](s);
206
204
  }
@@ -222,9 +220,9 @@ const includes = curry2((s, ss) => {
222
220
  return false;
223
221
  }
224
222
  });
225
- const slice = curry3((from, to, o) => o.slice(from, (isNum(to) ? to : Infinity)));
223
+ const slice = curry3((from, to, o) => o.slice(from, (isNum(to) ? to : inf)));
226
224
  const head = nth(0);
227
- const tail = slice(1, nul);
225
+ const tail = slice(1, inf); // typeshit.
228
226
  const add = curry2((n, m) => n + m);
229
227
  const subtract = curry2((n, m) => m - n);
230
228
  const flip = (fn) => curry((b, a) => fn(a, b));
@@ -297,7 +295,7 @@ const assoc = curry3((prop, v, obj) => ({
297
295
  }));
298
296
  const assocPath = curry3((_path, v, o) => compose((first) => assoc(first, length(_path) < 2
299
297
  ? v
300
- : assocPath(slice(1, null, _path), v, isObj(o[first]) ? o[first] : {}), o), head)(_path));
298
+ : assocPath(slice(1, inf, _path), v, isObj(o[first]) ? o[first] : {}), o), head)(_path));
301
299
  const all = curry2((pred, xs) => xs.every(pred));
302
300
  const any = curry2((pred, xs) => xs.some(pred));
303
301
  const allPass = curry2((preds, x) => preds.every((pred) => pred(x)));
@@ -307,7 +305,7 @@ const propEq = curry3((key, value, o) => equals(o[key], value));
307
305
  const propsEq = curry3((key, o1, o2) => equals(o1[key], o2[key]));
308
306
  const pathOr = curry3((_default, path, o) => ifElse(length, () => isNil(o)
309
307
  ? _default
310
- : compose(ifElse(isNil, always(_default), (o) => pathOr(_default, slice(1, nul, path), o)), flip(prop)(o), head)(path), always(o), path));
308
+ : compose(ifElse(isNil, always(_default), (o) => pathOr(_default, slice(1, inf, path), o)), flip(prop)(o), head)(path), always(o), path));
311
309
  const path = pathOr(undef);
312
310
  const pathEq = curry3((_path, value, o) => equals(path(_path, o), value));
313
311
  const pathsEq = curry3((_path, o1, o2) => equals(path(_path, o1), path(_path, o2)));