1 | import { F as FunctionToolbelt, O as ObjectToolbelt, L as ListToolbelt } from "./_ts-toolbelt/src/ts-toolbelt";
|
2 |
|
3 | type RambdaTypes = "Object" | "Number" | "Boolean" | "String" | "Null" | "Array" | "RegExp" | "NaN" | "Function" | "Undefined" | "Async" | "Promise";
|
4 |
|
5 | type FilterFunctionArray<T> = (x: T) => boolean;
|
6 | type FilterPredicateIndexed<T> = (x: T, i: number) => boolean;
|
7 | type FilterFunctionObject<T> = (x: T, prop: string, inputObj: Dictionary<T>) => boolean;
|
8 | type MapFunctionObject<T, U> = (x: T, prop: string, inputObj: Dictionary<T>) => U;
|
9 | type MapFunctionArray<T, U> = (x: T) => U;
|
10 | type MapFunctionArrayIndexed<T, U> = (x: T, i: number) => U;
|
11 | type MapIterator<T, U> = (x: T) => U;
|
12 | type MapIndexedIterator<T, U> = (x: T, i: number) => U;
|
13 |
|
14 | type SimplePredicate<T> = (x: T) => boolean;
|
15 |
|
16 | type CommonKeys<T1, T2> = keyof T1 & keyof T2;
|
17 |
|
18 | type Ord = number | string | boolean | Date;
|
19 |
|
20 | type Path = string | readonly (number | string)[];
|
21 | type RamdaPath = readonly (number | string)[];
|
22 |
|
23 | type ValueOfRecord<R> =
|
24 | R extends Record<any, infer T>
|
25 | ? T
|
26 | : never;
|
27 |
|
28 | interface KeyValuePair<K, V> extends Array<K | V> {
|
29 | 0: K;
|
30 | 1: V;
|
31 | }
|
32 | interface Lens {
|
33 | <T, U>(obj: T): U;
|
34 | set<T, U>(str: string, obj: T): U;
|
35 | }
|
36 | type Arity1Fn = (a: any) => any;
|
37 |
|
38 | type Arity2Fn = (a: any, b: any) => any;
|
39 |
|
40 | type Pred = (...x: readonly any[]) => boolean;
|
41 | type Predicate<T> = (input: T) => boolean;
|
42 | type SafePred<T> = (...x: readonly T[]) => boolean;
|
43 |
|
44 | interface Dictionary<T> {
|
45 | [index: string]: T;
|
46 | }
|
47 | type Partial<T> = {
|
48 | [P in keyof T]?: T[P];
|
49 | };
|
50 |
|
51 | type Evolvable<E extends Evolver> = {
|
52 | [P in keyof E]?: Evolved<E[P]>;
|
53 | };
|
54 |
|
55 | type Evolver<T extends Evolvable<any> = any> = {
|
56 | [key in keyof Partial<T>]: ((value: T[key]) => T[key]) | (T[key] extends Evolvable<any> ? Evolver<T[key]> : never);
|
57 | };
|
58 |
|
59 | type Evolve<O extends Evolvable<E>, E extends Evolver> = {
|
60 | [P in keyof O]: P extends keyof E
|
61 | ? EvolveValue<O[P], E[P]>
|
62 | : O[P];
|
63 | };
|
64 |
|
65 | type EvolveNestedValue<O, E extends Evolver> =
|
66 | O extends object
|
67 | ? O extends Evolvable<E>
|
68 | ? Evolve<O, E>
|
69 | : never
|
70 | : never;
|
71 |
|
72 | type EvolveValue<V, E> =
|
73 | E extends (value: V) => any
|
74 | ? ReturnType<E>
|
75 | : E extends Evolver
|
76 | ? EvolveNestedValue<V, E>
|
77 | : never;
|
78 |
|
79 | type Merge<O1 extends object, O2 extends object, Depth extends 'flat' | 'deep'> = ObjectToolbelt.Merge<ListToolbelt.ObjectOf<O1>, ListToolbelt.ObjectOf<O2>, Depth, 1>;
|
80 |
|
81 | interface AssocPartialOne<K extends keyof any> {
|
82 | <T>(val: T): <U>(obj: U) => Record<K, T> & U;
|
83 | <T, U>(val: T, obj: U): Record<K, T> & U;
|
84 | }
|
85 |
|
86 |
|
87 |
|
88 | type Func<T> = (input: any) => T;
|
89 | type VoidInputFunc<T> = () => T;
|
90 | type Fn<In, Out> = (x: In) => Out;
|
91 | type FnTwo<In, Out> = (x: In, y: In) => Out;
|
92 | type MapFn<In, Out> = (x: In, index: number) => Out;
|
93 |
|
94 | type FilterFunction<T> = (x: T, prop?: string, inputObj?: object) => boolean;
|
95 | type PartitionPredicate<T> = (x: T, prop?: string) => boolean;
|
96 | type MapFunction<In, Out> = (x: In, prop?: string, inputObj?: object) => Out;
|
97 | type SortObjectPredicate<T> = (aProp: string, bProp: string, aValue: T, bValue: T) => number;
|
98 |
|
99 | interface MapInterface<T> {
|
100 | (list: T[]): T[];
|
101 | (obj: Dictionary<T>): Dictionary<T>;
|
102 | }
|
103 |
|
104 | interface HeadObject<T> {
|
105 | prop: string;
|
106 | value: T;
|
107 | }
|
108 |
|
109 | type IdentityFunction<T> = (x: T) => T;
|
110 |
|
111 | interface Filter<T> {
|
112 | (list: T[]): T[];
|
113 | (obj: Dictionary<T>): Dictionary<T>;
|
114 | }
|
115 |
|
116 | type ArgumentTypes<T> = T extends (...args: infer U) => infer R ? U : never;
|
117 |
|
118 | type isfn<T> = (x: any, y: any) => T;
|
119 |
|
120 | interface Switchem<T> {
|
121 | is: isfn<Switchem<T>>;
|
122 | default: IdentityFunction<T>;
|
123 | }
|
124 |
|
125 | interface Reduced {
|
126 | [index: number]: any;
|
127 | [index: string]: any;
|
128 | }
|
129 |
|
130 | interface Schema {
|
131 | [key: string]: any;
|
132 | }
|
133 |
|
134 | interface SchemaAsync {
|
135 | [key: string]: Promise<boolean>;
|
136 | }
|
137 |
|
138 | interface IsValid {
|
139 | input: object;
|
140 | schema: Schema;
|
141 | }
|
142 |
|
143 | interface IsValidAsync {
|
144 | input: object;
|
145 | schema: Schema | SchemaAsync;
|
146 | }
|
147 |
|
148 | type ProduceRules<Output,K extends keyof Output, Input> = {
|
149 | [P in K]: (input: Input) => Output[P];
|
150 | }
|
151 | type ProduceAsyncRules<Output,K extends keyof Output, Input> = {
|
152 | [P in K]: (input: Input) => Promise<Output[P]>;
|
153 | }
|
154 | type ProduceAsyncRule<Input> = (input: Input) => Promise<any>
|
155 | type Async<T> = (x: any) => Promise<T>;
|
156 | type AsyncIterable<T, K> = (x: T) => Promise<K>;
|
157 | type AsyncIterableIndexed<T, K> = (x: T, i: number) => Promise<K>;
|
158 | type AsyncPredicate<T> = (x: T) => Promise<boolean>;
|
159 | type AsyncPredicateIndexed<T> = (x: T, i: number) => Promise<boolean>;
|
160 | type AsyncWithProp<T> = (x: any, prop?: string) => Promise<T>;
|
161 |
|
162 | type ApplyDiffUpdate = {op:'update', path: string, value: any}
|
163 | type ApplyDiffAdd = {op:'add', path: string, value: any}
|
164 | type ApplyDiffRemove = {op:'remove', path: string}
|
165 | type ApplyDiffRule = ApplyDiffUpdate | ApplyDiffAdd | ApplyDiffRemove
|
166 | export const DELAY: 'RAMBDAX_DELAY'
|
167 |
|
168 |
|
169 |
|
170 |
|
171 |
|
172 | export function add(a: number, b: number): number;
|
173 | export function add(a: number): (b: number) => number;
|
174 |
|
175 |
|
176 |
|
177 |
|
178 | export function adjust<T>(index: number, replaceFn: (x: T) => T, list: T[]): T[];
|
179 | export function adjust<T>(index: number, replaceFn: (x: T) => T): (list: T[]) => T[];
|
180 |
|
181 |
|
182 |
|
183 |
|
184 | export function all<T>(predicate: (x: T) => boolean, list: T[]): boolean;
|
185 | export function all<T>(predicate: (x: T) => boolean): (list: T[]) => boolean;
|
186 |
|
187 |
|
188 |
|
189 |
|
190 | export function allPass<T>(predicates: ((x: T) => boolean)[]): (input: T) => boolean;
|
191 |
|
192 |
|
193 |
|
194 |
|
195 | export function always<T>(x: T): () => T;
|
196 |
|
197 |
|
198 |
|
199 |
|
200 | export function and<T, U>(x: T, y: U): T | U;
|
201 | export function and<T>(x: T): <U>(y: U) => T | U;
|
202 |
|
203 |
|
204 |
|
205 |
|
206 | export function or<T, U>(a: T, b: U): T | U;
|
207 | export function or<T>(a: T): <U>(b: U) => T | U;
|
208 |
|
209 |
|
210 |
|
211 |
|
212 | export function any<T>(predicate: (x: T) => boolean, list: readonly T[]): boolean;
|
213 | export function any<T>(predicate: (x: T) => boolean): (list: readonly T[]) => boolean;
|
214 |
|
215 |
|
216 |
|
217 |
|
218 | export function anyPass<T>(predicates: SafePred<T>[]): SafePred<T>;
|
219 |
|
220 |
|
221 |
|
222 |
|
223 | export function append<T>(x: T, list: readonly T[]): T[];
|
224 | export function append<T>(x: T): <T>(list: readonly T[]) => T[];
|
225 |
|
226 | export function applySpec<Spec extends Record<string, (...args: readonly any[]) => any>>(
|
227 | spec: Spec
|
228 | ): (
|
229 | ...args: Parameters<ValueOfRecord<Spec>>
|
230 | ) => { [Key in keyof Spec]: ReturnType<Spec[Key]> };
|
231 | export function applySpec<T>(spec: any): (...args: readonly any[]) => T;
|
232 |
|
233 |
|
234 |
|
235 |
|
236 | export function assoc<T, U, K extends string>(prop: K, val: T, obj: U): Record<K, T> & U;
|
237 | export function assoc<T, K extends string>(prop: K, val: T): <U>(obj: U) => Record<K, T> & U;
|
238 | export function assoc<K extends string>(prop: K): AssocPartialOne<K>;
|
239 |
|
240 |
|
241 |
|
242 |
|
243 | export function assocPath<Output>(path: Path, newValue: any, obj: object): Output;
|
244 | export function assocPath<Output>(path: Path, newValue: any): (obj: object) => Output;
|
245 | export function assocPath<Output>(path: Path): FunctionToolbelt.Curry<(newValue: any, obj: object) => Output>;
|
246 |
|
247 |
|
248 |
|
249 |
|
250 |
|
251 |
|
252 | export function both(pred1: Pred, pred2: Pred): Pred;
|
253 | export function both<T>(pred1: Predicate<T>, pred2: Predicate<T>): Predicate<T>;
|
254 | export function both<T>(pred1: Predicate<T>): (pred2: Predicate<T>) => Predicate<T>;
|
255 | export function both(pred1: Pred): (pred2: Pred) => Pred;
|
256 |
|
257 |
|
258 |
|
259 |
|
260 | export function chain<T, U>(fn: (n: T) => U[], list: readonly T[]): U[];
|
261 | export function chain<T, U>(fn: (n: T) => U[]): (list: readonly T[]) => U[];
|
262 | export function chain<X0, X1, R>(fn: (x0: X0, x1: X1) => R, fn1: (x1: X1) => X0): (x1: X1) => R;
|
263 |
|
264 |
|
265 |
|
266 |
|
267 |
|
268 |
|
269 |
|
270 |
|
271 | export function clamp(min: number, max: number, input: number): number;
|
272 | export function clamp(min: number, max: number): (input: number) => number;
|
273 |
|
274 |
|
275 |
|
276 |
|
277 | export function clone<T>(input: T): T;
|
278 | export function clone<T>(input: readonly T[]): T[];
|
279 |
|
280 |
|
281 |
|
282 |
|
283 |
|
284 |
|
285 | export function complement(pred: (...args: readonly any[]) => boolean): (...args: readonly any[]) => boolean;
|
286 |
|
287 |
|
288 |
|
289 |
|
290 | export function compose<T1>(fn0: () => T1): () => T1;
|
291 | export function compose<V0, T1>(fn0: (x0: V0) => T1): (x0: V0) => T1;
|
292 | export function compose<V0, V1, T1>(fn0: (x0: V0, x1: V1) => T1): (x0: V0, x1: V1) => T1;
|
293 | export function compose<V0, V1, V2, T1>(fn0: (x0: V0, x1: V1, x2: V2) => T1): (x0: V0, x1: V1, x2: V2) => T1;
|
294 |
|
295 | export function compose<T1, T2>(fn1: (x: T1) => T2, fn0: () => T1): () => T2;
|
296 | export function compose<V0, T1, T2>(fn1: (x: T1) => T2, fn0: (x0: V0) => T1): (x0: V0) => T2;
|
297 | export function compose<V0, V1, T1, T2>(fn1: (x: T1) => T2, fn0: (x0: V0, x1: V1) => T1): (x0: V0, x1: V1) => T2;
|
298 | export function compose<V0, V1, V2, T1, T2>(fn1: (x: T1) => T2, fn0: (x0: V0, x1: V1, x2: V2) => T1): (x0: V0, x1: V1, x2: V2) => T2;
|
299 |
|
300 | export function compose<T1, T2, T3>(fn2: (x: T2) => T3, fn1: (x: T1) => T2, fn0: () => T1): () => T3;
|
301 | export function compose<V0, T1, T2, T3>(fn2: (x: T2) => T3, fn1: (x: T1) => T2, fn0: (x: V0) => T1): (x: V0) => T3;
|
302 | export function compose<V0, V1, T1, T2, T3>(fn2: (x: T2) => T3, fn1: (x: T1) => T2, fn0: (x0: V0, x1: V1) => T1): (x0: V0, x1: V1) => T3;
|
303 | export function compose<V0, V1, V2, T1, T2, T3>(fn2: (x: T2) => T3, fn1: (x: T1) => T2, fn0: (x0: V0, x1: V1, x2: V2) => T1): (x0: V0, x1: V1, x2: V2) => T3;
|
304 |
|
305 | export function compose<T1, T2, T3, T4>(fn3: (x: T3) => T4, fn2: (x: T2) => T3, fn1: (x: T1) => T2, fn0: () => T1): () => T4;
|
306 | export function compose<V0, T1, T2, T3, T4>(fn3: (x: T3) => T4, fn2: (x: T2) => T3, fn1: (x: T1) => T2, fn0: (x: V0) => T1): (x: V0) => T4;
|
307 | export function 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): (x0: V0, x1: V1) => T4;
|
308 | export function 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): (x0: V0, x1: V1, x2: V2) => T4;
|
309 |
|
310 | export function compose<T1, T2, T3, T4, T5>(fn4: (x: T4) => T5, fn3: (x: T3) => T4, fn2: (x: T2) => T3, fn1: (x: T1) => T2, fn0: () => T1): () => T5;
|
311 | export function compose<V0, T1, T2, T3, T4, T5>(fn4: (x: T4) => T5, fn3: (x: T3) => T4, fn2: (x: T2) => T3, fn1: (x: T1) => T2, fn0: (x: V0) => T1): (x: V0) => T5;
|
312 | export function 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): (x0: V0, x1: V1) => T5;
|
313 | export function 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): (x0: V0, x1: V1, x2: V2) => T5;
|
314 |
|
315 | export function compose<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: () => T1): () => T6;
|
316 | export function 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: (x: V0) => T1): (x: V0) => T6;
|
317 | export function compose<V0, V1, T1, T2, T3, T4, T5, T6>(
|
318 | fn5: (x: T5) => T6,
|
319 | fn4: (x: T4) => T5,
|
320 | fn3: (x: T3) => T4,
|
321 | fn2: (x: T2) => T3,
|
322 | fn1: (x: T1) => T2,
|
323 | fn0: (x0: V0, x1: V1) => T1): (x0: V0, x1: V1) => T6;
|
324 | export function compose<V0, V1, V2, T1, T2, T3, T4, T5, T6>(
|
325 | fn5: (x: T5) => T6,
|
326 | fn4: (x: T4) => T5,
|
327 | fn3: (x: T3) => T4,
|
328 | fn2: (x: T2) => T3,
|
329 | fn1: (x: T1) => T2,
|
330 | fn0: (x0: V0, x1: V1, x2: V2) => T1): (x0: V0, x1: V1, x2: V2) => T6;
|
331 |
|
332 |
|
333 |
|
334 |
|
335 | export function concat<T>(x: readonly T[], y: readonly T[]): T[];
|
336 | export function concat<T>(x: readonly T[]): (y: readonly T[]) => T[];
|
337 | export function concat(x: string, y: string): string;
|
338 | export function concat(x: string): (y: string) => string;
|
339 |
|
340 |
|
341 |
|
342 |
|
343 |
|
344 |
|
345 |
|
346 |
|
347 |
|
348 |
|
349 | export function cond(conditions: [Pred, (...a: readonly any[]) => any][]): (...x: readonly any[]) => any;
|
350 | export function cond<A, B>(conditions: [SafePred<A>, (...a: readonly A[]) => B][]): (...x: readonly A[]) => B;
|
351 |
|
352 |
|
353 |
|
354 |
|
355 | export function converge(after: ((...a: any[]) => any), fns: Array<((...x: any[]) => any)>): (...y: any[]) => any;
|
356 |
|
357 |
|
358 |
|
359 |
|
360 | export function curry(fn: (...args: any[]) => any): (...a: any[]) => any;
|
361 |
|
362 |
|
363 |
|
364 |
|
365 | export function curryN(length: number, fn: (...args: readonly any[]) => any): (...a: readonly any[]) => any;
|
366 |
|
367 |
|
368 |
|
369 |
|
370 | export function dec(x: number): number;
|
371 |
|
372 |
|
373 |
|
374 |
|
375 |
|
376 |
|
377 | export function defaultTo<T>(defaultValue: T): (...inputArguments: (T | null | undefined)[]) => T;
|
378 | export function defaultTo<T>(defaultValue: T, ...inputArguments: (T | null | undefined)[]): T;
|
379 | export function defaultTo<T, U>(defaultValue: T | U, ...inputArguments: (T | U | null | undefined)[]): T | U;
|
380 |
|
381 |
|
382 |
|
383 |
|
384 | export function difference<T>(a: readonly T[], b: readonly T[]): T[];
|
385 | export function difference<T>(a: readonly T[]): (b: readonly T[]) => T[];
|
386 |
|
387 |
|
388 |
|
389 |
|
390 | export function dissoc<T>(prop: string, obj: any): T;
|
391 | export function dissoc<T>(prop: string): (obj: any) => T;
|
392 |
|
393 | export function divide(x: number, y: number): number;
|
394 | export function divide(x: number): (y: number) => number;
|
395 |
|
396 |
|
397 |
|
398 |
|
399 | export function drop<T>(howMany: number, input: readonly T[]): T[];
|
400 | export function drop(howMany: number, input: string): string;
|
401 | export function drop<T>(howMany: number): {
|
402 | <T>(input: readonly T[]): T[];
|
403 | (input: string): string;
|
404 | };
|
405 |
|
406 |
|
407 |
|
408 |
|
409 | export function dropLast<T>(howMany: number, input: readonly T[]): T[];
|
410 | export function dropLast(howMany: number, input: string): string;
|
411 | export function dropLast<T>(howMany: number): {
|
412 | <T>(input: readonly T[]): T[];
|
413 | (input: string): string;
|
414 | };
|
415 |
|
416 |
|
417 |
|
418 |
|
419 |
|
420 |
|
421 | export function either(firstPredicate: Pred, secondPredicate: Pred): Pred;
|
422 | export function either<T>(firstPredicate: Predicate<T>, secondPredicate: Predicate<T>): Predicate<T>;
|
423 | export function either<T>(firstPredicate: Predicate<T>): (secondPredicate: Predicate<T>) => Predicate<T>;
|
424 | export function either(firstPredicate: Pred): (secondPredicate: Pred) => Pred;
|
425 |
|
426 |
|
427 |
|
428 |
|
429 | export function endsWith(target: string, str: string): boolean;
|
430 | export function endsWith(target: string): (str: string) => boolean;
|
431 |
|
432 |
|
433 |
|
434 |
|
435 | export function equals<T>(x: T, y: T): boolean;
|
436 | export function equals<T>(x: T): (y: T) => boolean;
|
437 |
|
438 | export function F(): boolean;
|
439 |
|
440 |
|
441 |
|
442 |
|
443 | export function filter<T>(predicate: FilterFunctionArray<T>): (input: readonly T[]) => T[];
|
444 | export function filter<T>(predicate: FilterFunctionArray<T>, input: readonly T[]): T[];
|
445 | export function filter<T, U>(predicate: FilterFunctionObject<T>): (x: Dictionary<T>) => Dictionary<T>;
|
446 | export function filter<T>(predicate: FilterFunctionObject<T>, x: Dictionary<T>): Dictionary<T>;
|
447 |
|
448 |
|
449 |
|
450 |
|
451 |
|
452 |
|
453 | export function find<T>(predicate: (x: T) => boolean, list: readonly T[]): T | undefined;
|
454 | export function find<T>(predicate: (x: T) => boolean): (list: readonly T[]) => T | undefined;
|
455 |
|
456 |
|
457 |
|
458 |
|
459 |
|
460 |
|
461 | export function findIndex<T>(predicate: (x: T) => boolean, list: readonly T[]): number;
|
462 | export function findIndex<T>(predicate: (x: T) => boolean): (list: readonly T[]) => number;
|
463 |
|
464 |
|
465 |
|
466 |
|
467 |
|
468 |
|
469 | export function findLast<T>(fn: (x: T) => boolean, list: readonly T[]): T | undefined;
|
470 | export function findLast<T>(fn: (x: T) => boolean): (list: readonly T[]) => T | undefined;
|
471 |
|
472 |
|
473 |
|
474 |
|
475 |
|
476 |
|
477 | export function findLastIndex<T>(predicate: (x: T) => boolean, list: readonly T[]): number;
|
478 | export function findLastIndex<T>(predicate: (x: T) => boolean): (list: readonly T[]) => number;
|
479 |
|
480 |
|
481 |
|
482 |
|
483 | export function flatten<T>(list: readonly any[]): T[];
|
484 |
|
485 |
|
486 |
|
487 |
|
488 | export function flip<T, U, TResult>(fn: (arg0: T, arg1: U) => TResult): (arg1: U, arg0?: T) => TResult;
|
489 | export function flip<F extends (...args: any) => any, P extends FunctionToolbelt.Parameters<F>>(fn: F): FunctionToolbelt.Curry<(...args: ListToolbelt.Merge<[P[1], P[0]], P>) => FunctionToolbelt.Return<F>>;
|
490 |
|
491 |
|
492 |
|
493 |
|
494 | export function forEach<T>(fn: MapFunctionArray<T, void>, list: readonly T[]): T[];
|
495 | export function forEach<T>(fn: MapFunctionArray<T, void>): (list: readonly T[]) => T[];
|
496 | export function forEach<T>(fn: MapFunctionObject<T, void>, list: Dictionary<T>): Dictionary<T>;
|
497 | export function forEach<T, U>(fn: MapFunctionObject<T, void>): (list: Dictionary<T>) => Dictionary<T>;
|
498 |
|
499 |
|
500 |
|
501 |
|
502 | export function fromPairs<V>(listOfPairs: KeyValuePair<string, V>[]): { [index: string]: V };
|
503 | export function fromPairs<V>(listOfPairs: KeyValuePair<number, V>[]): { [index: number]: V };
|
504 |
|
505 |
|
506 |
|
507 |
|
508 | export function groupBy<T>(groupFn: (x: T) => string, list: readonly T[]): { [index: string]: T[] };
|
509 | export function groupBy<T>(groupFn: (x: T) => string): (list: readonly T[]) => { [index: string]: T[] };
|
510 |
|
511 |
|
512 |
|
513 |
|
514 | export function groupWith<T>(compareFn: (x: T, y: T) => boolean): (input: readonly T[]) => T[][];
|
515 | export function groupWith<T>(compareFn: (x: T, y: T) => boolean, input: readonly T[]): T[][];
|
516 | export function groupWith<T>(compareFn: (x: T, y: T) => boolean, input: string): string[];
|
517 |
|
518 |
|
519 |
|
520 |
|
521 | export function has<T>(prop: string, obj: T): boolean;
|
522 | export function has(prop: string): <T>(obj: T) => boolean;
|
523 |
|
524 |
|
525 |
|
526 |
|
527 | export function hasPath<T>(
|
528 | path: string | readonly string[],
|
529 | input: object
|
530 | ): boolean;
|
531 | export function hasPath<T>(
|
532 | path: string | readonly string[]
|
533 | ): (input: object) => boolean;
|
534 |
|
535 |
|
536 |
|
537 |
|
538 | export function head<T>(input: readonly T[]): T | undefined;
|
539 | export function head(input: string): string;
|
540 |
|
541 |
|
542 |
|
543 |
|
544 |
|
545 |
|
546 | export function identical<T>(x: T, y: T): boolean;
|
547 | export function identical<T>(x: T): (y: T) => boolean;
|
548 |
|
549 |
|
550 |
|
551 |
|
552 | export function identity<T>(input: T): T;
|
553 |
|
554 |
|
555 |
|
556 |
|
557 |
|
558 |
|
559 | export function ifElse<T, U>(
|
560 | condition: (x: T) => boolean,
|
561 | onTrue: (x: T) => U,
|
562 | onFalse: (x: T) => U,
|
563 | ): (x: T) => U;
|
564 | export function ifElse<T, K, U>(
|
565 | condition: (x: T, y: K) => boolean,
|
566 | onTrue: (x: T, y: K) => U,
|
567 | onFalse: (x: T, y: K) => U,
|
568 | ): (x: T, y: K) => U;
|
569 |
|
570 |
|
571 |
|
572 |
|
573 | export function inc(x: number): number;
|
574 |
|
575 |
|
576 |
|
577 |
|
578 |
|
579 |
|
580 | export function includes(valueToFind: string, input: readonly string[] | string): boolean;
|
581 | export function includes(valueToFind: string): (input: readonly string[] | string) => boolean;
|
582 | export function includes<T>(valueToFind: T, input: readonly T[]): boolean;
|
583 | export function includes<T>(valueToFind: T): (input: readonly T[]) => boolean;
|
584 |
|
585 |
|
586 |
|
587 |
|
588 |
|
589 |
|
590 |
|
591 |
|
592 | export function indexBy<T>(condition: (x: T) => string, list: readonly T[]): { [key: string]: T };
|
593 | export function indexBy<T>(condition: string, list: readonly T[]): { [key: string]: T };
|
594 | export function indexBy<T>(condition: (x: T) => string): (list: readonly T[]) => { [key: string]: T };
|
595 | export function indexBy<T>(condition: string): (list: readonly T[]) => { [key: string]: T };
|
596 |
|
597 |
|
598 |
|
599 |
|
600 |
|
601 |
|
602 | export function indexOf<T>(valueToFind: T, list: readonly T[]): number;
|
603 | export function indexOf<T>(valueToFind: T): (list: readonly T[]) => number;
|
604 |
|
605 |
|
606 |
|
607 |
|
608 | export function init<T>(input: readonly T[]): T[];
|
609 | export function init(input: string): string;
|
610 |
|
611 |
|
612 |
|
613 |
|
614 | export function intersection<T>(listA: readonly T[], listB: readonly T[]): T[];
|
615 | export function intersection<T>(listA: readonly T[]): (listB: readonly T[]) => T[];
|
616 |
|
617 |
|
618 |
|
619 |
|
620 | export function intersperse<T>(separator: T, list: readonly T[]): T[];
|
621 | export function intersperse<T>(separator: T): (list: readonly T[]) => T[];
|
622 |
|
623 |
|
624 |
|
625 |
|
626 | export function is(targetPrototype: any, x: any): boolean;
|
627 | export function is(targetPrototype: any): (x: any) => boolean;
|
628 |
|
629 |
|
630 |
|
631 |
|
632 | export function isEmpty<T>(x: T): boolean;
|
633 |
|
634 |
|
635 |
|
636 |
|
637 | export function isNil(x: any): x is null | undefined;
|
638 |
|
639 |
|
640 |
|
641 |
|
642 | export function join<T>(glue: string, list: readonly T[]): string;
|
643 | export function join<T>(glue: string): (list: readonly T[]) => string;
|
644 |
|
645 |
|
646 |
|
647 |
|
648 | export function keys<T extends object>(x: T): (keyof T)[];
|
649 | export function keys<T>(x: T): string[];
|
650 |
|
651 |
|
652 |
|
653 |
|
654 | export function last(str: string): string;
|
655 | export function last(emptyList: []): undefined;
|
656 | export function last<T extends any>(list: readonly T[]): T | undefined;
|
657 |
|
658 |
|
659 |
|
660 |
|
661 |
|
662 |
|
663 |
|
664 |
|
665 | export function lastIndexOf<T>(target: T, list: readonly T[]): number;
|
666 | export function lastIndexOf<T>(target: T): (list: readonly T[]) => number;
|
667 |
|
668 |
|
669 |
|
670 |
|
671 | export function length<T>(input: readonly T[]): number;
|
672 |
|
673 |
|
674 |
|
675 |
|
676 |
|
677 |
|
678 |
|
679 |
|
680 | export function lens<T, U, V>(getter: (s: T) => U, setter: (a: U, s: T) => V): Lens;
|
681 |
|
682 |
|
683 |
|
684 |
|
685 | export function lensIndex(index: number): Lens;
|
686 |
|
687 |
|
688 |
|
689 |
|
690 | export function lensPath(path: RamdaPath): Lens;
|
691 | export function lensPath(path: string): Lens;
|
692 |
|
693 |
|
694 |
|
695 |
|
696 | export function lensProp(prop: string): {
|
697 | <T, U>(obj: T): U;
|
698 | set<T, U, V>(val: T, obj: U): V;
|
699 | };
|
700 |
|
701 |
|
702 |
|
703 |
|
704 | export function over<T>(lens: Lens, fn: Arity1Fn, value: T): T;
|
705 | export function over<T>(lens: Lens, fn: Arity1Fn, value: readonly T[]): T[];
|
706 | export function over(lens: Lens, fn: Arity1Fn): <T>(value: T) => T;
|
707 | export function over(lens: Lens, fn: Arity1Fn): <T>(value: readonly T[]) => T[];
|
708 | export function over(lens: Lens): <T>(fn: Arity1Fn, value: T) => T;
|
709 | export function over(lens: Lens): <T>(fn: Arity1Fn, value: readonly T[]) => T[];
|
710 |
|
711 |
|
712 |
|
713 |
|
714 | export function set<T, U>(lens: Lens, replacer: U, obj: T): T;
|
715 | export function set<U>(lens: Lens, replacer: U): <T>(obj: T) => T;
|
716 | export function set(lens: Lens): <T, U>(replacer: U, obj: T) => T;
|
717 |
|
718 |
|
719 |
|
720 |
|
721 | export function view<T, U>(lens: Lens): (target: T) => U;
|
722 | export function view<T, U>(lens: Lens, target: T): U;
|
723 |
|
724 |
|
725 |
|
726 |
|
727 |
|
728 |
|
729 | export function map<T, U>(fn: MapFunctionObject<T, U>, iterable: Dictionary<T>): Dictionary<U>;
|
730 | export function map<T, U>(fn: MapIterator<T, U>, iterable: readonly T[]): U[];
|
731 | export function map<T, U>(fn: MapIterator<T, U>): (iterable: readonly T[]) => U[];
|
732 | export function map<T, U, S>(fn: MapFunctionObject<T, U>): (iterable: Dictionary<T>) => Dictionary<U>;
|
733 | export function map<T>(fn: MapIterator<T, T>): (iterable: readonly T[]) => T[];
|
734 | export function map<T>(fn: MapIterator<T, T>, iterable: readonly T[]): T[];
|
735 |
|
736 |
|
737 |
|
738 |
|
739 | export function match(regExpression: RegExp, str: string): string[];
|
740 | export function match(regExpression: RegExp): (str: string) => string[];
|
741 |
|
742 |
|
743 |
|
744 |
|
745 | export function mathMod(x: number, y: number): number;
|
746 | export function mathMod(x: number): (y: number) => number;
|
747 |
|
748 |
|
749 |
|
750 |
|
751 | export function max<T extends Ord>(x: T, y: T): T;
|
752 | export function max<T extends Ord>(x: T): (y: T) => T;
|
753 |
|
754 |
|
755 |
|
756 |
|
757 | export function maxBy<T>(compareFn: (input: T) => Ord, x: T, y: T): T;
|
758 | export function maxBy<T>(compareFn: (input: T) => Ord, x: T): (y: T) => T;
|
759 | export function maxBy<T>(compareFn: (input: T) => Ord): FunctionToolbelt.Curry<(x: T, y: T) => T>;
|
760 |
|
761 |
|
762 |
|
763 |
|
764 | export function mean(list: readonly number[]): number;
|
765 |
|
766 |
|
767 |
|
768 |
|
769 | export function median(list: readonly number[]): number;
|
770 |
|
771 |
|
772 |
|
773 |
|
774 | export function merge<O1 extends object, O2 extends object>(target: O1, newProps: O2): Merge<O2, O1, 'flat'>;
|
775 | export function merge<O1 extends object>(target: O1): <O2 extends object>(newProps: O2) => Merge<O2, O1, 'flat'>;
|
776 |
|
777 |
|
778 |
|
779 |
|
780 | export function mergeAll<T>(list: object[]): T;
|
781 | export function mergeAll(list: object[]): object;
|
782 |
|
783 |
|
784 |
|
785 |
|
786 |
|
787 |
|
788 |
|
789 | export function mergeDeepRight<O1 extends object, O2 extends object>(x: O1, y: O2): Merge<O2, O1, 'deep'>;
|
790 | export function mergeDeepRight<O1 extends object>(x: O1): <O2 extends object>(y: O2) => Merge<O2, O1, 'deep'>;
|
791 |
|
792 |
|
793 |
|
794 |
|
795 | export function mergeLeft<O1 extends object, O2 extends object>(target: O1, newProps: O2): Merge<O2, O1, 'flat'>;
|
796 | export function mergeLeft<O1 extends object>(target: O1): <O2 extends object>(newProps: O2) => Merge<O2, O1, 'flat'>;
|
797 |
|
798 |
|
799 |
|
800 |
|
801 | export function min<T extends Ord>(x: T, y: T): T;
|
802 | export function min<T extends Ord>(x: T): (y: T) => T;
|
803 |
|
804 |
|
805 |
|
806 |
|
807 | export function minBy<T>(compareFn: (input: T) => Ord, x: T, y: T): T;
|
808 | export function minBy<T>(compareFn: (input: T) => Ord, x: T): (y: T) => T;
|
809 | export function minBy<T>(compareFn: (input: T) => Ord): FunctionToolbelt.Curry<(x: T, y: T) => T>;
|
810 |
|
811 |
|
812 |
|
813 |
|
814 | export function modulo(x: number, y: number): number;
|
815 | export function modulo(x: number): (y: number) => number;
|
816 |
|
817 |
|
818 |
|
819 |
|
820 | export function move<T>(fromIndex: number, toIndex: number, list: readonly T[]): T[];
|
821 | export function move(fromIndex: number, toIndex: number): <T>(list: readonly T[]) => T[];
|
822 | export function move(fromIndex: number): {
|
823 | <T>(toIndex: number, list: readonly T[]): T[];
|
824 | (toIndex: number): <T>(list: readonly T[]) => T[];
|
825 | };
|
826 |
|
827 |
|
828 |
|
829 |
|
830 | export function multiply(x: number, y: number): number;
|
831 | export function multiply(x: number): (y: number) => number;
|
832 |
|
833 | export function negate(x: number): number;
|
834 |
|
835 |
|
836 |
|
837 |
|
838 | export function none<T>(predicate: (x: T) => boolean, list: readonly T[]): boolean;
|
839 | export function none<T>(predicate: (x: T) => boolean): (list: readonly T[]) => boolean;
|
840 |
|
841 |
|
842 |
|
843 |
|
844 | export function not(input: any): boolean;
|
845 |
|
846 |
|
847 |
|
848 |
|
849 | export function nth<T>(index: number, list: readonly T[]): T | undefined;
|
850 | export function nth(index: number): <T>(list: readonly T[]) => T | undefined;
|
851 |
|
852 |
|
853 |
|
854 |
|
855 | export function once<T extends (...args: any[]) => any>(func: T): T;
|
856 |
|
857 |
|
858 |
|
859 |
|
860 | export function omit<T, K extends string>(propsToOmit: readonly K[], obj: T): Omit<T, K>;
|
861 | export function omit<K extends string>(propsToOmit: readonly K[]): <T>(obj: T) => Omit<T, K>;
|
862 | export function omit<T, U>(propsToOmit: string, obj: T): U;
|
863 | export function omit<T, U>(propsToOmit: string): (obj: T) => U;
|
864 | export function omit<T>(propsToOmit: string, obj: object): T;
|
865 | export function omit<T>(propsToOmit: string): (obj: object) => T;
|
866 |
|
867 | export function of<T>(x: T): T[];
|
868 |
|
869 |
|
870 |
|
871 |
|
872 |
|
873 |
|
874 |
|
875 | export function partial<V0, V1, T>(fn: (x0: V0, x1: V1) => T, args: [V0]): (x1: V1) => T;
|
876 | export function partial<V0, V1, V2, T>(fn: (x0: V0, x1: V1, x2: V2) => T, args: [V0, V1]): (x2: V2) => T;
|
877 | export function partial<V0, V1, V2, T>(fn: (x0: V0, x1: V1, x2: V2) => T, args: [V0]): (x1: V1, x2: V2) => T;
|
878 | export function partial<V0, V1, V2, V3, T>(fn: (x0: V0, x1: V1, x2: V2, x3: V3) => T, args: [V0, V1, V2]): (x2: V3) => T;
|
879 | export function partial<V0, V1, V2, V3, T>(fn: (x0: V0, x1: V1, x2: V2, x3: V3) => T, args: [V0, V1]): (x2: V2, x3: V3) => T;
|
880 | export function partial<V0, V1, V2, V3, T>(fn: (x0: V0, x1: V1, x2: V2, x3: V3) => T, args: [V0]): (x1: V1, x2: V2, x3: V3) => T;
|
881 | export function partial<T>(fn: (...a: any[]) => T, args: any[]): (...x: any[]) => T;
|
882 |
|
883 |
|
884 |
|
885 |
|
886 | export function partition<T>(
|
887 | predicate: Predicate<T>,
|
888 | input: readonly T[]
|
889 | ): [T[], T[]];
|
890 | export function partition<T>(
|
891 | predicate: Predicate<T>
|
892 | ): (input: readonly T[]) => [T[], T[]];
|
893 | export function partition<T>(
|
894 | predicate: (x: T, prop?: string) => boolean,
|
895 | input: { [key: string]: T}
|
896 | ): [{ [key: string]: T}, { [key: string]: T}];
|
897 | export function partition<T>(
|
898 | predicate: (x: T, prop?: string) => boolean
|
899 | ): (input: { [key: string]: T}) => [{ [key: string]: T}, { [key: string]: T}];
|
900 |
|
901 |
|
902 |
|
903 |
|
904 |
|
905 |
|
906 | export function path<Input, T>(pathToSearch: Path, obj: Input): T | undefined;
|
907 | export function path<T>(pathToSearch: Path, obj: any): T | undefined;
|
908 | export function path<T>(pathToSearch: Path): (obj: any) => T | undefined;
|
909 | export function path<Input, T>(pathToSearch: Path): (obj: Input) => T | undefined;
|
910 |
|
911 |
|
912 |
|
913 |
|
914 |
|
915 |
|
916 | export function pathEq(pathToSearch: Path, target: any, input: any): boolean;
|
917 | export function pathEq(pathToSearch: Path, target: any): (input: any) => boolean;
|
918 | export function pathEq(pathToSearch: Path): FunctionToolbelt.Curry<(a: any, b: any) => boolean>;
|
919 |
|
920 |
|
921 |
|
922 |
|
923 |
|
924 |
|
925 | export function paths<Input, T>(pathsToSearch: Path[], obj: Input): (T | undefined)[];
|
926 | export function paths<Input, T>(pathsToSearch: Path[]): (obj: Input) => (T | undefined)[];
|
927 | export function paths<T>(pathsToSearch: Path[], obj: any): (T | undefined)[];
|
928 | export function paths<T>(pathsToSearch: Path[]): (obj: any) => (T | undefined)[];
|
929 |
|
930 |
|
931 |
|
932 |
|
933 | export function pathOr<T>(defaultValue: T, pathToSearch: Path, obj: any): T;
|
934 | export function pathOr<T>(defaultValue: T, pathToSearch: Path): (obj: any) => T;
|
935 | export function pathOr<T>(defaultValue: T): FunctionToolbelt.Curry<(a: Path, b: any) => T>;
|
936 |
|
937 |
|
938 |
|
939 |
|
940 |
|
941 |
|
942 |
|
943 |
|
944 | export function pick<T, K extends string | number | symbol>(propsToPick: readonly K[], input: T): Pick<T, Exclude<keyof T, Exclude<keyof T, K>>>;
|
945 | export function pick<K extends string | number | symbol>(propsToPick: readonly K[]): <T>(input: T) => Pick<T, Exclude<keyof T, Exclude<keyof T, K>>>;
|
946 | export function pick<T, U>(propsToPick: string, input: T): U;
|
947 | export function pick<T, U>(propsToPick: string): (input: T) => U;
|
948 | export function pick<T>(propsToPick: string, input: object): T;
|
949 | export function pick<T>(propsToPick: string): (input: object) => T;
|
950 |
|
951 |
|
952 |
|
953 |
|
954 | export function pickAll<T, U>(propsToPick: readonly string[], input: T): U;
|
955 | export function pickAll<T, U>(propsToPick: readonly string[]): (input: T) => U;
|
956 | export function pickAll<T, U>(propsToPick: string, input: T): U;
|
957 | export function pickAll<T, U>(propsToPick: string): (input: T) => U;
|
958 |
|
959 |
|
960 |
|
961 |
|
962 | export function pipe<T1>(fn0: () => T1): () => T1;
|
963 | export function pipe<V0, T1>(fn0: (x0: V0) => T1): (x0: V0) => T1;
|
964 | export function pipe<V0, V1, T1>(fn0: (x0: V0, x1: V1) => T1): (x0: V0, x1: V1) => T1;
|
965 | export function pipe<V0, V1, V2, T1>(fn0: (x0: V0, x1: V1, x2: V2) => T1): (x0: V0, x1: V1, x2: V2) => T1;
|
966 |
|
967 | export function pipe<T1, T2>(fn0: () => T1, fn1: (x: T1) => T2): () => T2;
|
968 | export function pipe<V0, T1, T2>(fn0: (x0: V0) => T1, fn1: (x: T1) => T2): (x0: V0) => T2;
|
969 | export function pipe<V0, V1, T1, T2>(fn0: (x0: V0, x1: V1) => T1, fn1: (x: T1) => T2): (x0: V0, x1: V1) => T2;
|
970 | export function pipe<V0, V1, V2, T1, T2>(fn0: (x0: V0, x1: V1, x2: V2) => T1, fn1: (x: T1) => T2): (x0: V0, x1: V1, x2: V2) => T2;
|
971 |
|
972 | export function pipe<T1, T2, T3>(fn0: () => T1, fn1: (x: T1) => T2, fn2: (x: T2) => T3): () => T3;
|
973 | export function pipe<V0, T1, T2, T3>(fn0: (x: V0) => T1, fn1: (x: T1) => T2, fn2: (x: T2) => T3): (x: V0) => T3;
|
974 | export function pipe<V0, V1, T1, T2, T3>(fn0: (x0: V0, x1: V1) => T1, fn1: (x: T1) => T2, fn2: (x: T2) => T3): (x0: V0, x1: V1) => T3;
|
975 | export function pipe<V0, V1, V2, T1, T2, T3>(fn0: (x0: V0, x1: V1, x2: V2) => T1, fn1: (x: T1) => T2, fn2: (x: T2) => T3): (x0: V0, x1: V1, x2: V2) => T3;
|
976 |
|
977 | export function pipe<T1, T2, T3, T4>(fn0: () => T1, fn1: (x: T1) => T2, fn2: (x: T2) => T3, fn3: (x: T3) => T4): () => T4;
|
978 | export function pipe<V0, T1, T2, T3, T4>(fn0: (x: V0) => T1, fn1: (x: T1) => T2, fn2: (x: T2) => T3, fn3: (x: T3) => T4): (x: V0) => T4;
|
979 | export function pipe<V0, V1, T1, T2, T3, T4>(fn0: (x0: V0, x1: V1) => T1, fn1: (x: T1) => T2, fn2: (x: T2) => T3, fn3: (x: T3) => T4): (x0: V0, x1: V1) => T4;
|
980 | export function pipe<V0, V1, V2, T1, T2, T3, T4>(fn0: (x0: V0, x1: V1, x2: V2) => T1, fn1: (x: T1) => T2, fn2: (x: T2) => T3, fn3: (x: T3) => T4): (x0: V0, x1: V1, x2: V2) => T4;
|
981 |
|
982 | export function pipe<T1, T2, T3, T4, T5>(fn0: () => T1, fn1: (x: T1) => T2, fn2: (x: T2) => T3, fn3: (x: T3) => T4, fn4: (x: T4) => T5): () => T5;
|
983 | export function pipe<V0, T1, T2, T3, T4, T5>(fn0: (x: V0) => T1, fn1: (x: T1) => T2, fn2: (x: T2) => T3, fn3: (x: T3) => T4, fn4: (x: T4) => T5): (x: V0) => T5;
|
984 | export function pipe<V0, V1, T1, T2, T3, T4, T5>(fn0: (x0: V0, x1: V1) => T1, fn1: (x: T1) => T2, fn2: (x: T2) => T3, fn3: (x: T3) => T4, fn4: (x: T4) => T5): (x0: V0, x1: V1) => T5;
|
985 | export function pipe<V0, V1, V2, T1, T2, T3, T4, T5>(fn0: (x0: V0, x1: V1, x2: V2) => T1, fn1: (x: T1) => T2, fn2: (x: T2) => T3, fn3: (x: T3) => T4, fn4: (x: T4) => T5): (x0: V0, x1: V1, x2: V2) => T5;
|
986 |
|
987 | export function pipe<T1, T2, T3, T4, T5, T6>(fn0: () => T1, fn1: (x: T1) => T2, fn2: (x: T2) => T3, fn3: (x: T3) => T4, fn4: (x: T4) => T5, fn5: (x: T5) => T6): () => T6;
|
988 | export function pipe<V0, T1, T2, T3, T4, T5, T6>(fn0: (x: V0) => T1, fn1: (x: T1) => T2, fn2: (x: T2) => T3, fn3: (x: T3) => T4, fn4: (x: T4) => T5, fn5: (x: T5) => T6): (x: V0) => T6;
|
989 | export function pipe<V0, V1, T1, T2, T3, T4, T5, T6>(fn0: (x0: V0, x1: V1) => T1, fn1: (x: T1) => T2, fn2: (x: T2) => T3, fn3: (x: T3) => T4, fn4: (x: T4) => T5, fn5: (x: T5) => T6): (x0: V0, x1: V1) => T6;
|
990 | export function pipe<V0, V1, V2, T1, T2, T3, T4, T5, T6>(
|
991 | fn0: (x0: V0, x1: V1, x2: V2) => T1,
|
992 | fn1: (x: T1) => T2,
|
993 | fn2: (x: T2) => T3,
|
994 | fn3: (x: T3) => T4,
|
995 | fn4: (x: T4) => T5,
|
996 | fn5: (x: T5) => T6): (x0: V0, x1: V1, x2: V2) => T6;
|
997 |
|
998 | export function pipe<T1, T2, T3, T4, T5, T6, T7>(
|
999 | fn0: () => T1,
|
1000 | fn1: (x: T1) => T2,
|
1001 | fn2: (x: T2) => T3,
|
1002 | fn3: (x: T3) => T4,
|
1003 | fn4: (x: T4) => T5,
|
1004 | fn5: (x: T5) => T6,
|
1005 | fn: (x: T6) => T7): () => T7;
|
1006 | export function pipe<V0, T1, T2, T3, T4, T5, T6, T7>(
|
1007 | fn0: (x: V0) => T1,
|
1008 | fn1: (x: T1) => T2,
|
1009 | fn2: (x: T2) => T3,
|
1010 | fn3: (x: T3) => T4,
|
1011 | fn4: (x: T4) => T5,
|
1012 | fn5: (x: T5) => T6,
|
1013 | fn: (x: T6) => T7): (x: V0) => T7;
|
1014 | export function pipe<V0, V1, T1, T2, T3, T4, T5, T6, T7>(
|
1015 | fn0: (x0: V0, x1: V1) => T1,
|
1016 | fn1: (x: T1) => T2,
|
1017 | fn2: (x: T2) => T3,
|
1018 | fn3: (x: T3) => T4,
|
1019 | fn4: (x: T4) => T5,
|
1020 | fn5: (x: T5) => T6,
|
1021 | fn6: (x: T6) => T7): (x0: V0, x1: V1) => T7;
|
1022 | export function pipe<V0, V1, V2, T1, T2, T3, T4, T5, T6, T7>(
|
1023 | fn0: (x0: V0, x1: V1, x2: V2) => T1,
|
1024 | fn1: (x: T1) => T2,
|
1025 | fn2: (x: T2) => T3,
|
1026 | fn3: (x: T3) => T4,
|
1027 | fn4: (x: T4) => T5,
|
1028 | fn5: (x: T5) => T6,
|
1029 | fn6: (x: T6) => T7): (x0: V0, x1: V1, x2: V2) => T7;
|
1030 |
|
1031 | export function pipe<T1, T2, T3, T4, T5, T6, T7, T8>(
|
1032 | fn0: () => T1,
|
1033 | fn1: (x: T1) => T2,
|
1034 | fn2: (x: T2) => T3,
|
1035 | fn3: (x: T3) => T4,
|
1036 | fn4: (x: T4) => T5,
|
1037 | fn5: (x: T5) => T6,
|
1038 | fn6: (x: T6) => T7,
|
1039 | fn: (x: T7) => T8): () => T8;
|
1040 | export function pipe<V0, T1, T2, T3, T4, T5, T6, T7, T8>(
|
1041 | fn0: (x: V0) => T1,
|
1042 | fn1: (x: T1) => T2,
|
1043 | fn2: (x: T2) => T3,
|
1044 | fn3: (x: T3) => T4,
|
1045 | fn4: (x: T4) => T5,
|
1046 | fn5: (x: T5) => T6,
|
1047 | fn6: (x: T6) => T7,
|
1048 | fn: (x: T7) => T8): (x: V0) => T8;
|
1049 | export function pipe<V0, V1, T1, T2, T3, T4, T5, T6, T7, T8>(
|
1050 | fn0: (x0: V0, x1: V1) => T1,
|
1051 | fn1: (x: T1) => T2,
|
1052 | fn2: (x: T2) => T3,
|
1053 | fn3: (x: T3) => T4,
|
1054 | fn4: (x: T4) => T5,
|
1055 | fn5: (x: T5) => T6,
|
1056 | fn6: (x: T6) => T7,
|
1057 | fn7: (x: T7) => T8): (x0: V0, x1: V1) => T8;
|
1058 | export function pipe<V0, V1, V2, T1, T2, T3, T4, T5, T6, T7, T8>(
|
1059 | fn0: (x0: V0, x1: V1, x2: V2) => T1,
|
1060 | fn1: (x: T1) => T2,
|
1061 | fn2: (x: T2) => T3,
|
1062 | fn3: (x: T3) => T4,
|
1063 | fn4: (x: T4) => T5,
|
1064 | fn5: (x: T5) => T6,
|
1065 | fn6: (x: T6) => T7,
|
1066 | fn7: (x: T7) => T8): (x0: V0, x1: V1, x2: V2) => T8;
|
1067 |
|
1068 | export function pipe<T1, T2, T3, T4, T5, T6, T7, T8, T9>(
|
1069 | fn0: () => T1,
|
1070 | fn1: (x: T1) => T2,
|
1071 | fn2: (x: T2) => T3,
|
1072 | fn3: (x: T3) => T4,
|
1073 | fn4: (x: T4) => T5,
|
1074 | fn5: (x: T5) => T6,
|
1075 | fn6: (x: T6) => T7,
|
1076 | fn7: (x: T7) => T8,
|
1077 | fn8: (x: T8) => T9): () => T9;
|
1078 | export function pipe<V0, T1, T2, T3, T4, T5, T6, T7, T8, T9>(
|
1079 | fn0: (x0: V0) => T1,
|
1080 | fn1: (x: T1) => T2,
|
1081 | fn2: (x: T2) => T3,
|
1082 | fn3: (x: T3) => T4,
|
1083 | fn4: (x: T4) => T5,
|
1084 | fn5: (x: T5) => T6,
|
1085 | fn6: (x: T6) => T7,
|
1086 | fn7: (x: T7) => T8,
|
1087 | fn8: (x: T8) => T9): (x0: V0) => T9;
|
1088 | export function pipe<V0, V1, T1, T2, T3, T4, T5, T6, T7, T8, T9>(
|
1089 | fn0: (x0: V0, x1: V1) => T1,
|
1090 | fn1: (x: T1) => T2,
|
1091 | fn2: (x: T2) => T3,
|
1092 | fn3: (x: T3) => T4,
|
1093 | fn4: (x: T4) => T5,
|
1094 | fn5: (x: T5) => T6,
|
1095 | fn6: (x: T6) => T7,
|
1096 | fn7: (x: T7) => T8,
|
1097 | fn8: (x: T8) => T9): (x0: V0, x1: V1) => T9;
|
1098 | export function pipe<V0, V1, V2, T1, T2, T3, T4, T5, T6, T7, T8, T9>(
|
1099 | fn0: (x0: V0, x1: V1, x2: V2) => T1,
|
1100 | fn1: (x: T1) => T2,
|
1101 | fn2: (x: T2) => T3,
|
1102 | fn3: (x: T3) => T4,
|
1103 | fn4: (x: T4) => T5,
|
1104 | fn5: (x: T5) => T6,
|
1105 | fn6: (x: T6) => T7,
|
1106 | fn7: (x: T7) => T8,
|
1107 | fn8: (x: T8) => T9): (x0: V0, x1: V1, x2: V2) => T9;
|
1108 |
|
1109 | export function pipe<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(
|
1110 | fn0: () => T1,
|
1111 | fn1: (x: T1) => T2,
|
1112 | fn2: (x: T2) => T3,
|
1113 | fn3: (x: T3) => T4,
|
1114 | fn4: (x: T4) => T5,
|
1115 | fn5: (x: T5) => T6,
|
1116 | fn6: (x: T6) => T7,
|
1117 | fn7: (x: T7) => T8,
|
1118 | fn8: (x: T8) => T9,
|
1119 | fn9: (x: T9) => T10): () => T10;
|
1120 | export function pipe<V0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(
|
1121 | fn0: (x0: V0) => T1,
|
1122 | fn1: (x: T1) => T2,
|
1123 | fn2: (x: T2) => T3,
|
1124 | fn3: (x: T3) => T4,
|
1125 | fn4: (x: T4) => T5,
|
1126 | fn5: (x: T5) => T6,
|
1127 | fn6: (x: T6) => T7,
|
1128 | fn7: (x: T7) => T8,
|
1129 | fn8: (x: T8) => T9,
|
1130 | fn9: (x: T9) => T10): (x0: V0) => T10;
|
1131 | export function pipe<V0, V1, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(
|
1132 | fn0: (x0: V0, x1: V1) => T1,
|
1133 | fn1: (x: T1) => T2,
|
1134 | fn2: (x: T2) => T3,
|
1135 | fn3: (x: T3) => T4,
|
1136 | fn4: (x: T4) => T5,
|
1137 | fn5: (x: T5) => T6,
|
1138 | fn6: (x: T6) => T7,
|
1139 | fn7: (x: T7) => T8,
|
1140 | fn8: (x: T8) => T9,
|
1141 | fn9: (x: T9) => T10): (x0: V0, x1: V1) => T10;
|
1142 | export function pipe<V0, V1, V2, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(
|
1143 | fn0: (x0: V0, x1: V1, x2: V2) => T1,
|
1144 | fn1: (x: T1) => T2,
|
1145 | fn2: (x: T2) => T3,
|
1146 | fn3: (x: T3) => T4,
|
1147 | fn4: (x: T4) => T5,
|
1148 | fn5: (x: T5) => T6,
|
1149 | fn6: (x: T6) => T7,
|
1150 | fn7: (x: T7) => T8,
|
1151 | fn8: (x: T8) => T9,
|
1152 | fn9: (x: T9) => T10): (x0: V0, x1: V1, x2: V2) => T10;
|
1153 |
|
1154 |
|
1155 |
|
1156 |
|
1157 | export function pluck<K extends keyof T, T>(property: K, list: readonly T[]): Array<T[K]>;
|
1158 | export function pluck<T>(property: number, list: ReadonlyArray<{ [k: number]: T }>): T[];
|
1159 | export function pluck<P extends string>(property: P): <T>(list: ReadonlyArray<Record<P, T>>) => T[];
|
1160 | export function pluck(property: number): <T>(list: ReadonlyArray<{ [k: number]: T }>) => T[];
|
1161 |
|
1162 |
|
1163 |
|
1164 |
|
1165 | export function prepend<T>(x: T, input: T[]): T[];
|
1166 | export function prepend<T>(x: T): (input: T[]) => T[];
|
1167 |
|
1168 | export function product(list: readonly number[]): number;
|
1169 |
|
1170 |
|
1171 |
|
1172 |
|
1173 |
|
1174 |
|
1175 | export function prop<P extends keyof T, T>(propToFind: P, obj: T): T[P];
|
1176 | export function prop<P extends string>(p: P): <T>(propToFind: Record<P, T>) => T;
|
1177 | export function prop<P extends string, T>(p: P): (propToFind: Record<P, T>) => T;
|
1178 |
|
1179 |
|
1180 |
|
1181 |
|
1182 | export function propEq<T, K extends keyof T>(propToFind: K, valueToMatch: T[K], obj: T): boolean;
|
1183 | export function propEq<T, K extends keyof T>(propToFind: K, valueToMatch: T[K]): (obj: T) => boolean;
|
1184 | export function propEq<T, K extends keyof T>(propToFind: K): {
|
1185 | (valueToMatch: T[K], obj: T): boolean;
|
1186 | (valueToMatch: T[K]): (obj: T) => boolean;
|
1187 | };
|
1188 |
|
1189 |
|
1190 |
|
1191 |
|
1192 | export function propIs(type: any, name: string, obj: any): boolean;
|
1193 | export function propIs(type: any, name: string): (obj: any) => boolean;
|
1194 | export function propIs(type: any): {
|
1195 | (name: string, obj: any): boolean;
|
1196 | (name: string): (obj: any) => boolean;
|
1197 | };
|
1198 |
|
1199 |
|
1200 |
|
1201 |
|
1202 | export function propOr<T>(defaultValue: T, property: string, obj: { [key: string]: T}): T;
|
1203 | export function propOr<T>(defaultValue: T, property: string): (obj: { [key: string]: T}) => T;
|
1204 | export function propOr<T>(defaultValue: T): FunctionToolbelt.Curry<(property: string, obj: { [key: string]: T}) => T>;
|
1205 |
|
1206 |
|
1207 |
|
1208 |
|
1209 | export function range(startInclusive: number, endExclusive: number): number[];
|
1210 | export function range(startInclusive: number): (endExclusive: number) => number[];
|
1211 |
|
1212 | export function reduce<T, TResult>(reducer: (prev: TResult, current: T, i: number) => TResult, initialValue: TResult, list: readonly T[]): TResult;
|
1213 | export function reduce<T, TResult>(reducer: (prev: TResult, current: T) => TResult, initialValue: TResult, list: readonly T[]): TResult;
|
1214 | export function reduce<T, TResult>(reducer: (prev: TResult, current: T, i?: number) => TResult): (initialValue: TResult, list: readonly T[]) => TResult;
|
1215 | export function reduce<T, TResult>(reducer: (prev: TResult, current: T, i?: number) => TResult, initialValue: TResult): (list: readonly T[]) => TResult;
|
1216 |
|
1217 |
|
1218 |
|
1219 |
|
1220 | export function reject<T>(predicate: FilterFunctionArray<T>, list: readonly T[]): T[];
|
1221 | export function reject<T>(predicate: FilterFunctionArray<T>): (list: readonly T[]) => T[];
|
1222 | export function reject<T>(predicate: FilterFunctionArray<T>, obj: Dictionary<T>): Dictionary<T>;
|
1223 | export function reject<T, U>(predicate: FilterFunctionArray<T>): (obj: Dictionary<T>) => Dictionary<T>;
|
1224 |
|
1225 | export function repeat<T>(x: T): (timesToRepeat: number) => T[];
|
1226 | export function repeat<T>(x: T, timesToRepeat: number): T[];
|
1227 |
|
1228 |
|
1229 |
|
1230 |
|
1231 | export function replace(strOrRegex: RegExp | string, replacer: string, str: string): string;
|
1232 | export function replace(strOrRegex: RegExp | string, replacer: string): (str: string) => string;
|
1233 | export function replace(strOrRegex: RegExp | string): (replacer: string) => (str: string) => string;
|
1234 |
|
1235 |
|
1236 |
|
1237 |
|
1238 | export function reverse<T>(input: readonly T[]): T[];
|
1239 | export function reverse(input: string): string;
|
1240 |
|
1241 | export function slice(from: number, to: number, input: string): string;
|
1242 | export function slice<T>(from: number, to: number, input: readonly T[]): T[];
|
1243 | export function slice(from: number, to: number): {
|
1244 | (input: string): string;
|
1245 | <T>(input: readonly T[]): T[];
|
1246 | };
|
1247 | export function slice(from: number): {
|
1248 | (to: number, input: string): string;
|
1249 | <T>(to: number, input: readonly T[]): T[];
|
1250 | };
|
1251 |
|
1252 |
|
1253 |
|
1254 |
|
1255 | export function sort<T>(sortFn: (a: T, b: T) => number, list: readonly T[]): T[];
|
1256 | export function sort<T>(sortFn: (a: T, b: T) => number): (list: readonly T[]) => T[];
|
1257 |
|
1258 |
|
1259 |
|
1260 |
|
1261 | export function sortBy<T>(sortFn: (a: T) => Ord, list: readonly T[]): T[];
|
1262 | export function sortBy(sortFn: (a: any) => Ord): <T>(list: readonly T[]) => T[];
|
1263 |
|
1264 |
|
1265 |
|
1266 |
|
1267 | export function split(separator: string | RegExp): (str: string) => string[];
|
1268 | export function split(separator: string | RegExp, str: string): string[];
|
1269 |
|
1270 |
|
1271 |
|
1272 |
|
1273 | export function splitEvery<T>(sliceLength: number, input: readonly T[]): T[][];
|
1274 | export function splitEvery(sliceLength: number, input: string): string[];
|
1275 | export function splitEvery(sliceLength: number): {
|
1276 | (input: string): string[];
|
1277 | <T>(input: readonly T[]): T[][];
|
1278 | };
|
1279 |
|
1280 |
|
1281 |
|
1282 |
|
1283 | export function startsWith(target: string, str: string): boolean;
|
1284 | export function startsWith(target: string): (str: string) => boolean;
|
1285 |
|
1286 |
|
1287 |
|
1288 |
|
1289 | export function subtract(x: number, y: number): number;
|
1290 | export function subtract(x: number): (y: number) => number;
|
1291 |
|
1292 | export function sum(list: readonly number[]): number;
|
1293 |
|
1294 |
|
1295 |
|
1296 |
|
1297 | export function symmetricDifference<T>(x: readonly T[], y: readonly T[]): T[];
|
1298 | export function symmetricDifference<T>(x: readonly T[]): <T>(y: readonly T[]) => T[];
|
1299 |
|
1300 | export function T(): boolean;
|
1301 |
|
1302 |
|
1303 |
|
1304 |
|
1305 | export function tail<T>(input: readonly T[]): T[];
|
1306 | export function tail(input: string): string;
|
1307 |
|
1308 |
|
1309 |
|
1310 |
|
1311 | export function take<T>(howMany: number, input: readonly T[]): T[];
|
1312 | export function take(howMany: number, input: string): string;
|
1313 | export function take<T>(howMany: number): {
|
1314 | <T>(input: readonly T[]): T[];
|
1315 | (input: string): string;
|
1316 | };
|
1317 |
|
1318 |
|
1319 |
|
1320 |
|
1321 | export function takeLast<T>(howMany: number, input: readonly T[]): T[];
|
1322 | export function takeLast(howMany: number, input: string): string;
|
1323 | export function takeLast<T>(howMany: number): {
|
1324 | <T>(input: readonly T[]): T[];
|
1325 | (input: string): string;
|
1326 | };
|
1327 |
|
1328 |
|
1329 |
|
1330 |
|
1331 |
|
1332 |
|
1333 | export function tap<T>(fn: (x: T) => void, input: T): T;
|
1334 | export function tap<T>(fn: (x: T) => void): (input: T) => T;
|
1335 |
|
1336 |
|
1337 |
|
1338 |
|
1339 | export function test(regExpression: RegExp): (str: string) => boolean;
|
1340 | export function test(regExpression: RegExp, str: string): boolean;
|
1341 |
|
1342 |
|
1343 |
|
1344 |
|
1345 |
|
1346 |
|
1347 | export function times<T>(fn: (i: number) => T, howMany: number): T[];
|
1348 | export function times<T>(fn: (i: number) => T): (howMany: number) => T[];
|
1349 |
|
1350 | export function toLower(str: string): string;
|
1351 |
|
1352 | export function toUpper(str: string): string;
|
1353 |
|
1354 |
|
1355 |
|
1356 |
|
1357 | export function toPairs<S>(obj: { [k: string]: S } | { [k: number]: S }): [string, S][];
|
1358 |
|
1359 | export function toString<T>(x: T): string;
|
1360 |
|
1361 | export function transpose<T>(list: readonly T[][]): T[][];
|
1362 |
|
1363 | export function trim(str: string): string;
|
1364 |
|
1365 |
|
1366 |
|
1367 |
|
1368 | export function tryCatch<T, U>(
|
1369 | fn: (input: T) => U,
|
1370 | fallback: U
|
1371 | ): (input: T) => U;
|
1372 | export function tryCatch<T, U>(
|
1373 | fn: (input: T) => U,
|
1374 | fallback: (input: T) => U
|
1375 | ): (input: T) => U;
|
1376 | export function tryCatch<T>(
|
1377 | fn: (input: any) => Promise<any>,
|
1378 | fallback: T
|
1379 | ): (input: any) => Promise<T>;
|
1380 | export function tryCatch<T>(
|
1381 | fn: (input: any) => Promise<any>,
|
1382 | fallback: (input: any) => Promise<any>,
|
1383 | ): (input: any) => Promise<T>;
|
1384 |
|
1385 |
|
1386 |
|
1387 |
|
1388 | export function type(x: any): "Object" | "Number" | "Boolean" | "String" | "Null" | "Array" | "Function" | "Undefined" | "Async" | "Promise" | "RegExp" | "NaN";
|
1389 |
|
1390 |
|
1391 |
|
1392 |
|
1393 |
|
1394 |
|
1395 | export function union<T>(x: readonly T[], y: readonly T[]): T[];
|
1396 | export function union<T>(x: readonly T[]): (y: readonly T[]) => T[];
|
1397 |
|
1398 |
|
1399 |
|
1400 |
|
1401 | export function uniq<T>(list: readonly T[]): T[];
|
1402 |
|
1403 |
|
1404 |
|
1405 |
|
1406 | export function uniqWith<T, U>(uniqFn: (x: T, y: T) => boolean, list: readonly T[]): T[];
|
1407 | export function uniqWith<T, U>(uniqFn: (x: T, y: T) => boolean): (list: readonly T[]) => T[];
|
1408 |
|
1409 |
|
1410 |
|
1411 |
|
1412 |
|
1413 |
|
1414 |
|
1415 |
|
1416 | export function unless<T, U>(predicate: (x: T) => boolean, whenFalseFn: (x: T) => U, obj: T): U;
|
1417 | export function unless<T, U>(predicate: (x: T) => boolean, whenFalseFn: (x: T) => U): (obj: T) => U;
|
1418 |
|
1419 |
|
1420 |
|
1421 |
|
1422 | export function update<T>(index: number, newValue: T, list: readonly T[]): T[];
|
1423 | export function update<T>(index: number, newValue: T): (list: readonly T[]) => T[];
|
1424 |
|
1425 |
|
1426 |
|
1427 |
|
1428 | export function values<T extends object, K extends keyof T>(obj: T): T[K][];
|
1429 |
|
1430 | export function when<T, U>(predicate: (x: T) => boolean, whenTrueFn: (a: T) => U, input: T): U;
|
1431 | export function when<T, U>(predicate: (x: T) => boolean, whenTrueFn: (a: T) => U): (input: T) => U;
|
1432 | export function when<T, U>(predicate: (x: T) => boolean): FunctionToolbelt.Curry<(whenTrueFn: (a: T) => U, input: T) => U>;
|
1433 |
|
1434 |
|
1435 |
|
1436 |
|
1437 | export function where<T, U>(conditions: T, input: U): boolean;
|
1438 | export function where<T>(conditions: T): <U>(input: U) => boolean;
|
1439 | export function where<ObjFunc2, U>(conditions: ObjFunc2, input: U): boolean;
|
1440 | export function where<ObjFunc2>(conditions: ObjFunc2): <U>(input: U) => boolean;
|
1441 |
|
1442 |
|
1443 |
|
1444 |
|
1445 | export function whereEq<T, U>(condition: T, input: U): boolean;
|
1446 | export function whereEq<T>(condition: T): <U>(input: U) => boolean;
|
1447 |
|
1448 |
|
1449 |
|
1450 |
|
1451 | export function without<T>(matchAgainst: readonly T[], source: readonly T[]): T[];
|
1452 | export function without<T>(matchAgainst: readonly T[]): (source: readonly T[]) => T[];
|
1453 |
|
1454 | export function xor(x: boolean, y: boolean): boolean;
|
1455 | export function xor(y: boolean): (y: boolean) => boolean;
|
1456 |
|
1457 |
|
1458 |
|
1459 |
|
1460 |
|
1461 |
|
1462 | export function zip<K, V>(x: readonly K[], y: readonly V[]): KeyValuePair<K, V>[];
|
1463 | export function zip<K>(x: readonly K[]): <V>(y: readonly V[]) => KeyValuePair<K, V>[];
|
1464 |
|
1465 |
|
1466 |
|
1467 |
|
1468 | export function zipObj<T>(keys: string[], values: T[]): { [index: string]: T };
|
1469 | export function zipObj(keys: string[]): <T>(values: T[]) => { [index: string]: T };
|
1470 |
|
1471 |
|
1472 |
|
1473 |
|
1474 | export function props<P extends string, T>(propsToPick: P[], obj: Record<P, T>): T[];
|
1475 | export function props<P extends string>(propsToPick: P[]): <T>(obj: Record<P, T>) => T[];
|
1476 | export function props<P extends string, T>(propsToPick: P[]): (obj: Record<P, T>) => T[];
|
1477 |
|
1478 | export function zipWith<T, U, TResult>(fn: (x: T, y: U) => TResult, list1: readonly T[], list2: readonly U[]): TResult[];
|
1479 | export function zipWith<T, U, TResult>(fn: (x: T, y: U) => TResult, list1: readonly T[]): (list2: readonly U[]) => TResult[];
|
1480 | export function zipWith<T, U, TResult>(fn: (x: T, y: U) => TResult): (list1: readonly T[], list2: readonly U[]) => TResult[];
|
1481 |
|
1482 |
|
1483 |
|
1484 |
|
1485 | export function splitAt<T>(index: number, input: T[]): [T[], T[]];
|
1486 | export function splitAt(index: number, input: string): [string, string];
|
1487 | export function splitAt(index: number): {
|
1488 | <T>(input: T[]): [T[], T[]];
|
1489 | (input: string): [string, string];
|
1490 | };
|
1491 |
|
1492 |
|
1493 |
|
1494 |
|
1495 |
|
1496 |
|
1497 | export function splitWhen<T, U>(predicate: Predicate<T>, list: U[]): U[][];
|
1498 | export function splitWhen<T>(predicate: Predicate<T>): <U>(list: U[]) => U[][];
|
1499 |
|
1500 | export function takeLastWhile(predicate: (x: string) => boolean, input: string): string;
|
1501 | export function takeLastWhile(predicate: (x: string) => boolean): (input: string) => string;
|
1502 | export function takeLastWhile<T>(predicate: (x: T) => boolean, input: readonly T[]): T[];
|
1503 | export function takeLastWhile<T>(predicate: (x: T) => boolean): <T>(input: readonly T[]) => T[];
|
1504 |
|
1505 |
|
1506 |
|
1507 |
|
1508 | export function evolve<T, U>(rules: Array<(x: T) => U>, list: T[]): U[];
|
1509 | export function evolve<T, U>(rules: Array<(x: T) => U>) : (list: T[]) => U[];
|
1510 | export function evolve<E extends Evolver, V extends Evolvable<E>>(rules: E, obj: V): Evolve<V, E>;
|
1511 | export function evolve<E extends Evolver>(rules: E): <V extends Evolvable<E>>(obj: V) => Evolve<V, E>;
|
1512 |
|
1513 | export function dropLastWhile(predicate: (x: string) => boolean, iterable: string): string;
|
1514 | export function dropLastWhile(predicate: (x: string) => boolean): (iterable: string) => string;
|
1515 | export function dropLastWhile<T>(predicate: (x: T) => boolean, iterable: readonly T[]): T[];
|
1516 | export function dropLastWhile<T>(predicate: (x: T) => boolean): <T>(iterable: readonly T[]) => T[];
|
1517 |
|
1518 |
|
1519 |
|
1520 |
|
1521 | export function dropRepeats<T>(list: readonly T[]): T[];
|
1522 |
|
1523 | export function dropRepeatsWith<T>(predicate: (x: T, y: T) => boolean, list: readonly T[]): T[];
|
1524 | export function dropRepeatsWith<T>(predicate: (x: T, y: T) => boolean): (list: readonly T[]) => T[];
|
1525 |
|
1526 | export function dropWhile(fn: Predicate<string>, iterable: string): string;
|
1527 | export function dropWhile(fn: Predicate<string>): (iterable: string) => string;
|
1528 | export function dropWhile<T>(fn: Predicate<T>, iterable: readonly T[]): T[];
|
1529 | export function dropWhile<T>(fn: Predicate<T>): (iterable: readonly T[]) => T[];
|
1530 |
|
1531 | export function takeWhile(fn: Predicate<string>, iterable: string): string;
|
1532 | export function takeWhile(fn: Predicate<string>): (iterable: string) => string;
|
1533 | export function takeWhile<T>(fn: Predicate<T>, iterable: readonly T[]): T[];
|
1534 | export function takeWhile<T>(fn: Predicate<T>): (iterable: readonly T[]) => T[];
|
1535 |
|
1536 |
|
1537 |
|
1538 |
|
1539 | export function eqProps<T, U>(prop: string, obj1: T, obj2: U): boolean;
|
1540 | export function eqProps<P extends string>(prop: P): <T, U>(obj1: Record<P, T>, obj2: Record<P, U>) => boolean;
|
1541 | export function eqProps<T>(prop: string, obj1: T): <U>(obj2: U) => boolean;
|