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 | import * as _ from "ts-toolbelt";
|
38 | import {
|
39 | Arity0Fn,
|
40 | Arity1Fn,
|
41 | Arity2Fn,
|
42 | AssocPartialOne,
|
43 | ComposeWithFns,
|
44 | Dictionary,
|
45 | Evolvable,
|
46 | Evolve,
|
47 | Evolver,
|
48 | Filter,
|
49 | Functor,
|
50 | KeyValuePair,
|
51 | Lens,
|
52 | Merge,
|
53 | MergeAll,
|
54 | ObjectHavingSome,
|
55 | ObjPred,
|
56 | Ord,
|
57 | Path,
|
58 | Placeholder,
|
59 | Pred,
|
60 | PipeWithFns,
|
61 | Reduced,
|
62 | SafePred,
|
63 | ValueOfRecord,
|
64 | ValueOfUnion
|
65 | } from "./tools";
|
66 |
|
67 | export * from './tools';
|
68 |
|
69 |
|
70 |
|
71 |
|
72 |
|
73 | export const __: Placeholder;
|
74 |
|
75 |
|
76 |
|
77 |
|
78 | export function add(a: number, b: number): number;
|
79 | export function add(a: number): (b: number) => number;
|
80 |
|
81 |
|
82 |
|
83 |
|
84 |
|
85 | export function addIndex<T, U>(fn: (f: (item: T) => U, list: readonly T[]) => U[]): _.F.Curry<(a: (item: T, idx: number, list?: T[]) => U, b: readonly T[]) => U[]>;
|
86 |
|
87 | export function addIndex<T>(fn: (f: (item: T) => void, list: readonly T[]) => T[]): _.F.Curry<(a: (item: T, idx: number, list?: T[]) => void, b: readonly T[]) => T[]>;
|
88 |
|
89 | export function addIndex<T, U>(fn: (f: (acc: U, item: T) => U, aci: U, list: readonly T[]) => U): _.F.Curry<(a: (acc: U, item: T, idx: number, list?: T[]) => U, b: U, c: readonly T[]) => U>;
|
90 |
|
91 |
|
92 |
|
93 |
|
94 |
|
95 | export function adjust<T>(index: number, fn: (a: T) => T, list: readonly T[]): T[];
|
96 | export function adjust<T>(index: number, fn: (a: T) => T): (list: readonly T[]) => T[];
|
97 |
|
98 |
|
99 |
|
100 |
|
101 | export function all<T>(fn: (a: T) => boolean, list: readonly T[]): boolean;
|
102 | export function all<T>(fn: (a: T) => boolean): (list: readonly T[]) => boolean;
|
103 |
|
104 |
|
105 |
|
106 |
|
107 | export function allPass(preds: readonly Pred[]): Pred;
|
108 |
|
109 |
|
110 |
|
111 |
|
112 | export function always<T>(val: T): () => T;
|
113 |
|
114 |
|
115 |
|
116 |
|
117 |
|
118 | export function and<T extends { and?: ((...a: readonly any[]) => any); } | number | boolean | string | null>(fn1: T, val2: any): boolean;
|
119 | export function and<T extends { and?: ((...a: readonly any[]) => any); } | number | boolean | string | null>(fn1: T): (val2: any) => boolean;
|
120 |
|
121 |
|
122 |
|
123 |
|
124 | export function andThen<A, B>(onSuccess: (a: A) => B | Promise<B>, promise: Promise<A>): Promise<B>;
|
125 | export function andThen<A, B>(onSuccess: (a: A) => B | Promise<B>): (promise: Promise<A>) => Promise<B>;
|
126 |
|
127 |
|
128 |
|
129 |
|
130 | export function any<T>(fn: (a: T) => boolean, list: readonly T[]): boolean;
|
131 | export function any<T>(fn: (a: T) => boolean): (list: readonly T[]) => boolean;
|
132 |
|
133 |
|
134 |
|
135 |
|
136 | export function anyPass<T>(preds: Array<SafePred<T>>): SafePred<T>;
|
137 |
|
138 |
|
139 |
|
140 |
|
141 | export function ap<T, U>(fns: Array<((a: T) => U)>, vs: readonly T[]): U[];
|
142 | export function ap<T, U>(fns: Array<((a: T) => U)>): (vs: readonly T[]) => U[];
|
143 | export function ap<X0, X1, R>(
|
144 | fn: (x1: X1, x0: X0) => R,
|
145 | fn1: (x1: X1) => X0
|
146 | ): (x1: X1) => R;
|
147 |
|
148 |
|
149 |
|
150 |
|
151 |
|
152 | export function aperture<T>(n: 1, list: readonly T[]): Array<[T]>;
|
153 | export function aperture<T>(n: 2, list: readonly T[]): Array<[T, T]>;
|
154 | export function aperture<T>(n: 3, list: readonly T[]): Array<[T, T, T]>;
|
155 | export function aperture<T>(n: 4, list: readonly T[]): Array<[T, T, T, T]>;
|
156 | export function aperture<T>(n: 5, list: readonly T[]): Array<[T, T, T, T, T]>;
|
157 | export function aperture<T>(n: 6, list: readonly T[]): Array<[T, T, T, T, T, T]>;
|
158 | export function aperture<T>(n: 7, list: readonly T[]): Array<[T, T, T, T, T, T, T]>;
|
159 | export function aperture<T>(n: 8, list: readonly T[]): Array<[T, T, T, T, T, T, T, T]>;
|
160 | export function aperture<T>(n: 9, list: readonly T[]): Array<[T, T, T, T, T, T, T, T, T]>;
|
161 | export function aperture<T>(n: 10, list: readonly T[]): Array<[T, T, T, T, T, T, T, T, T, T]>;
|
162 | export function aperture<T>(n: number, list: readonly T[]): T[][];
|
163 | export function aperture(n: number): <T>(list: readonly T[]) => T[][];
|
164 |
|
165 |
|
166 |
|
167 |
|
168 | export function append<T>(el: T, list: readonly T[]): T[];
|
169 | export function append<T>(el: T): <T>(list: readonly T[]) => T[];
|
170 |
|
171 |
|
172 |
|
173 |
|
174 |
|
175 | export function apply<T, U, TResult>(fn: (arg0: T, ...args: readonly T[]) => TResult, args: readonly U[]): TResult;
|
176 | export function apply<T, TResult>(fn: (arg0: T, ...args: readonly T[]) => TResult): <U>(args: readonly U[]) => TResult;
|
177 |
|
178 |
|
179 |
|
180 |
|
181 |
|
182 |
|
183 | export function applySpec<Obj extends Record<string, (...args: readonly any[]) => any>>(
|
184 | obj: Obj
|
185 | ): (
|
186 | ...args: Parameters<ValueOfRecord<Obj>>
|
187 | ) => { [Key in keyof Obj]: ReturnType<Obj[Key]> };
|
188 | export function applySpec<T>(obj: any): (...args: readonly any[]) => T;
|
189 |
|
190 |
|
191 |
|
192 |
|
193 |
|
194 | export function applyTo<T, U>(el: T, fn: (t: T) => U): U;
|
195 | export function applyTo<T>(el: T): <U>(fn: (t: T) => U) => U;
|
196 |
|
197 |
|
198 |
|
199 |
|
200 | export function ascend<T>(fn: (obj: T) => any, a: T, b: T): number;
|
201 | export function ascend<T>(fn: (obj: T) => any): (a: T, b: T) => number;
|
202 |
|
203 |
|
204 |
|
205 |
|
206 | export function assoc<T, U>(__: Placeholder, val: T, obj: U): <K extends string>(prop: K) => Record<K, T> & U;
|
207 | export function assoc<U, K extends string>(prop: K, __: Placeholder, obj: U): <T>(val: T) => Record<K, T> & U;
|
208 | export function assoc<T, U, K extends string>(prop: K, val: T, obj: U): Record<K, T> & U;
|
209 | export function assoc<T, K extends string>(prop: K, val: T): <U>(obj: U) => Record<K, T> & U;
|
210 | export function assoc<K extends string>(prop: K): AssocPartialOne<K>;
|
211 |
|
212 |
|
213 |
|
214 |
|
215 |
|
216 | export function assocPath<T, U>(__: Placeholder, val: T, obj: U): (path: Path) => U;
|
217 | export function assocPath<T, U>(path: Path, __: Placeholder, obj: U): (val: T) => U;
|
218 | export function assocPath<T, U>(path: Path, val: T, obj: U): U;
|
219 | export function assocPath<T, U>(path: Path, val: T): (obj: U) => U;
|
220 | export function assocPath<T, U>(path: Path): _.F.Curry<(a: T, b: U) => U>;
|
221 |
|
222 |
|
223 |
|
224 |
|
225 |
|
226 | export function binary<T extends (...arg: any) => any>(fn: T): (...arg: _.T.Take<Parameters<T>, '2'>) => ReturnType<T>;
|
227 |
|
228 |
|
229 |
|
230 |
|
231 |
|
232 | export function bind<F extends (...args: readonly any[]) => any, T>(fn: F, thisObj: T): (...args: Parameters<F>) => ReturnType<F>;
|
233 | export function bind<F extends (...args: readonly any[]) => any, T>(fn: F): (thisObj: T) => (...args: Parameters<F>) => ReturnType<F>;
|
234 |
|
235 |
|
236 |
|
237 |
|
238 |
|
239 |
|
240 | export function both(pred1: Pred, pred2: Pred): Pred;
|
241 | export function both(pred1: Pred): (pred2: Pred) => Pred;
|
242 |
|
243 |
|
244 |
|
245 |
|
246 |
|
247 |
|
248 | export function call(fn: (...args: readonly any[]) => (...args: readonly any[]) => any, ...args: readonly any[]): any;
|
249 |
|
250 |
|
251 |
|
252 |
|
253 |
|
254 | export function chain<T, U>(fn: (n: T) => readonly U[], list: readonly T[]): U[];
|
255 | export function chain<T, U>(fn: (n: T) => readonly U[]): (list: readonly T[]) => U[];
|
256 | export function chain<X0, X1, R>(fn: (x0: X0) => (x1: X1) => R, fn1: (x1: X1) => X0): (x1: X1) => R;
|
257 |
|
258 |
|
259 |
|
260 |
|
261 |
|
262 | export function clamp<T>(min: T, max: T, value: T): T;
|
263 | export function clamp<T>(min: T, max: T): (value: T) => T;
|
264 | export function clamp<T>(min: T): (max: T, value: T) => T;
|
265 | export function clamp<T>(min: T): (max: T) => (value: T) => T;
|
266 |
|
267 |
|
268 |
|
269 |
|
270 | export function clone<T>(value: T): T;
|
271 | export function clone<T>(value: readonly T[]): T[];
|
272 |
|
273 |
|
274 |
|
275 |
|
276 |
|
277 | export function comparator<T>(pred: (a: T, b: T) => boolean): (x: T, y: T) => number;
|
278 |
|
279 |
|
280 |
|
281 |
|
282 |
|
283 |
|
284 |
|
285 |
|
286 | export function complement<As extends any[]>(pred: (...args: As) => boolean): (...args: As) => boolean;
|
287 |
|
288 |
|
289 |
|
290 |
|
291 |
|
292 |
|
293 |
|
294 |
|
295 |
|
296 |
|
297 | export function compose<T1>(fn0: () => T1): () => T1;
|
298 | export function compose<V0, T1>(fn0: (x0: V0) => T1): (x0: V0) => T1;
|
299 | export function compose<V0, V1, T1>(fn0: (x0: V0, x1: V1) => T1): (x0: V0, x1: V1) => T1;
|
300 | export function compose<V0, V1, V2, T1>(fn0: (x0: V0, x1: V1, x2: V2) => T1): (x0: V0, x1: V1, x2: V2) => T1;
|
301 |
|
302 | export function compose<T1, T2>(fn1: (x: T1) => T2, fn0: () => T1): () => T2;
|
303 | export function compose<V0, T1, T2>(fn1: (x: T1) => T2, fn0: (x0: V0) => T1): (x0: V0) => T2;
|
304 | export function compose<V0, V1, T1, T2>(fn1: (x: T1) => T2, fn0: (x0: V0, x1: V1) => T1): (x0: V0, x1: V1) => T2;
|
305 | 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;
|
306 |
|
307 | export function compose<T1, T2, T3>(fn2: (x: T2) => T3, fn1: (x: T1) => T2, fn0: () => T1): () => T3;
|
308 | export function compose<V0, T1, T2, T3>(fn2: (x: T2) => T3, fn1: (x: T1) => T2, fn0: (x: V0) => T1): (x: V0) => T3;
|
309 | 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;
|
310 | 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;
|
311 |
|
312 | export function compose<T1, T2, T3, T4>(fn3: (x: T3) => T4, fn2: (x: T2) => T3, fn1: (x: T1) => T2, fn0: () => T1): () => T4;
|
313 | 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;
|
314 | 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;
|
315 | 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;
|
316 |
|
317 | 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;
|
318 | 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;
|
319 | 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;
|
320 | 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;
|
321 |
|
322 | 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;
|
323 | 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;
|
324 | export function 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): (x0: V0, x1: V1) => T6;
|
325 | export function 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): (x0: V0, x1: V1, x2: V2) => T6;
|
326 |
|
327 |
|
328 |
|
329 |
|
330 |
|
331 |
|
332 |
|
333 |
|
334 |
|
335 |
|
336 |
|
337 | export function composeK<V0, T1>(fn0: (x0: V0) => T1[]): (x0: V0) => T1[];
|
338 | export function composeK<V0, T1, T2>(fn1: (x: T1) => T2[], fn0: (x0: V0) => T1[]): (x0: V0) => T2[];
|
339 | export function composeK<V0, T1, T2, T3>(fn2: (x: T2) => T3[], fn1: (x: T1) => T2[], fn0: (x: V0) => T1[]): (x: V0) => T3[];
|
340 | export function composeK<V0, T1, T2, T3, T4>(fn3: (x: T3) => T4[], fn2: (x: T2) => T3[], fn1: (x: T1) => T2[], fn0: (x: V0) => T1[]): (x: V0) => T4[];
|
341 | export function composeK<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[];
|
342 | export function composeK<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[];
|
343 |
|
344 |
|
345 |
|
346 |
|
347 |
|
348 |
|
349 |
|
350 |
|
351 |
|
352 | export function composeP<V0, T1>(fn0: (x0: V0) => Promise<T1>): (x0: V0) => Promise<T1>;
|
353 | export function composeP<V0, T1, T2>(fn1: (x: T1) => Promise<T2>, fn0: (x0: V0) => Promise<T1>): (x0: V0) => Promise<T2>;
|
354 | export function composeP<V0, T1, T2, T3>(fn2: (x: T2) => Promise<T3>, fn1: (x: T1) => Promise<T2>, fn0: (x: V0) => Promise<T1>): (x: V0) => Promise<T3>;
|
355 | export function composeP<V0, T1, T2, T3, T4>(fn3: (x: T3) => Promise<T4>, fn2: (x: T2) => Promise<T3>, fn1: (x: T1) => Promise<T2>, fn0: (x: V0) => Promise<T1>): (x: V0) => Promise<T4>;
|
356 | export function composeP<V0, T1, T2, T3, T4, T5>(fn4: (x: T4) => Promise<T5>, fn3: (x: T3) => Promise<T4>, fn2: (x: T2) => Promise<T3>, fn1: (x: T1) => Promise<T2>, fn0: (x: V0) => Promise<T1>): (x: V0) => Promise<T5>;
|
357 | export function composeP<V0, T1, T2, T3, T4, T5, T6>(fn5: (x: T5) => Promise<T6>, fn4: (x: T4) => Promise<T5>, fn3: (x: T3) => Promise<T4>, fn2: (x: T2) => Promise<T3>, fn1: (x: T1) => Promise<T2>, fn0: (x: V0) => Promise<T1>): (x: V0) => Promise<T6>;
|
358 |
|
359 |
|
360 |
|
361 |
|
362 |
|
363 |
|
364 | export function composeWith<V0, T>(composer: (...args: any[]) => any, fns: ComposeWithFns<V0, T>): (x0: V0) => T;
|
365 | export function composeWith(composer: (...args: any[]) => any): <V0, T>(fns: ComposeWithFns<V0, T>) => (x: V0) => T;
|
366 |
|
367 |
|
368 |
|
369 |
|
370 | export function concat(
|
371 | placeholder: Placeholder,
|
372 | ): (<L1 extends any[], L2 extends any[]>(list1: L1, list2: L2) => [...L1, ...L2]) &
|
373 | (<S1 extends string, S2 extends string>(s1: S1, s2: S2) => `${S1}${S2}`);
|
374 | export function concat<L2 extends any[]>(placeholder: Placeholder, list2: L2): <L1 extends any[]>(list1: L1) => [...L1, ...L2];
|
375 | export function concat<S2 extends string>(placeholder: Placeholder, s2: S2): <S1 extends string>(s1: S1) => `${S1}${S2}`;
|
376 | export function concat<L1 extends any[]>(list1: L1): <L2 extends any[]>(list2: L2) => [...L1, ...L2];
|
377 | export function concat<S1 extends string>(s1: S1): <S2 extends string>(s2: S2) => `${S1}${S2}`;
|
378 | export function concat<L1 extends any[], L2 extends any[]>(list1: L1, list2: L2): [...L1, ...L2];
|
379 | export function concat<S1 extends string, S2 extends string>(s1: S1, s2: S2): `${S1}${S2}`;
|
380 | export function concat(s1: string, s2: string): string;
|
381 | export function concat(s1: string): (s2: string) => string;
|
382 |
|
383 | /**
|
384 | * Returns a function, fn, which encapsulates if/else-if/else logic. R.cond takes a list of [predicate, transform] pairs.
|
385 | * All of the arguments to fn are applied to each of the predicates in turn until one returns a "truthy" value, at which
|
386 | * point fn returns the result of applying its arguments to the corresponding transformer. If none of the predicates
|
387 | * matches, fn returns undefined.
|
388 | */
|
389 | export function cond(fns: Array<[Pred, (...a: readonly any[]) => any]>): (...a: readonly any[]) => any;
|
390 | export function cond<A, B>(fns: Array<[SafePred<A>, (...a: readonly A[]) => B]>): (...a: readonly A[]) => B;
|
391 |
|
392 | /**
|
393 | * Wraps a constructor function inside a curried function that can be called with the same arguments and returns the same type.
|
394 | */
|
395 | export function construct<A extends any[], T>(constructor: { new(...a: A): T } | ((...a: A) => T)): (...a: A) => T;
|
396 |
|
397 | /**
|
398 | * Wraps a constructor function inside a curried function that can be called with the same arguments and returns the same type.
|
399 | * The arity of the function returned is specified to allow using variadic constructor functions.
|
400 | */
|
401 | export function constructN<A extends any[], T>(n: number, constructor: { new(...a: A): T } | ((...a: A) => T)): (...a: Partial<A>) => T;
|
402 |
|
403 | /**
|
404 | * Returns `true` if the specified item is somewhere in the list, `false` otherwise.
|
405 | * Equivalent to `indexOf(a)(list) > -1`. Uses strict (`===`) equality checking.
|
406 | *
|
407 | * @deprecated since 0.26 in favor of includes
|
408 | */
|
409 | export function contains(__: Placeholder, list: string): (a: string) => boolean;
|
410 | export function contains<T>(__: Placeholder, list: readonly T[]): (a: T) => boolean;
|
411 | export function contains(__: Placeholder): (list: string, a: string) => boolean;
|
412 | export function contains<T>(__: Placeholder): (list: readonly T[], a: T) => boolean;
|
413 | export function contains(a: string, list: string): boolean;
|
414 | export function contains<T>(a: T, list: readonly T[]): boolean;
|
415 | export function contains(a: string): (list: string) => boolean;
|
416 | export function contains<T>(a: T): (list: readonly T[]) => boolean;
|
417 |
|
418 | /**
|
419 | * Accepts a converging function and a list of branching functions and returns a new
|
420 | * function. When invoked, this new function is applied to some arguments, each branching
|
421 | * function is applied to those same arguments. The results of each branching function
|
422 | * are passed as arguments to the converging function to produce the return value.
|
423 | */
|
424 | export function converge(after: ((...a: readonly any[]) => any), fns: Array<((...a: readonly any[]) => any)>): (...a: readonly any[]) => any;
|
425 |
|
426 | /**
|
427 | * Counts the elements of a list according to how many match each value
|
428 | * of a key generated by the supplied function. Returns an object
|
429 | * mapping the keys produced by `fn` to the number of occurrences in
|
430 | * the list. Note that all keys are coerced to strings because of how
|
431 | * JavaScript objects work.
|
432 | */
|
433 | export function countBy<T>(fn: (a: T) => string | number, list: readonly T[]): { [index: string]: number };
|
434 | export function countBy<T>(fn: (a: T) => string | number): (list: readonly T[]) => { [index: string]: number };
|
435 |
|
436 | /**
|
437 | * Returns a curried equivalent of the provided function. The curried function has two unusual capabilities.
|
438 | * First, its arguments needn't be provided one at a time.
|
439 | */
|
440 | export function curry<F extends (...args: any) => any>(f: F): _.F.Curry<F>;
|
441 |
|
442 | /**
|
443 | * Returns a curried equivalent of the provided function, with the specified arity. The curried function has
|
444 | * two unusual capabilities. First, its arguments needn't be provided one at a time.
|
445 | */
|
446 | export function curryN<N extends number, F extends (...args: any) => any>(length: N, fn: F): _.F.Curry<(...a: _.T.Take<Parameters<F>, _.N.NumberOf<N>>) => ReturnType<F>>;
|
447 | export function curryN<N extends number>(length: N): <F extends (...args: any) => any>(fn: F) => _.F.Curry<(...a: _.T.Take<Parameters<F>, _.N.NumberOf<N>>) => ReturnType<F>>;
|
448 |
|
449 | /**
|
450 | * Decrements its argument.
|
451 | */
|
452 | export function dec(n: number): number;
|
453 |
|
454 | /**
|
455 | * Returns the second argument if it is not null or undefined. If it is null or undefined, the
|
456 | * first (default) argument is returned.
|
457 | */
|
458 | export function defaultTo<T, U>(a: T, b: U | null | undefined): T | U;
|
459 | export function defaultTo<T>(a: T): <U>(b: U | null | undefined) => T | U;
|
460 |
|
461 | /**
|
462 | * Makes a descending comparator function out of a function that returns a value that can be compared with < and >.
|
463 | */
|
464 | export function descend<T>(fn: (obj: T) => any, a: T, b: T): number;
|
465 | export function descend<T>(fn: (obj: T) => any): (a: T, b: T) => number;
|
466 |
|
467 | /**
|
468 | * Finds the set (i.e. no duplicates) of all elements in the first list not contained in the second list.
|
469 | */
|
470 | export function difference<T>(list1: readonly T[], list2: readonly T[]): T[];
|
471 | export function difference<T>(list1: readonly T[]): (list2: readonly T[]) => T[];
|
472 |
|
473 | /**
|
474 | * Finds the set (i.e. no duplicates) of all elements in the first list not contained in the second list.
|
475 | * Duplication is determined according to the value returned by applying the supplied predicate to two list
|
476 | * elements.
|
477 | */
|
478 | export function differenceWith<T1, T2>(pred: (a: T1, b: T2) => boolean, list1: readonly T1[], list2: readonly T2[]): T1[];
|
479 | export function differenceWith<T1, T2>(pred: (a: T1, b: T2) => boolean): (list1: readonly T1[], list2: readonly T2[]) => T1[];
|
480 | export function differenceWith<T1, T2>(pred: (a: T1, b: T2) => boolean, list1: readonly T1[]): (list2: readonly T2[]) => T1[];
|
481 |
|
482 | /*
|
483 | * Returns a new object that does not contain a prop property.
|
484 | */
|
485 | export function dissoc<T extends object, K extends keyof T>(prop: K, obj: T): Omit<T, K>;
|
486 | export function dissoc<K extends string | number>(prop: K): <T extends object>(obj: T) => Omit<T, K>;
|
487 |
|
488 | /**
|
489 | * Makes a shallow clone of an object, omitting the property at the given path.
|
490 | */
|
491 | export function dissocPath<T>(path: Path, obj: any): T;
|
492 | export function dissocPath<T>(path: Path): (obj: any) => T;
|
493 |
|
494 | /**
|
495 | * Divides two numbers. Equivalent to a / b.
|
496 | */
|
497 | export function divide(__: Placeholder, b: number): (a: number) => number;
|
498 | export function divide(__: Placeholder): (b: number, a: number) => number;
|
499 | export function divide(a: number, b: number): number;
|
500 | export function divide(a: number): (b: number) => number;
|
501 |
|
502 | /**
|
503 | * Returns a new list containing all but the first n elements of the given list.
|
504 | */
|
505 | export function drop<T>(n: number, xs: readonly T[]): T[];
|
506 | export function drop(n: number, xs: string): string;
|
507 | export function drop<T>(n: number): {
|
508 | (xs: string): string;
|
509 | (xs: readonly T[]): T[];
|
510 | };
|
511 |
|
512 | /**
|
513 | * Returns a list containing all but the last n elements of the given list.
|
514 | */
|
515 | export function dropLast<T>(n: number, xs: readonly T[]): T[];
|
516 | export function dropLast(n: number, xs: string): string;
|
517 | export function dropLast<T>(n: number): {
|
518 | (xs: readonly T[]): T[];
|
519 | (xs: string): string;
|
520 | };
|
521 |
|
522 | /**
|
523 | * Returns a new list containing all but last then elements of a given list, passing each value from the
|
524 | * right to the supplied predicate function, skipping elements while the predicate function returns true.
|
525 | */
|
526 | export function dropLastWhile<T>(fn: (a: T) => boolean, list: readonly T[]): T[];
|
527 | export function dropLastWhile<T>(fn: (a: T) => boolean): (list: readonly T[]) => T[];
|
528 |
|
529 | /**
|
530 | * Returns a new list without any consecutively repeating elements. R.equals is used to determine equality.
|
531 | */
|
532 | export function dropRepeats<T>(list: readonly T[]): T[];
|
533 |
|
534 | /**
|
535 | * Returns a new list without any consecutively repeating elements.
|
536 | * Equality is determined by applying the supplied predicate to each pair of consecutive elements.
|
537 | * The first element in a series of equal elements will be preserved.
|
538 | */
|
539 | export function dropRepeatsWith<T>(predicate: (left: T, right: T) => boolean, list: readonly T[]): T[];
|
540 | export function dropRepeatsWith<T>(predicate: (left: T, right: T) => boolean): (list: readonly T[]) => T[];
|
541 |
|
542 | /**
|
543 | * Returns a new list containing the last n elements of a given list, passing each value to the supplied
|
544 | * predicate function, skipping elements while the predicate function returns true.
|
545 | */
|
546 | export function dropWhile<T>(fn: (a: T) => boolean, list: readonly T[]): T[];
|
547 | export function dropWhile<T>(fn: (a: T) => boolean): (list: readonly T[]) => T[];
|
548 |
|
549 | /**
|
550 | * A function wrapping calls to the two functions in an || operation, returning the result of the first
|
551 | * function if it is truth-y and the result of the second function otherwise. Note that this is
|
552 | * short-circuited, meaning that the second function will not be invoked if the first returns a truth-y value.
|
553 | */
|
554 | export function either(pred1: Pred, pred2: Pred): Pred;
|
555 | export function either(pred1: Pred): (pred2: Pred) => Pred;
|
556 |
|
557 | /**
|
558 | * Returns the empty value of its argument's type. Ramda defines the empty value of Array ([]), Object ({}),
|
559 | * String (''), and Arguments. Other types are supported if they define <Type>.empty and/or <Type>.prototype.empty.
|
560 | * Dispatches to the empty method of the first argument, if present.
|
561 | */
|
562 | export function empty<T>(x: T): T;
|
563 |
|
564 | /**
|
565 | * Checks if a list ends with the provided values
|
566 | */
|
567 | export function endsWith(a: string, list: string): boolean;
|
568 | export function endsWith(a: string): (list: string) => boolean;
|
569 | export function endsWith<T>(a: T | readonly T[], list: readonly T[]): boolean;
|
570 | export function endsWith<T>(a: T | readonly T[]): (list: readonly T[]) => boolean;
|
571 |
|
572 | /**
|
573 | * Takes a function and two values in its domain and returns true if the values map to the same value in the
|
574 | * codomain; false otherwise.
|
575 | */
|
576 | export function eqBy<T, U = T>(fn: (a: T) => U, a: T, b: T): boolean;
|
577 | export function eqBy<T, U = T>(fn: (a: T) => U, a: T): (b: T) => boolean;
|
578 | export function eqBy<T, U = T>(fn: (a: T) => U): _.F.Curry<(a: T, b: T) => boolean>;
|
579 |
|
580 | /**
|
581 | * Reports whether two functions have the same value for the specified property.
|
582 | */
|
583 | export function eqProps<T, U>(prop: string, obj1: T, obj2: U): boolean;
|
584 | export function eqProps<P extends string>(prop: P): <T, U>(obj1: Record<P, T>, obj2: Record<P, U>) => boolean;
|
585 | export function eqProps<T>(prop: string, obj1: T): <U>(obj2: U) => boolean;
|
586 |
|
587 | /**
|
588 | * Returns true if its arguments are equivalent, false otherwise. Dispatches to an equals method if present.
|
589 | * Handles cyclical data structures.
|
590 | */
|
591 | export function equals<T>(__: Placeholder, b: T): (a: T) => boolean;
|
592 | export function equals<T>(a: T, b: T): boolean;
|
593 | export function equals<T>(a: T): (b: T) => boolean;
|
594 |
|
595 | /**
|
596 | * Creates a new object by evolving a shallow copy of object, according to the transformation functions.
|
597 | */
|
598 | export function evolve<E extends Evolver, V extends Evolvable<E>>(transformations: E, obj: V): Evolve<V, E>;
|
599 | export function evolve<E extends Evolver>(transformations: E): <V extends Evolvable<E>>(obj: V) => Evolve<V, E>;
|
600 |
|
601 | /*
|
602 | * A function that always returns false. Any passed in parameters are ignored.
|
603 | */
|
604 | export function F(): boolean;
|
605 |
|
606 | /**
|
607 | * Returns a new list containing only those items that match a given predicate function. The predicate function is passed one argument: (value).
|
608 | */
|
609 | export const filter: Filter;
|
610 |
|
611 | /**
|
612 | * Returns the first element of the list which matches the predicate, or `undefined` if no
|
613 | * element matches.
|
614 | */
|
615 | export function find<T>(fn: (a: T) => boolean, list: readonly T[]): T | undefined;
|
616 | export function find<T>(fn: (a: T) => boolean): (list: readonly T[]) => T | undefined;
|
617 |
|
618 | /**
|
619 | * Returns the index of the first element of the list which matches the predicate, or `-1`
|
620 | * if no element matches.
|
621 | */
|
622 | export function findIndex<T>(fn: (a: T) => boolean, list: readonly T[]): number;
|
623 | export function findIndex<T>(fn: (a: T) => boolean): (list: readonly T[]) => number;
|
624 |
|
625 | /**
|
626 | * Returns the last element of the list which matches the predicate, or `undefined` if no
|
627 | * element matches.
|
628 | */
|
629 | export function findLast<T>(fn: (a: T) => boolean, list: readonly T[]): T | undefined;
|
630 | export function findLast<T>(fn: (a: T) => boolean): (list: readonly T[]) => T | undefined;
|
631 |
|
632 | /**
|
633 | * Returns the index of the last element of the list which matches the predicate, or
|
634 | * `-1` if no element matches.
|
635 | */
|
636 | export function findLastIndex<T>(fn: (a: T) => boolean, list: readonly T[]): number;
|
637 | export function findLastIndex<T>(fn: (a: T) => boolean): (list: readonly T[]) => number;
|
638 |
|
639 | /**
|
640 | * Returns a new list by pulling every item out of it (and all its sub-arrays) and putting
|
641 | * them in a new array, depth-first.
|
642 | */
|
643 | export function flatten<T extends readonly any[]>(list: T): _.T.Flatten<T>;
|
644 |
|
645 | /**
|
646 | * Returns a new function much like the supplied one, except that the first two arguments'
|
647 | * order is reversed.
|
648 | */
|
649 | export function flip<T, U, TResult>(fn: (arg0: T, arg1: U) => TResult): (arg1: U, arg0?: T) => TResult;
|
650 | export function flip<F extends (...args: any) => any, P extends _.F.Parameters<F>>(fn: F): _.F.Curry<(...args: _.T.Merge<[P[1], P[0]], P>) => _.F.Return<F>>;
|
651 |
|
652 | /**
|
653 | * Iterate over an input list, calling a provided function fn for each element in the list.
|
654 | */
|
655 | export function forEach<T>(fn: (x: T) => void, list: readonly T[]): T[];
|
656 | export function forEach<T>(fn: (x: T) => void): (list: readonly T[]) => T[];
|
657 | export function forEach<T>(fn: (x: T) => void, list: readonly T[]): T[];
|
658 | export function forEach<T>(fn: (x: T) => void): (list: readonly T[]) => T[];
|
659 |
|
660 | /**
|
661 | * Iterate over an input object, calling a provided function fn for each key and value in the object.
|
662 | */
|
663 | export function forEachObjIndexed<T>(fn: (value: T[keyof T], key: keyof T, obj: T) => void, obj: T): T;
|
664 | export function forEachObjIndexed<T>(fn: (value: T[keyof T], key: keyof T, obj: T) => void): (obj: T) => T;
|
665 |
|
666 | /**
|
667 | * Creates a new object out of a list key-value pairs.
|
668 | */
|
669 | export function fromPairs<V>(pairs: Array<KeyValuePair<string, V>>): { [index: string]: V };
|
670 | export function fromPairs<V>(pairs: Array<KeyValuePair<number, V>>): { [index: number]: V };
|
671 |
|
672 | /**
|
673 | * Splits a list into sublists stored in an object, based on the result of
|
674 | * calling a String-returning function
|
675 | * on each element, and grouping the results according to values returned.
|
676 | */
|
677 | export function groupBy<T, K extends string = string>(fn: (a: T) => K, list: readonly T[]): Record<K, T[]>;
|
678 | export function groupBy<T, K extends string = string>(fn: (a: T) => K): (list: readonly T[]) => Record<K, T[]>;
|
679 |
|
680 | /**
|
681 | * Takes a list and returns a list of lists where each sublist's elements are all "equal" according to the provided equality function
|
682 | */
|
683 | export function groupWith<T>(fn: (x: T, y: T) => boolean): (list: readonly T[]) => T[][];
|
684 | export function groupWith<T>(fn: (x: T, y: T) => boolean, list: readonly T[]): T[][];
|
685 | export function groupWith<T>(fn: (x: T, y: T) => boolean, list: string): string[];
|
686 |
|
687 | /**
|
688 | * Returns true if the first parameter is greater than the second.
|
689 | */
|
690 | export function gt(__: Placeholder, b: number): (a: number) => boolean;
|
691 | export function gt(__: Placeholder): (b: number, a: number) => boolean;
|
692 | export function gt(a: number, b: number): boolean;
|
693 | export function gt(a: string, b: string): boolean;
|
694 | export function gt(a: number): (b: number) => boolean;
|
695 |
|
696 | /**
|
697 | * Returns true if the first parameter is greater than or equal to the second.
|
698 | */
|
699 | export function gte(__: Placeholder, b: number): (a: number) => boolean;
|
700 | export function gte(__: Placeholder): (b: number, a: number) => boolean;
|
701 | export function gte(a: number, b: number): boolean;
|
702 | export function gte(a: string, b: string): boolean;
|
703 | export function gte(a: number): (b: number) => boolean;
|
704 |
|
705 | /**
|
706 | * Returns whether or not an object has an own property with the specified name.
|
707 | */
|
708 | export function has(__: Placeholder, obj: unknown): (s: string) => boolean;
|
709 | export function has(__: Placeholder): <P extends string>(obj: unknown, s: P) => obj is ObjectHavingSome<P>;
|
710 | export function has<P extends string>(s: P, obj: unknown): obj is ObjectHavingSome<P>;
|
711 | export function has<P extends string>(s: P): (obj: unknown) => obj is ObjectHavingSome<P>;
|
712 |
|
713 | /**
|
714 | * Returns whether or not an object or its prototype chain has a property with the specified name
|
715 | */
|
716 | export function hasIn<T>(s: string, obj: T): boolean;
|
717 | export function hasIn(s: string): <T>(obj: T) => boolean;
|
718 |
|
719 | /**
|
720 | * Returns whether or not a path exists in an object. Only the object's own properties are checked.
|
721 | */
|
722 | export function hasPath<T>(list: readonly string[], obj: T): boolean;
|
723 | export function hasPath(list: readonly string[]): <T>(obj: T) => boolean;
|
724 |
|
725 | /**
|
726 | * Returns the first element in a list.
|
727 | * In some libraries this function is named `first`.
|
728 | */
|
729 | export function head(str: string): string;
|
730 | export function head(list: readonly []): undefined;
|
731 | export function head<T extends any>(list: readonly T[]): T | undefined;
|
732 |
|
733 | /**
|
734 | * Returns true if its arguments are identical, false otherwise. Values are identical if they reference the
|
735 | * same memory. NaN is identical to NaN; 0 and -0 are not identical.
|
736 | */
|
737 | export function identical<T>(a: T, b: T): boolean;
|
738 | export function identical<T>(a: T): (b: T) => boolean;
|
739 |
|
740 | /**
|
741 | * A function that does nothing but return the parameter supplied to it. Good as a default
|
742 | * or placeholder function.
|
743 | */
|
744 | export function identity<T>(a: T): T;
|
745 |
|
746 | /**
|
747 | * Creates a function that will process either the onTrue or the onFalse function depending upon the result
|
748 | * of the condition predicate.
|
749 | */
|
750 | export function ifElse(fn: Pred, onTrue: Arity1Fn, onFalse: Arity1Fn): Arity1Fn;
|
751 | export function ifElse(fn: Pred, onTrue: Arity2Fn, onFalse: Arity2Fn): Arity2Fn;
|
752 |
|
753 | /**
|
754 | * Increments its argument.
|
755 | */
|
756 | export function inc(n: number): number;
|
757 |
|
758 | /**
|
759 | * Given a target, this function checks a list for the target and returns a boolean.
|
760 | * Given a string, this function checks for the string in another string or list and returns
|
761 | * a boolean.
|
762 | */
|
763 | export function includes(__: Placeholder, list: readonly string[] | string): (s: string) => boolean;
|
764 | export function includes<T>(__: Placeholder, list: readonly T[]): (target: T) => boolean;
|
765 | export function includes(__: Placeholder): (list: readonly string[] | string, s: string) => boolean;
|
766 | export function includes<T>(__: Placeholder): (list: readonly T[], target: T) => boolean;
|
767 | export function includes(s: string, list: readonly string[] | string): boolean;
|
768 | export function includes(s: string): (list: readonly string[] | string) => boolean;
|
769 | export function includes<T>(target: T, list: readonly T[]): boolean;
|
770 | export function includes<T>(target: T): (list: readonly T[]) => boolean;
|
771 |
|
772 | /**
|
773 | * Given a function that generates a key, turns a list of objects into an object indexing the objects
|
774 | * by the given key.
|
775 | */
|
776 | export function indexBy<T, K extends string | number = string>(fn: (a: T) => K, list: readonly T[]): { [key in K]: T };
|
777 | export function indexBy<T, K extends string | number | undefined = string>(fn: (a: T) => K, list: readonly T[]): { [key in NonNullable<K>]?: T };
|
778 | export function indexBy<T, K extends string | number = string>(fn: (a: T) => K): (list: readonly T[]) => { [key in K]: T };
|
779 | export function indexBy<T, K extends string | number | undefined = string>(fn: (a: T) => K | undefined): (list: readonly T[]) => { [key in NonNullable<K>]?: T };
|
780 |
|
781 | /**
|
782 | * Returns the position of the first occurrence of an item in an array
|
783 | * (by strict equality),
|
784 | * or -1 if the item is not included in the array.
|
785 | */
|
786 | export function indexOf<T>(target: T, list: readonly T[]): number;
|
787 | export function indexOf<T>(target: T): (list: readonly T[]) => number;
|
788 |
|
789 | /**
|
790 | * Returns all but the last element of a list or string.
|
791 | */
|
792 | export function init<T>(list: readonly T[]): T[];
|
793 | export function init(list: string): string;
|
794 |
|
795 | /**
|
796 | * Takes a predicate `pred`, a list `xs`, and a list `ys`, and returns a list
|
797 | * `xs'` comprising each of the elements of `xs` which is equal to one or more
|
798 | * elements of `ys` according to `pred`.
|
799 | *
|
800 | * `pred` must be a binary function expecting an element from each list.
|
801 | *
|
802 | * `xs`, `ys`, and `xs'` are treated as sets, semantically, so ordering should
|
803 | * not be significant, but since `xs'` is ordered the implementation guarantees
|
804 | * that its values are in the same order as they appear in `xs`. Duplicates are
|
805 | * not removed, so `xs'` may contain duplicates if `xs` contains duplicates.
|
806 | */
|
807 |
|
808 | export function innerJoin<T1, T2>(pred: (a: T1, b: T2) => boolean, list1: readonly T1[], list2: readonly T2[]): T1[];
|
809 | export function innerJoin<T1, T2>(pred: (a: T1, b: T2) => boolean): (list1: readonly T1[], list2: readonly T2[]) => T1[];
|
810 | export function innerJoin<T1, T2>(pred: (a: T1, b: T2) => boolean, list1: readonly T1[]): (list2: readonly T2[]) => T1[];
|
811 |
|
812 | /**
|
813 | * Inserts the supplied element into the list, at index index. Note that
|
814 | * this is not destructive: it returns a copy of the list with the changes.
|
815 | */
|
816 | export function insert<T>(index: number, elt: T, list: readonly T[]): T[];
|
817 | export function insert<T>(index: number, elt: T): (list: readonly T[]) => T[];
|
818 | export function insert(index: number): <T>(elt: T, list: readonly T[]) => T[];
|
819 |
|
820 | /**
|
821 | * Inserts the sub-list into the list, at index `index`. _Note that this
|
822 | * is not destructive_: it returns a copy of the list with the changes.
|
823 | */
|
824 | export function insertAll<T>(index: number, elts: readonly T[], list: readonly T[]): T[];
|
825 | export function insertAll<T>(index: number, elts: readonly T[]): (list: readonly T[]) => T[];
|
826 | export function insertAll(index: number): <T>(elts: readonly T[], list: readonly T[]) => T[];
|
827 |
|
828 | /**
|
829 | * Combines two lists into a set (i.e. no duplicates) composed of those elements common to both lists.
|
830 | */
|
831 | export function intersection<T>(list1: readonly T[], list2: readonly T[]): T[];
|
832 | export function intersection<T>(list1: readonly T[]): (list2: readonly T[]) => T[];
|
833 |
|
834 | /**
|
835 | * Creates a new list with the separator interposed between elements.
|
836 | */
|
837 | export function intersperse<T>(separator: T, list: readonly T[]): T[];
|
838 | export function intersperse<T>(separator: T): (list: readonly T[]) => T[];
|
839 |
|
840 | /**
|
841 | * Transforms the items of the list with the transducer and appends the transformed items to the accumulator
|
842 | * using an appropriate iterator function based on the accumulator type.
|
843 | */
|
844 | export function into<T>(acc: any, xf: (...a: readonly any[]) => any, list: readonly T[]): T[];
|
845 | export function into<T, R>(acc: any, xf: (...a: readonly any[]) => R[], list: readonly T[]): R[];
|
846 | export function into(acc: any, xf: (...a: readonly any[]) => any): <T>(list: readonly T[]) => T[];
|
847 | export function into(acc: any): <T>(xf: (...a: readonly any[]) => any, list: readonly T[]) => T[];
|
848 |
|
849 | /**
|
850 | * Same as R.invertObj, however this accounts for objects with duplicate values by putting the values into an array.
|
851 | */
|
852 | export function invert<T>(obj: T): { [index: string]: string[] };
|
853 |
|
854 | /**
|
855 | * Returns a new object with the keys of the given object as values, and the values of the given object as keys.
|
856 | */
|
857 | export function invertObj(obj: { [index: string]: string } | { [index: number]: string }): { [index: string]: string };
|
858 |
|
859 |
|
860 |
|
861 |
|
862 |
|
863 |
|
864 |
|
865 |
|
866 | export function invoker(arity: number, method: string): (...a: readonly any[]) => any;
|
867 |
|
868 |
|
869 |
|
870 |
|
871 |
|
872 | export function is(ctor: any, val: any): boolean;
|
873 | export function is(ctor: any): (val: any) => boolean;
|
874 |
|
875 |
|
876 |
|
877 |
|
878 | export function isEmpty(value: any): boolean;
|
879 |
|
880 |
|
881 |
|
882 |
|
883 | export function isNil(value: any): value is null | undefined;
|
884 |
|
885 |
|
886 |
|
887 |
|
888 |
|
889 | export function join(x: string, xs: readonly any[]): string;
|
890 | export function join(x: string): (xs: readonly any[]) => string;
|
891 |
|
892 |
|
893 |
|
894 |
|
895 | export function juxt<A extends any[], R1, R2>(fns: [(...a: A) => R1, (...a: A) => R2]): (...a: A) => [R1, R2];
|
896 | export function juxt<A extends any[], R1, R2, R3>(fns: [(...a: A) => R1, (...a: A) => R2, (...a: A) => R3]): (...a: A) => [R1, R2, R3];
|
897 | export function juxt<A extends any[], R1, R2, R3, R4>(fns: [(...a: A) => R1, (...a: A) => R2, (...a: A) => R3, (...a: A) => R4]): (...a: A) => [R1, R2, R3, R4];
|
898 | export function juxt<A extends any[], R1, R2, R3, R4, R5>(fns: [(...a: A) => R1, (...a: A) => R2, (...a: A) => R3, (...a: A) => R4, (...a: A) => R5]): (...a: A) => [R1, R2, R3, R4, R5];
|
899 | export function juxt<A extends any[], U>(fns: Array<(...args: A) => U>): (...args: A) => U[];
|
900 |
|
901 |
|
902 |
|
903 |
|
904 |
|
905 | export function keys<T extends object>(x: T): Array<keyof T>;
|
906 | export function keys<T>(x: T): string[];
|
907 |
|
908 |
|
909 |
|
910 |
|
911 |
|
912 | export function keysIn<T>(obj: T): string[];
|
913 |
|
914 |
|
915 |
|
916 |
|
917 | export function last(str: string): string;
|
918 | export function last(list: readonly []): undefined;
|
919 | export function last<T extends any>(list: readonly T[]): T | undefined;
|
920 |
|
921 |
|
922 |
|
923 |
|
924 |
|
925 | export function lastIndexOf<T>(target: T, list: readonly T[]): number;
|
926 |
|
927 |
|
928 |
|
929 |
|
930 | export function length<T>(list: readonly T[]): number;
|
931 |
|
932 |
|
933 |
|
934 |
|
935 |
|
936 |
|
937 | export function lens<S, A>(getter: (s: S) => A, setter: (a: A, s: S) => S): Lens<S, A>;
|
938 |
|
939 |
|
940 |
|
941 |
|
942 | export function lensIndex<A>(n: number): Lens<A[], A>;
|
943 | export function lensIndex<A extends any[], N extends number>(n: N): Lens<A, A[N]>;
|
944 |
|
945 |
|
946 |
|
947 |
|
948 |
|
949 | export function lensPath<S, K0 extends keyof S = keyof S>(path: [K0]): Lens<S, S[K0]>;
|
950 | export function lensPath<S, K0 extends keyof S = keyof S, K1 extends keyof S[K0] = keyof S[K0]>(path: [K0, K1]): Lens<S, S[K0][K1]>;
|
951 | export function lensPath<
|
952 | S,
|
953 | K0 extends keyof S = keyof S,
|
954 | K1 extends keyof S[K0] = keyof S[K0],
|
955 | K2 extends keyof S[K0][K1] = keyof S[K0][K1]
|
956 | >(
|
957 | path: [K0, K1, K2]
|
958 | ): Lens<S, S[K0][K1][K2]>;
|
959 | export function lensPath<
|
960 | S,
|
961 | K0 extends keyof S = keyof S,
|
962 | K1 extends keyof S[K0] = keyof S[K0],
|
963 | K2 extends keyof S[K0][K1] = keyof S[K0][K1],
|
964 | K3 extends keyof S[K0][K1][K2] = keyof S[K0][K1][K2],
|
965 | >(
|
966 | path: [K0, K1, K2, K3]
|
967 | ): Lens<S, S[K0][K1][K2][K3]>;
|
968 | export function lensPath<
|
969 | S,
|
970 | K0 extends keyof S = keyof S,
|
971 | K1 extends keyof S[K0] = keyof S[K0],
|
972 | K2 extends keyof S[K0][K1] = keyof S[K0][K1],
|
973 | K3 extends keyof S[K0][K1][K2] = keyof S[K0][K1][K2],
|
974 | K4 extends keyof S[K0][K1][K2][K3] = keyof S[K0][K1][K2][K3],
|
975 | >(
|
976 | path: [K0, K1, K2, K3, K4]
|
977 | ): Lens<S, S[K0][K1][K2][K3][K4]>;
|
978 | export function lensPath<
|
979 | S,
|
980 | K0 extends keyof S = keyof S,
|
981 | K1 extends keyof S[K0] = keyof S[K0],
|
982 | K2 extends keyof S[K0][K1] = keyof S[K0][K1],
|
983 | K3 extends keyof S[K0][K1][K2] = keyof S[K0][K1][K2],
|
984 | K4 extends keyof S[K0][K1][K2][K3] = keyof S[K0][K1][K2][K3],
|
985 | K5 extends keyof S[K0][K1][K2][K3][K4] = keyof S[K0][K1][K2][K3][K4],
|
986 | >(
|
987 | path: [K0, K1, K2, K3, K4, K5]
|
988 | ): Lens<S, S[K0][K1][K2][K3][K4][K5]>;
|
989 |
|
990 | export function lensPath<S = any, A = any>(path: Path): Lens<S, A>;
|
991 |
|
992 |
|
993 |
|
994 |
|
995 | export function lensProp<S, K extends keyof S = keyof S>(prop: K): Lens<S, S[K]>;
|
996 |
|
997 |
|
998 |
|
999 |
|
1000 |
|
1001 | export function lift(fn: ((...a: readonly any[]) => any), ...args: readonly any[]): any;
|
1002 |
|
1003 |
|
1004 |
|
1005 |
|
1006 |
|
1007 | export function liftN(n: number, fn: ((...a: readonly any[]) => any), ...args: readonly any[]): any;
|
1008 |
|
1009 |
|
1010 |
|
1011 |
|
1012 | export function lt(__: Placeholder, b: number): (a: number) => boolean;
|
1013 | export function lt(__: Placeholder): (b: number, a: number) => boolean;
|
1014 | export function lt(a: number, b: number): boolean;
|
1015 | export function lt(a: string, b: string): boolean;
|
1016 | export function lt(a: number): (b: number) => boolean;
|
1017 |
|
1018 |
|
1019 |
|
1020 |
|
1021 | export function lte(__: Placeholder, b: number): (a: number) => boolean;
|
1022 | export function lte(__: Placeholder): (b: number, a: number) => boolean;
|
1023 | export function lte(a: number, b: number): boolean;
|
1024 | export function lte(a: string, b: string): boolean;
|
1025 | export function lte(a: number): (b: number) => boolean;
|
1026 |
|
1027 |
|
1028 |
|
1029 |
|
1030 | export function map<T, U>(fn: (x: T) => U, list: readonly T[]): U[];
|
1031 | export function map<T, U>(fn: (x: T) => U): (list: readonly T[]) => U[];
|
1032 | export function map<T, U>(fn: (x: T[keyof T & keyof U] | ValueOfUnion<T>) => U[keyof T & keyof U], list: T): U;
|
1033 | export function map<T, U>(fn: (x: T[keyof T & keyof U] | ValueOfUnion<T>) => U[keyof T & keyof U]): (list: T) => U;
|
1034 | export function map<T, U>(fn: (x: T) => U, obj: Functor<T>): Functor<U>;
|
1035 | export function map<T, U>(fn: (x: T) => U): (obj: Functor<T>) => Functor<U>;
|
1036 |
|
1037 |
|
1038 |
|
1039 |
|
1040 | export function mapAccum<T, U, TResult>(fn: (acc: U, value: T) => [U, TResult], acc: U, list: readonly T[]): [U, TResult[]];
|
1041 | export function mapAccum<T, U, TResult>(fn: (acc: U, value: T) => [U, TResult]): (acc: U, list: readonly T[]) => [U, TResult[]];
|
1042 | export function mapAccum<T, U, TResult>(fn: (acc: U, value: T) => [U, TResult], acc: U): (list: readonly T[]) => [U, TResult[]];
|
1043 |
|
1044 |
|
1045 |
|
1046 |
|
1047 | export function mapAccumRight<T, U, TResult>(fn: (acc: U, value: T) => [U, TResult], acc: U, list: readonly T[]): [U, TResult[]];
|
1048 | export function mapAccumRight<T, U, TResult>(fn: (acc: U, value: T) => [U, TResult]): (acc: U, list: readonly T[]) => [U, TResult[]];
|
1049 | export function mapAccumRight<T, U, TResult>(fn: (acc: U, value: T) => [U, TResult], acc: U): (list: readonly T[]) => [U, TResult[]];
|
1050 |
|
1051 |
|
1052 |
|
1053 |
|
1054 | type PartialRecord<K extends keyof any, T> = {
|
1055 | [P in K]?: T;
|
1056 | };
|
1057 | export function mapObjIndexed<T, TResult, TKey extends string>(
|
1058 | fn: (value: T, key: TKey, obj?: Record<TKey, T>) => TResult,
|
1059 | obj: Record<TKey, T>
|
1060 | ): Record<TKey, TResult>;
|
1061 | export function mapObjIndexed<T, TResult, TKey extends string>(
|
1062 | fn: (value: T, key: TKey, obj?: Record<TKey, T>) => TResult,
|
1063 | obj: PartialRecord<TKey, T>
|
1064 | ): PartialRecord<TKey, TResult>;
|
1065 | export function mapObjIndexed<T, TResult, TKey extends string>(
|
1066 | fn: (value: T, key: TKey, obj?: Record<TKey, T>) => TResult
|
1067 | ): (obj: Record<TKey, T>) => Record<TKey, TResult>;
|
1068 | export function mapObjIndexed<T, TResult, TKey extends string>(
|
1069 | fn: (value: T, key: TKey, obj?: PartialRecord<TKey, T>) => TResult
|
1070 | ): (obj: Record<TKey, T>) => PartialRecord<TKey, TResult>;
|
1071 | export function mapObjIndexed<T, TResult>(
|
1072 | fn: (value: T, key: string, obj?: {
|
1073 | [key: string]: T
|
1074 | }) => TResult,
|
1075 | obj: {
|
1076 | [key: string]: T
|
1077 | }
|
1078 | ): {
|
1079 | [key: string]: TResult
|
1080 | };
|
1081 |
|
1082 |
|
1083 |
|
1084 | export function match(regexp: RegExp, str: string): string[];
|
1085 | export function match(regexp: RegExp): (str: string) => string[];
|
1086 |
|
1087 |
|
1088 |
|
1089 |
|
1090 |
|
1091 |
|
1092 |
|
1093 | export function mathMod(__: Placeholder, b: number): (a: number) => number;
|
1094 | export function mathMod(__: Placeholder): (b: number, a: number) => number;
|
1095 | export function mathMod(a: number, b: number): number;
|
1096 | export function mathMod(a: number): (b: number) => number;
|
1097 |
|
1098 |
|
1099 |
|
1100 |
|
1101 | export function max<T extends Ord>(a: T, b: T): T;
|
1102 | export function max<T extends Ord>(a: T): (b: T) => T;
|
1103 |
|
1104 |
|
1105 |
|
1106 |
|
1107 |
|
1108 | export function maxBy<T>(keyFn: (a: T) => Ord, a: T, b: T): T;
|
1109 | export function maxBy<T>(keyFn: (a: T) => Ord, a: T): (b: T) => T;
|
1110 | export function maxBy<T>(keyFn: (a: T) => Ord): _.F.Curry<(a: T, b: T) => T>;
|
1111 |
|
1112 |
|
1113 |
|
1114 |
|
1115 | export function mean(list: readonly number[]): number;
|
1116 |
|
1117 |
|
1118 |
|
1119 |
|
1120 | export function median(list: readonly number[]): number;
|
1121 |
|
1122 |
|
1123 |
|
1124 |
|
1125 |
|
1126 | export function memoizeWith<T extends (...args: readonly any[]) => any>(keyFn: (...v: Parameters<T>) => string, fn: T): T;
|
1127 |
|
1128 |
|
1129 |
|
1130 |
|
1131 |
|
1132 |
|
1133 |
|
1134 |
|
1135 | export function merge<O2 extends object>(__: Placeholder, b: O2): <O1 extends object>(a: O1) => Merge<O2, O1, 'flat'>;
|
1136 | export function merge(__: Placeholder): <O1 extends object, O2 extends object>(b: O2, a: O1) => Merge<O2, O1, 'flat'>;
|
1137 | export function merge<O1 extends object, O2 extends object>(a: O1, b: O2): Merge<O2, O1, 'flat'>;
|
1138 | export function merge<O1 extends object>(a: O1): <O2 extends object>(b: O2) => Merge<O2, O1, 'flat'>;
|
1139 |
|
1140 |
|
1141 |
|
1142 |
|
1143 | export function mergeAll<Os extends readonly object[]>(list: Os): MergeAll<Os>;
|
1144 |
|
1145 |
|
1146 |
|
1147 |
|
1148 |
|
1149 |
|
1150 | export function mergeDeepLeft<O1 extends object, O2 extends object>(o1: O1, o2: O2): Merge<O1, O2, 'deep'>;
|
1151 | export function mergeDeepLeft<O1 extends object>(o1: O1): <O2 extends object>(o2: O2) => Merge<O1, O2, 'deep'>;
|
1152 |
|
1153 |
|
1154 |
|
1155 |
|
1156 |
|
1157 |
|
1158 |
|
1159 | export function mergeDeepRight<O1 extends object, O2 extends object>(o1: O1, o2: O2): Merge<O2, O1, 'deep'>;
|
1160 | export function mergeDeepRight<O1 extends object>(a: O1): <O2 extends object>(o2: O2) => Merge<O2, O1, 'deep'>;
|
1161 |
|
1162 |
|
1163 |
|
1164 |
|
1165 |
|
1166 |
|
1167 |
|
1168 | export function mergeDeepWith<T1, T2>(fn: (x: any, z: any) => any, a: T1, b: T2): any;
|
1169 | export function mergeDeepWith<T1, T2>(fn: (x: any, z: any) => any, a: T1): (b: T2) => any;
|
1170 | export function mergeDeepWith<T1, T2>(fn: (x: any, z: any) => any): (a: T1, b: T2) => any;
|
1171 |
|
1172 |
|
1173 |
|
1174 |
|
1175 |
|
1176 |
|
1177 |
|
1178 |
|
1179 | export function mergeDeepWithKey<T1, T2>(fn: (k: string, x: any, z: any) => any, a: T1, b: T2): any;
|
1180 | export function mergeDeepWithKey<T1, T2>(fn: (k: string, x: any, z: any) => any, a: T1): (b: T2) => any;
|
1181 | export function mergeDeepWithKey<T1, T2>(fn: (k: string, x: any, z: any) => any): (a: T1, b: T2) => any;
|
1182 |
|
1183 |
|
1184 |
|
1185 |
|
1186 |
|
1187 | export function mergeLeft<O1 extends object, O2 extends object>(a: O1, b: O2): Merge<O1, O2, 'flat'>;
|
1188 | export function mergeLeft<O1 extends object>(a: O1): <O2 extends object>(b: O2) => Merge<O1, O2, 'flat'>;
|
1189 |
|
1190 |
|
1191 |
|
1192 |
|
1193 |
|
1194 | export function mergeRight<O1 extends object, O2 extends object>(a: O1, b: O2): Merge<O2, O1, 'flat'>;
|
1195 | export function mergeRight<O1 extends object>(a: O1): <O2 extends object>(b: O2) => Merge<O2, O1, 'flat'>;
|
1196 |
|
1197 |
|
1198 |
|
1199 |
|
1200 |
|
1201 |
|
1202 |
|
1203 | export function mergeWith<U, V>(fn: (x: any, z: any) => any, a: U, b: V): any;
|
1204 | export function mergeWith<U>(fn: (x: any, z: any) => any, a: U): <V>(b: V) => any;
|
1205 | export function mergeWith(fn: (x: any, z: any) => any): <U, V>(a: U, b: V) => any;
|
1206 |
|
1207 |
|
1208 |
|
1209 |
|
1210 |
|
1211 |
|
1212 |
|
1213 | export function mergeWithKey<U, V>(fn: (str: string, x: any, z: any) => any, a: U, b: V): any;
|
1214 | export function mergeWithKey<U>(fn: (str: string, x: any, z: any) => any, a: U): <V>(b: V) => any;
|
1215 | export function mergeWithKey(fn: (str: string, x: any, z: any) => any): <U, V>(a: U, b: V) => any;
|
1216 |
|
1217 |
|
1218 |
|
1219 |
|
1220 | export function min<T extends Ord>(a: T, b: T): T;
|
1221 | export function min<T extends Ord>(a: T): (b: T) => T;
|
1222 |
|
1223 |
|
1224 |
|
1225 |
|
1226 |
|
1227 | export function minBy<T>(keyFn: (a: T) => Ord, a: T, b: T): T;
|
1228 | export function minBy<T>(keyFn: (a: T) => Ord, a: T): (b: T) => T;
|
1229 | export function minBy<T>(keyFn: (a: T) => Ord): _.F.Curry<(a: T, b: T) => T>;
|
1230 |
|
1231 |
|
1232 |
|
1233 |
|
1234 |
|
1235 |
|
1236 |
|
1237 | export function modulo(__: Placeholder, b: number): (a: number) => number;
|
1238 | export function modulo(__: Placeholder): (b: number, a: number) => number;
|
1239 | export function modulo(a: number, b: number): number;
|
1240 | export function modulo(a: number): (b: number) => number;
|
1241 |
|
1242 |
|
1243 |
|
1244 |
|
1245 | export function multiply(a: number, b: number): number;
|
1246 | export function multiply(a: number): (b: number) => number;
|
1247 |
|
1248 |
|
1249 |
|
1250 |
|
1251 |
|
1252 | export function move<T>(from: number, to: number, list: readonly T[]): T[];
|
1253 | export function move(from: number, to: number): <T>(list: readonly T[]) => T[];
|
1254 | export function move(from: number): {
|
1255 | <T>(to: number, list: readonly T[]): T[];
|
1256 | (to: number): <T>(list: readonly T[]) => T[];
|
1257 | };
|
1258 |
|
1259 |
|
1260 |
|
1261 |
|
1262 |
|
1263 | export function nAry<N extends number, T extends (...arg: any) => any>(n: N, fn: T): (...arg: _.T.Take<Parameters<T>, _.N.NumberOf<N>>) => ReturnType<T>;
|
1264 | export function nAry<N extends number>(n: N): <T extends (...arg: any) => any>(fn: T) => (...arg: _.T.Take<Parameters<T>, _.N.NumberOf<N>>) => ReturnType<T>;
|
1265 |
|
1266 |
|
1267 |
|
1268 |
|
1269 | export function negate(n: number): number;
|
1270 |
|
1271 |
|
1272 |
|
1273 |
|
1274 | export function none<T>(fn: (a: T) => boolean, list: readonly T[]): boolean;
|
1275 | export function none<T>(fn: (a: T) => boolean): (list: readonly T[]) => boolean;
|
1276 |
|
1277 |
|
1278 |
|
1279 |
|
1280 |
|
1281 | export function not(value: any): boolean;
|
1282 |
|
1283 |
|
1284 |
|
1285 |
|
1286 | export function nth<T>(n: number, list: readonly T[]): T | undefined;
|
1287 | export function nth(n: number): <T>(list: readonly T[]) => T | undefined;
|
1288 |
|
1289 |
|
1290 |
|
1291 |
|
1292 | export function nthArg(n: number): (...a: readonly any[]) => any;
|
1293 |
|
1294 |
|
1295 |
|
1296 |
|
1297 |
|
1298 |
|
1299 |
|
1300 | export function o<T1, T2, R>(f: (x: T2) => R, g: (x: T1) => T2, v: T1): R;
|
1301 | export function o<T1, T2, R>(f: (x: T2) => R, g: (x: T1) => T2): (v: T1) => R;
|
1302 | export function o<T2, R>(
|
1303 | f: (x: T2) => R,
|
1304 | ): {
|
1305 | <T1>(g: (x: T1) => T2, v: T1): R;
|
1306 | <T1>(g: (x: T1) => T2): (v: T1) => R;
|
1307 | };
|
1308 |
|
1309 |
|
1310 |
|
1311 |
|
1312 | export function objOf<T, K extends string>(key: K, value: T): Record<K, T>;
|
1313 | export function objOf<K extends string>(key: K): <T>(value: T) => Record<K, T>;
|
1314 |
|
1315 |
|
1316 |
|
1317 |
|
1318 | export function of<T>(x: T): T[];
|
1319 |
|
1320 |
|
1321 |
|
1322 |
|
1323 | export function omit<T, K extends string>(names: readonly K[], obj: T): Omit<T, K>;
|
1324 | export function omit<K extends string>(names: readonly K[]): <T>(obj: T) => Omit<T, K>;
|
1325 |
|
1326 |
|
1327 |
|
1328 |
|
1329 |
|
1330 |
|
1331 | export function once<F extends (...a: readonly any[]) => any>(fn: F): F;
|
1332 |
|
1333 |
|
1334 |
|
1335 |
|
1336 |
|
1337 |
|
1338 | export function or<T, U>(a: T, b: U): T | U;
|
1339 | export function or<T>(a: T): <U>(b: U) => T | U;
|
1340 | export function or<T extends { or?: ((...a: readonly any[]) => any); }, U>(fn1: T, val2: U): T | U;
|
1341 | export function or<T extends { or?: ((...a: readonly any[]) => any); }>(fn1: T): <U>(val2: U) => T | U;
|
1342 |
|
1343 |
|
1344 |
|
1345 |
|
1346 |
|
1347 | export function otherwise<A, B>(onError: (error: any) => B | Promise<B>, promise: Promise<A>): Promise<B>;
|
1348 | export function otherwise<A, B>(onError: (error: any) => B | Promise<B>): (promise: Promise<A>) => Promise<B>;
|
1349 |
|
1350 |
|
1351 |
|
1352 |
|
1353 |
|
1354 | export function over<S, A>(lens: Lens<S, A>, fn: (a: A) => A, value: S): S;
|
1355 | export function over<S, A>(lens: Lens<S, A>, fn: (a: A) => A): (value: S) => S;
|
1356 | export function over<S, A>(lens: Lens<S, A>): (fn: (a: A) => A, value: S) => S;
|
1357 |
|
1358 |
|
1359 |
|
1360 |
|
1361 | export function pair<F, S>(fst: F, snd: S): [F, S];
|
1362 | export function pair<F>(fst: F): <S>(snd: S) => [F, S];
|
1363 |
|
1364 |
|
1365 |
|
1366 |
|
1367 |
|
1368 |
|
1369 | export function partial<V0, V1, T>(fn: (x0: V0, x1: V1) => T, args: [V0]): (x1: V1) => T;
|
1370 |
|
1371 | export function partial<V0, V1, V2, T>(fn: (x0: V0, x1: V1, x2: V2) => T, args: [V0, V1]): (x2: V2) => T;
|
1372 | export function partial<V0, V1, V2, T>(fn: (x0: V0, x1: V1, x2: V2) => T, args: [V0]): (x1: V1, x2: V2) => T;
|
1373 |
|
1374 | 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;
|
1375 | 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;
|
1376 | 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;
|
1377 |
|
1378 | export function partial<T>(fn: (...a: readonly any[]) => T, args: readonly any[]): (...a: readonly any[]) => T;
|
1379 |
|
1380 |
|
1381 |
|
1382 |
|
1383 |
|
1384 |
|
1385 | export function partialRight<V0, V1, T>(fn: (x0: V0, x1: V1) => T, args: [V1]): (x1: V0) => T;
|
1386 |
|
1387 | export function partialRight<V0, V1, V2, T>(fn: (x0: V0, x1: V1, x2: V2) => T, args: [V1, V2]): (x2: V0) => T;
|
1388 | export function partialRight<V0, V1, V2, T>(fn: (x0: V0, x1: V1, x2: V2) => T, args: [V2]): (x1: V0, x2: V1) => T;
|
1389 |
|
1390 | export function partialRight<V0, V1, V2, V3, T>(fn: (x0: V0, x1: V1, x2: V2, x3: V3) => T, args: [V1, V2, V3]): (x0: V0) => T;
|
1391 | export function partialRight<V0, V1, V2, V3, T>(fn: (x0: V0, x1: V1, x2: V2, x3: V3) => T, args: [V2, V3]): (x0: V0, x1: V1) => T;
|
1392 | export function partialRight<V0, V1, V2, V3, T>(fn: (x0: V0, x1: V1, x2: V2, x3: V3) => T, args: [V3]): (x0: V0, x1: V1, x2: V2) => T;
|
1393 |
|
1394 | export function partialRight<T>(fn: (...a: readonly any[]) => T, args: readonly any[]): (...a: readonly any[]) => T;
|
1395 |
|
1396 |
|
1397 |
|
1398 |
|
1399 |
|
1400 | export function partition(fn: (a: string) => boolean, list: readonly string[]): [string[], string[]];
|
1401 | export function partition<T>(fn: (a: T) => boolean, list: readonly T[]): [T[], T[]];
|
1402 | export function partition<T>(fn: (a: T) => boolean): (list: readonly T[]) => [T[], T[]];
|
1403 | export function partition(fn: (a: string) => boolean): (list: readonly string[]) => [string[], string[]];
|
1404 |
|
1405 |
|
1406 |
|
1407 |
|
1408 | export function path<T>(path: Path, obj: any): T | undefined;
|
1409 | export function path<T>(path: Path): (obj: any) => T | undefined;
|
1410 |
|
1411 |
|
1412 |
|
1413 |
|
1414 |
|
1415 | export function pathEq(path: Path, val: any, obj: any): boolean;
|
1416 | export function pathEq(path: Path, val: any): (obj: any) => boolean;
|
1417 | export function pathEq(path: Path): _.F.Curry<(a: any, b: any) => boolean>;
|
1418 |
|
1419 |
|
1420 |
|
1421 |
|
1422 |
|
1423 | export function pathOr<T>(defaultValue: T, path: Path, obj: any): T;
|
1424 | export function pathOr<T>(defaultValue: T, path: Path): (obj: any) => T;
|
1425 | export function pathOr<T>(defaultValue: T): _.F.Curry<(a: Path, b: any) => T>;
|
1426 |
|
1427 |
|
1428 |
|
1429 |
|
1430 | export function paths<T>(paths: Path[], obj: any): Array<T | undefined>;
|
1431 | export function paths<T>(paths: Path[]): (obj: any) => Array<T | undefined>;
|
1432 |
|
1433 |
|
1434 |
|
1435 |
|
1436 | export function pathSatisfies<T, U>(pred: (val: T) => boolean, path: Path, obj: U): boolean;
|
1437 | export function pathSatisfies<T, U>(pred: (val: T) => boolean, path: Path): (obj: U) => boolean;
|
1438 | export function pathSatisfies<T, U>(pred: (val: T) => boolean): _.F.Curry<(a: Path, b: U) => boolean>;
|
1439 |
|
1440 |
|
1441 |
|
1442 |
|
1443 |
|
1444 | export function pick<T, K extends string | number | symbol>(names: readonly K[], obj: T): Pick<T, Exclude<keyof T, Exclude<keyof T, K>>>;
|
1445 | export function pick<K extends string | number | symbol>(names: readonly K[]): <T>(obj: T) => Pick<T, Exclude<keyof T, Exclude<keyof T, K>>>;
|
1446 |
|
1447 |
|
1448 |
|
1449 |
|
1450 | export function pickAll<T, U>(names: readonly string[], obj: T): U;
|
1451 | export function pickAll(names: readonly string[]): <T, U>(obj: T) => U;
|
1452 |
|
1453 |
|
1454 |
|
1455 |
|
1456 | export function pickBy<T, U>(pred: ObjPred<T>, obj: T): U;
|
1457 | export function pickBy<T>(pred: ObjPred<T>): <U, V extends T>(obj: V) => U;
|
1458 |
|
1459 |
|
1460 |
|
1461 |
|
1462 |
|
1463 |
|
1464 |
|
1465 | export function pipe<T1>(fn0: () => T1): () => T1;
|
1466 | export function pipe<V0, T1>(fn0: (x0: V0) => T1): (x0: V0) => T1;
|
1467 | export function pipe<V0, V1, T1>(fn0: (x0: V0, x1: V1) => T1): (x0: V0, x1: V1) => T1;
|
1468 | export function pipe<V0, V1, V2, T1>(fn0: (x0: V0, x1: V1, x2: V2) => T1): (x0: V0, x1: V1, x2: V2) => T1;
|
1469 |
|
1470 | export function pipe<T1, T2>(fn0: () => T1, fn1: (x: T1) => T2): () => T2;
|
1471 | export function pipe<V0, T1, T2>(fn0: (x0: V0) => T1, fn1: (x: T1) => T2): (x0: V0) => T2;
|
1472 | export function pipe<V0, V1, T1, T2>(fn0: (x0: V0, x1: V1) => T1, fn1: (x: T1) => T2): (x0: V0, x1: V1) => T2;
|
1473 | 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;
|
1474 |
|
1475 | export function pipe<T1, T2, T3>(fn0: () => T1, fn1: (x: T1) => T2, fn2: (x: T2) => T3): () => T3;
|
1476 | export function pipe<V0, T1, T2, T3>(fn0: (x: V0) => T1, fn1: (x: T1) => T2, fn2: (x: T2) => T3): (x: V0) => T3;
|
1477 | 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;
|
1478 | 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;
|
1479 |
|
1480 | export function pipe<T1, T2, T3, T4>(fn0: () => T1, fn1: (x: T1) => T2, fn2: (x: T2) => T3, fn3: (x: T3) => T4): () => T4;
|
1481 | 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;
|
1482 | 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;
|
1483 | 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;
|
1484 |
|
1485 | 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;
|
1486 | 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;
|
1487 | 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;
|
1488 | 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;
|
1489 |
|
1490 | 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;
|
1491 | 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;
|
1492 | 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;
|
1493 | export function pipe<V0, V1, V2, T1, T2, T3, T4, T5, T6>(fn0: (x0: V0, x1: V1, x2: V2) => 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, x2: V2) => T6;
|
1494 |
|
1495 | export function pipe<T1, T2, T3, T4, T5, T6, T7>(fn0: () => T1, fn1: (x: T1) => T2, fn2: (x: T2) => T3, fn3: (x: T3) => T4, fn4: (x: T4) => T5, fn5: (x: T5) => T6, fn: (x: T6) => T7): () => T7;
|
1496 | export function pipe<V0, T1, T2, T3, T4, T5, T6, T7>(fn0: (x: V0) => T1, fn1: (x: T1) => T2, fn2: (x: T2) => T3, fn3: (x: T3) => T4, fn4: (x: T4) => T5, fn5: (x: T5) => T6, fn: (x: T6) => T7): (x: V0) => T7;
|
1497 | export function pipe<V0, V1, T1, T2, T3, T4, T5, T6, T7>(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, fn6: (x: T6) => T7): (x0: V0, x1: V1) => T7;
|
1498 | export function pipe<V0, V1, V2, T1, T2, T3, T4, T5, T6, T7>(fn0: (x0: V0, x1: V1, x2: V2) => T1, fn1: (x: T1) => T2, fn2: (x: T2) => T3, fn3: (x: T3) => T4, fn4: (x: T4) => T5, fn5: (x: T5) => T6, fn6: (x: T6) => T7): (x0: V0, x1: V1, x2: V2) => T7;
|
1499 |
|
1500 | export function pipe<T1, T2, T3, T4, T5, T6, T7, T8>(fn0: () => T1, fn1: (x: T1) => T2, fn2: (x: T2) => T3, fn3: (x: T3) => T4, fn4: (x: T4) => T5, fn5: (x: T5) => T6, fn6: (x: T6) => T7, fn: (x: T7) => T8): () => T8;
|
1501 | export function pipe<V0, T1, T2, T3, T4, T5, T6, T7, T8>(fn0: (x: V0) => T1, fn1: (x: T1) => T2, fn2: (x: T2) => T3, fn3: (x: T3) => T4, fn4: (x: T4) => T5, fn5: (x: T5) => T6, fn6: (x: T6) => T7, fn: (x: T7) => T8): (x: V0) => T8;
|
1502 | export function pipe<V0, V1, T1, T2, T3, T4, T5, T6, T7, T8>(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, fn6: (x: T6) => T7, fn7: (x: T7) => T8): (x0: V0, x1: V1) => T8;
|
1503 | export function pipe<V0, V1, V2, T1, T2, T3, T4, T5, T6, T7, T8>(fn0: (x0: V0, x1: V1, x2: V2) => T1, fn1: (x: T1) => T2, fn2: (x: T2) => T3, fn3: (x: T3) => T4, fn4: (x: T4) => T5, fn5: (x: T5) => T6, fn6: (x: T6) => T7, fn7: (x: T7) => T8): (x0: V0, x1: V1, x2: V2) => T8;
|
1504 |
|
1505 | export function pipe<T1, T2, T3, T4, T5, T6, T7, T8, T9>(fn0: () => T1, fn1: (x: T1) => T2, fn2: (x: T2) => T3, fn3: (x: T3) => T4, fn4: (x: T4) => T5, fn5: (x: T5) => T6, fn6: (x: T6) => T7, fn7: (x: T7) => T8, fn8: (x: T8) => T9): () => T9;
|
1506 | export function pipe<V0, T1, T2, T3, T4, T5, T6, T7, T8, T9>(fn0: (x0: V0) => T1, fn1: (x: T1) => T2, fn2: (x: T2) => T3, fn3: (x: T3) => T4, fn4: (x: T4) => T5, fn5: (x: T5) => T6, fn6: (x: T6) => T7, fn7: (x: T7) => T8, fn8: (x: T8) => T9): (x0: V0) => T9;
|
1507 | export function pipe<V0, V1, T1, T2, T3, T4, T5, T6, T7, T8, T9>(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, fn6: (x: T6) => T7, fn7: (x: T7) => T8, fn8: (x: T8) => T9): (x0: V0, x1: V1) => T9;
|
1508 | export function pipe<V0, V1, V2, T1, T2, T3, T4, T5, T6, T7, T8, T9>(fn0: (x0: V0, x1: V1, x2: V2) => T1, fn1: (x: T1) => T2, fn2: (x: T2) => T3, fn3: (x: T3) => T4, fn4: (x: T4) => T5, fn5: (x: T5) => T6, fn6: (x: T6) => T7, fn7: (x: T7) => T8, fn8: (x: T8) => T9): (x0: V0, x1: V1, x2: V2) => T9;
|
1509 |
|
1510 | export function pipe<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(fn0: () => T1, fn1: (x: T1) => T2, fn2: (x: T2) => T3, fn3: (x: T3) => T4, fn4: (x: T4) => T5, fn5: (x: T5) => T6, fn6: (x: T6) => T7, fn7: (x: T7) => T8, fn8: (x: T8) => T9, fn9: (x: T9) => T10): () => T10;
|
1511 | export function pipe<V0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(fn0: (x0: V0) => T1, fn1: (x: T1) => T2, fn2: (x: T2) => T3, fn3: (x: T3) => T4, fn4: (x: T4) => T5, fn5: (x: T5) => T6, fn6: (x: T6) => T7, fn7: (x: T7) => T8, fn8: (x: T8) => T9, fn9: (x: T9) => T10): (x0: V0) => T10;
|
1512 | export function pipe<V0, V1, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(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, fn6: (x: T6) => T7, fn7: (x: T7) => T8, fn8: (x: T8) => T9, fn9: (x: T9) => T10): (x0: V0, x1: V1) => T10;
|
1513 | export function pipe<V0, V1, V2, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(fn0: (x0: V0, x1: V1, x2: V2) => T1, fn1: (x: T1) => T2, fn2: (x: T2) => T3, fn3: (x: T3) => T4, fn4: (x: T4) => T5, fn5: (x: T5) => T6, fn6: (x: T6) => T7, fn7: (x: T7) => T8, fn8: (x: T8) => T9, fn9: (x: T9) => T10): (x0: V0, x1: V1, x2: V2) => T10;
|
1514 |
|
1515 |
|
1516 |
|
1517 |
|
1518 |
|
1519 |
|
1520 |
|
1521 |
|
1522 |
|
1523 |
|
1524 |
|
1525 | export function pipeK<V0, T1>(fn0: (x0: V0) => T1[]): (x0: V0) => T1[];
|
1526 | export function pipeK<V0, T1, T2>(fn0: (x0: V0) => T1[], fn1: (x: T1) => T2[]): (x0: V0) => T2[];
|
1527 | export function pipeK<V0, T1, T2, T3>(fn0: (x: V0) => T1[], fn1: (x: T1) => T2[], fn2: (x: T2) => T3[]): (x: V0) => T3[];
|
1528 | export function pipeK<V0, T1, T2, T3, T4>(fn0: (x: V0) => T1[], fn1: (x: T1) => T2[], fn2: (x: T2) => T3[], fn3: (x: T3) => T4[]): (x: V0) => T4[];
|
1529 | export function pipeK<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[];
|
1530 | export function pipeK<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[];
|
1531 | export function pipeK<V0, T1, T2, T3, T4, T5, T6, T7>(fn0: (x: V0) => T1[], fn1: (x: T1) => T2[], fn2: (x: T2) => T3[], fn3: (x: T3) => T4[], fn4: (x: T4) => T5[], fn5: (x: T5) => T6[], fn: (x: T6) => T7[]): (x: V0) => T7[];
|
1532 | export function pipeK<V0, T1, T2, T3, T4, T5, T6, T7, T8>(fn0: (x: V0) => T1[], fn1: (x: T1) => T2[], fn2: (x: T2) => T3[], fn3: (x: T3) => T4[], fn4: (x: T4) => T5[], fn5: (x: T5) => T6[], fn6: (x: T6) => T7[], fn: (x: T7) => T8[]): (x: V0) => T8[];
|
1533 | export function pipeK<V0, T1, T2, T3, T4, T5, T6, T7, T8, T9>(fn0: (x0: V0) => T1[], fn1: (x: T1) => T2[], fn2: (x: T2) => T3[], fn3: (x: T3) => T4[], fn4: (x: T4) => T5[], fn5: (x: T5) => T6[], fn6: (x: T6) => T7[], fn7: (x: T7) => T8[], fn8: (x: T8) => T9[]): (x0: V0) => T9[];
|
1534 | export function pipeK<V0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(fn0: (x0: V0) => T1[], fn1: (x: T1) => T2[], fn2: (x: T2) => T3[], fn3: (x: T3) => T4[], fn4: (x: T4) => T5[], fn5: (x: T5) => T6[], fn6: (x: T6) => T7[], fn7: (x: T7) => T8[], fn8: (x: T8) => T9[], fn9: (x: T9) => T10[]): (x0: V0) => T10[];
|
1535 |
|
1536 |
|
1537 |
|
1538 |
|
1539 |
|
1540 |
|
1541 |
|
1542 |
|
1543 |
|
1544 | export function pipeP<V0, T1>(fn0: (x0: V0) => Promise<T1>): (x0: V0) => Promise<T1>;
|
1545 | export function pipeP<V0, T1, T2>(fn0: (x0: V0) => Promise<T1>, fn1: (x: T1) => Promise<T2>): (x0: V0) => Promise<T2>;
|
1546 | export function pipeP<V0, T1, T2, T3>(fn0: (x: V0) => Promise<T1>, fn1: (x: T1) => Promise<T2>, fn2: (x: T2) => Promise<T3>): (x: V0) => Promise<T3>;
|
1547 | export function pipeP<V0, T1, T2, T3, T4>(fn0: (x: V0) => Promise<T1>, fn1: (x: T1) => Promise<T2>, fn2: (x: T2) => Promise<T3>, fn3: (x: T3) => Promise<T4>): (x: V0) => Promise<T4>;
|
1548 | export function pipeP<V0, T1, T2, T3, T4, T5>(fn0: (x: V0) => Promise<T1>, fn1: (x: T1) => Promise<T2>, fn2: (x: T2) => Promise<T3>, fn3: (x: T3) => Promise<T4>, fn4: (x: T4) => Promise<T5>): (x: V0) => Promise<T5>;
|
1549 | export function pipeP<V0, T1, T2, T3, T4, T5, T6>(fn0: (x: V0) => Promise<T1>, fn1: (x: T1) => Promise<T2>, fn2: (x: T2) => Promise<T3>, fn3: (x: T3) => Promise<T4>, fn4: (x: T4) => Promise<T5>, fn5: (x: T5) => Promise<T6>): (x: V0) => Promise<T6>;
|
1550 | export function pipeP<V0, T1, T2, T3, T4, T5, T6, T7>(fn0: (x: V0) => Promise<T1>, fn1: (x: T1) => Promise<T2>, fn2: (x: T2) => Promise<T3>, fn3: (x: T3) => Promise<T4>, fn4: (x: T4) => Promise<T5>, fn5: (x: T5) => Promise<T6>, fn: (x: T6) => Promise<T7>): (x: V0) => Promise<T7>;
|
1551 | export function pipeP<V0, T1, T2, T3, T4, T5, T6, T7, T8>(fn0: (x: V0) => Promise<T1>, fn1: (x: T1) => Promise<T2>, fn2: (x: T2) => Promise<T3>, fn3: (x: T3) => Promise<T4>, fn4: (x: T4) => Promise<T5>, fn5: (x: T5) => Promise<T6>, fn6: (x: T6) => Promise<T7>, fn: (x: T7) => Promise<T8>): (x: V0) => Promise<T8>;
|
1552 | export function pipeP<V0, T1, T2, T3, T4, T5, T6, T7, T8, T9>(fn0: (x0: V0) => Promise<T1>, fn1: (x: T1) => Promise<T2>, fn2: (x: T2) => Promise<T3>, fn3: (x: T3) => Promise<T4>, fn4: (x: T4) => Promise<T5>, fn5: (x: T5) => Promise<T6>, fn6: (x: T6) => Promise<T7>, fn7: (x: T7) => Promise<T8>, fn8: (x: T8) => Promise<T9>): (x0: V0) => Promise<T9>;
|
1553 | export function pipeP<V0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(fn0: (x0: V0) => Promise<T1>, fn1: (x: T1) => Promise<T2>, fn2: (x: T2) => Promise<T3>, fn3: (x: T3) => Promise<T4>, fn4: (x: T4) => Promise<T5>, fn5: (x: T5) => Promise<T6>, fn6: (x: T6) => Promise<T7>, fn7: (x: T7) => Promise<T8>, fn8: (x: T8) => Promise<T9>, fn9: (x: T9) => Promise<T10>): (x0: V0) => Promise<T10>;
|
1554 |
|
1555 |
|
1556 |
|
1557 |
|
1558 |
|
1559 |
|
1560 | export function pipeWith<V0, T>(composer: (f: (value: any) => any, res: any) => any, fns: PipeWithFns<V0, T>): (x0: V0) => T;
|
1561 | export function pipeWith(composer: (f: (value: any) => any, res: any) => any): <V0, T>(fns: PipeWithFns<V0, T>) => (x0: V0) => T;
|
1562 |
|
1563 |
|
1564 |
|
1565 |
|
1566 | export function pluck<K extends keyof T, T>(p: K, list: readonly T[]): Array<T[K]>;
|
1567 | export function pluck<T>(p: number, list: Array<{ [k: number]: T }>): T[];
|
1568 | export function pluck<P extends string>(p: P): <T>(list: Array<Record<P, T>>) => T[];
|
1569 | export function pluck(p: number): <T>(list: Array<{ [k: number]: T }>) => T[];
|
1570 |
|
1571 |
|
1572 |
|
1573 |
|
1574 |
|
1575 | export function prepend<T>(el: T, list: readonly T[]): T[];
|
1576 | export function prepend<T>(el: T): (list: readonly T[]) => T[];
|
1577 |
|
1578 |
|
1579 |
|
1580 |
|
1581 | export function product(list: readonly number[]): number;
|
1582 |
|
1583 |
|
1584 |
|
1585 |
|
1586 | export function project<T, U>(props: readonly string[], objs: readonly T[]): U[];
|
1587 | export function project<T, U>(props: readonly string[]): (objs: readonly T[]) => U[];
|
1588 |
|
1589 |
|
1590 |
|
1591 |
|
1592 | export function prop<T>(__: Placeholder, obj: T): <P extends keyof T>(p: P) => T[P];
|
1593 | export function prop<P extends keyof T, T>(p: P, obj: T): T[P];
|
1594 | export function prop<P extends string>(p: P): <T>(obj: Record<P, T>) => T;
|
1595 | export function prop<P extends string, T>(p: P): (obj: Record<P, T>) => T;
|
1596 |
|
1597 |
|
1598 |
|
1599 |
|
1600 |
|
1601 |
|
1602 | export function propEq<K extends string | number>(name: K, val: any, obj: Record<K, any>): boolean;
|
1603 | export function propEq<K extends string | number>(name: K, val: any): (obj: Record<K, any>) => boolean;
|
1604 | export function propEq<K extends string | number>(name: K): {
|
1605 | (val: any, obj: Record<K, any>): boolean;
|
1606 | (val: any): (obj: Record<K, any>) => boolean;
|
1607 | };
|
1608 |
|
1609 |
|
1610 |
|
1611 |
|
1612 | export function propIs(type: any, name: string, obj: any): boolean;
|
1613 | export function propIs(type: any, name: string): (obj: any) => boolean;
|
1614 | export function propIs(type: any): {
|
1615 | (name: string, obj: any): boolean;
|
1616 | (name: string): (obj: any) => boolean;
|
1617 | };
|
1618 |
|
1619 |
|
1620 |
|
1621 |
|
1622 |
|
1623 | export function propOr<T, U>(val: T, __: Placeholder, obj: U): <V>(p: string) => V;
|
1624 | export function propOr<U>(__: Placeholder, p: string, obj: U): <T, V>(val: T) => V;
|
1625 | export function propOr<T, U, V>(val: T, p: string, obj: U): V;
|
1626 | export function propOr<T>(val: T, p: string): <U, V>(obj: U) => V;
|
1627 | export function propOr<T>(val: T): <U, V>(p: string, obj: U) => V;
|
1628 |
|
1629 |
|
1630 |
|
1631 |
|
1632 |
|
1633 |
|
1634 | export function props<P extends string, T>(ps: readonly P[], obj: Record<P, T>): T[];
|
1635 | export function props<P extends string>(ps: readonly P[]): <T>(obj: Record<P, T>) => T[];
|
1636 | export function props<P extends string, T>(ps: readonly P[]): (obj: Record<P, T>) => T[];
|
1637 |
|
1638 |
|
1639 |
|
1640 |
|
1641 | export function propSatisfies<T, U>(pred: (val: T) => boolean, name: string, obj: U): boolean;
|
1642 | export function propSatisfies<T, U>(pred: (val: T) => boolean, name: string): (obj: U) => boolean;
|
1643 | export function propSatisfies<T, U>(pred: (val: T) => boolean): _.F.Curry<(a: string, b: U) => boolean>;
|
1644 |
|
1645 |
|
1646 |
|
1647 |
|
1648 |
|
1649 |
|
1650 | export function range(from: number, to: number): number[];
|
1651 | export function range(from: number): (to: number) => number[];
|
1652 |
|
1653 |
|
1654 |
|
1655 |
|
1656 |
|
1657 |
|
1658 | export function reduce<T, TResult>(fn: (acc: TResult, elem: T) => TResult | Reduced<TResult>, acc: TResult, list: readonly T[]): TResult;
|
1659 | export function reduce<T, TResult>(fn: (acc: TResult, elem: T) => TResult | Reduced<TResult>): (acc: TResult, list: readonly T[]) => TResult;
|
1660 | export function reduce<T, TResult>(fn: (acc: TResult, elem: T) => TResult | Reduced<TResult>, acc: TResult): (list: readonly T[]) => TResult;
|
1661 |
|
1662 |
|
1663 |
|
1664 |
|
1665 |
|
1666 | export function reduceBy<T, TResult>(valueFn: (acc: TResult, elem: T) => TResult, acc: TResult, keyFn: (elem: T) => string, list: readonly T[]): { [index: string]: TResult };
|
1667 | export function reduceBy<T, TResult>(valueFn: (acc: TResult, elem: T) => TResult, acc: TResult, keyFn: (elem: T) => string): (list: readonly T[]) => { [index: string]: TResult };
|
1668 | export function reduceBy<T, TResult>(valueFn: (acc: TResult, elem: T) => TResult, acc: TResult): _.F.Curry<(a: (elem: T) => string, b: readonly T[]) => { [index: string]: TResult }>;
|
1669 | export function reduceBy<T, TResult>(valueFn: (acc: TResult, elem: T) => TResult): _.F.Curry<(a: TResult, b: (elem: T) => string, c: readonly T[]) => { [index: string]: TResult }>;
|
1670 |
|
1671 |
|
1672 |
|
1673 |
|
1674 |
|
1675 |
|
1676 | export function reduced<T>(elem: T): Reduced<T>;
|
1677 |
|
1678 |
|
1679 |
|
1680 |
|
1681 |
|
1682 |
|
1683 | export function reduceRight<T, TResult>(fn: (elem: T, acc: TResult) => TResult, acc: TResult, list: readonly T[]): TResult;
|
1684 | export function reduceRight<T, TResult>(fn: (elem: T, acc: TResult) => TResult): (acc: TResult, list: readonly T[]) => TResult;
|
1685 | export function reduceRight<T, TResult>(fn: (elem: T, acc: TResult) => TResult, acc: TResult): (list: readonly T[]) => TResult;
|
1686 |
|
1687 |
|
1688 |
|
1689 |
|
1690 |
|
1691 |
|
1692 |
|
1693 | export function reduceWhile<T, TResult>(predicate: (acc: TResult, elem: T) => boolean, fn: (acc: TResult, elem: T) => TResult, acc: TResult, list: readonly T[]): TResult;
|
1694 | export function reduceWhile<T, TResult>(predicate: (acc: TResult, elem: T) => boolean, fn: (acc: TResult, elem: T) => TResult, acc: TResult): (list: readonly T[]) => TResult;
|
1695 | export function reduceWhile<T, TResult>(predicate: (acc: TResult, elem: T) => boolean, fn: (acc: TResult, elem: T) => TResult): _.F.Curry<(a: TResult, b: readonly T[]) => TResult>;
|
1696 | export function reduceWhile<T, TResult>(predicate: (acc: TResult, elem: T) => boolean): _.F.Curry<(a: (acc: TResult, elem: T) => TResult, b: TResult, c: readonly T[]) => TResult>;
|
1697 |
|
1698 |
|
1699 |
|
1700 |
|
1701 |
|
1702 | export const reject: Filter;
|
1703 |
|
1704 |
|
1705 |
|
1706 |
|
1707 | export function remove<T>(start: number, count: number, list: readonly T[]): T[];
|
1708 | export function remove<T>(start: number): (count: number, list: readonly T[]) => T[];
|
1709 | export function remove<T>(start: number, count: number): (list: readonly T[]) => T[];
|
1710 |
|
1711 |
|
1712 |
|
1713 |
|
1714 | export function repeat<T>(a: T, n: number): T[];
|
1715 | export function repeat<T>(a: T): (n: number) => T[];
|
1716 |
|
1717 |
|
1718 |
|
1719 |
|
1720 | export function replace(pattern: RegExp | string, replacement: string | ((match: string, ...args: readonly any[]) => string), str: string): string;
|
1721 | export function replace(pattern: RegExp | string, replacement: string | ((match: string, ...args: readonly any[]) => string)): (str: string) => string;
|
1722 | export function replace(pattern: RegExp | string): (replacement: string | ((match: string, ...args: readonly any[]) => string)) => (str: string) => string;
|
1723 |
|
1724 |
|
1725 |
|
1726 |
|
1727 | export function reverse<T>(list: readonly T[]): T[];
|
1728 |
|
1729 |
|
1730 |
|
1731 | export function reverse(str: string): string;
|
1732 |
|
1733 |
|
1734 |
|
1735 |
|
1736 | export function scan<T, TResult>(fn: (acc: TResult, elem: T) => any, acc: TResult, list: readonly T[]): TResult[];
|
1737 | export function scan<T, TResult>(fn: (acc: TResult, elem: T) => any, acc: TResult): (list: readonly T[]) => TResult[];
|
1738 | export function scan<T, TResult>(fn: (acc: TResult, elem: T) => any): (acc: TResult, list: readonly T[]) => TResult[];
|
1739 |
|
1740 |
|
1741 |
|
1742 |
|
1743 |
|
1744 | export function set<S, A>(lens: Lens<S, A>, a: A, obj: S): S;
|
1745 | export function set<S, A>(lens: Lens<S, A>, a: A): (obj: S) => S;
|
1746 | export function set<S, A>(lens: Lens<S, A>): (a: A, obj: S) => S;
|
1747 |
|
1748 |
|
1749 |
|
1750 |
|
1751 | export function slice(a: number, b: number, list: string): string;
|
1752 | export function slice<T>(a: number, b: number, list: readonly T[]): T[];
|
1753 | export function slice(a: number, b: number): {
|
1754 | (list: string): string;
|
1755 | <T>(list: readonly T[]): T[];
|
1756 | };
|
1757 | export function slice(a: number): {
|
1758 | (b: number, list: string): string;
|
1759 | <T>(b: number, list: readonly T[]): T[];
|
1760 | };
|
1761 |
|
1762 |
|
1763 |
|
1764 |
|
1765 |
|
1766 |
|
1767 | export function sort<T>(fn: (a: T, b: T) => number, list: readonly T[]): T[];
|
1768 | export function sort<T>(fn: (a: T, b: T) => number): (list: readonly T[]) => T[];
|
1769 |
|
1770 |
|
1771 |
|
1772 |
|
1773 | export function sortBy<T>(fn: (a: T) => Ord, list: readonly T[]): T[];
|
1774 | export function sortBy<T>(fn: (a: T) => Ord): (list: readonly T[]) => T[];
|
1775 | export function sortBy(fn: (a: any) => Ord): <T>(list: readonly T[]) => T[];
|
1776 |
|
1777 |
|
1778 |
|
1779 |
|
1780 | export function sortWith<T>(fns: Array<((a: T, b: T) => number)>, list: readonly T[]): T[];
|
1781 | export function sortWith<T>(fns: Array<((a: T, b: T) => number)>): (list: readonly T[]) => T[];
|
1782 |
|
1783 |
|
1784 |
|
1785 |
|
1786 |
|
1787 | export function split(sep: string | RegExp): (str: string) => string[];
|
1788 | export function split(sep: string | RegExp, str: string): string[];
|
1789 |
|
1790 |
|
1791 |
|
1792 |
|
1793 | export function splitAt<T>(index: number, list: readonly T[]): [T[], T[]];
|
1794 | export function splitAt(index: number, list: string): [string, string];
|
1795 | export function splitAt(index: number): {
|
1796 | <T>(list: readonly T[]): [T[], T[]];
|
1797 | (list: string): [string, string];
|
1798 | };
|
1799 |
|
1800 |
|
1801 |
|
1802 |
|
1803 | export function splitEvery<T>(a: number, list: readonly T[]): T[][];
|
1804 | export function splitEvery(a: number, list: string): string[];
|
1805 | export function splitEvery(a: number): {
|
1806 | (list: string): string[];
|
1807 | <T>(list: readonly T[]): T[][];
|
1808 | };
|
1809 |
|
1810 |
|
1811 |
|
1812 |
|
1813 |
|
1814 |
|
1815 |
|
1816 | export function splitWhen<T, U>(pred: (val: T) => boolean, list: readonly U[]): U[][];
|
1817 | export function splitWhen<T>(pred: (val: T) => boolean): <U>(list: readonly U[]) => U[][];
|
1818 |
|
1819 |
|
1820 |
|
1821 |
|
1822 | export function startsWith(a: string, list: string): boolean;
|
1823 | export function startsWith(a: string): (list: string) => boolean;
|
1824 | export function startsWith<T>(a: T | readonly T[], list: readonly T[]): boolean;
|
1825 | export function startsWith<T>(a: T | readonly T[]): (list: readonly T[]) => boolean;
|
1826 |
|
1827 |
|
1828 |
|
1829 |
|
1830 | export function subtract(__: Placeholder, b: number): (a: number) => number;
|
1831 | export function subtract(__: Placeholder): (b: number, a: number) => number;
|
1832 | export function subtract(a: number, b: number): number;
|
1833 | export function subtract(a: number): (b: number) => number;
|
1834 |
|
1835 |
|
1836 |
|
1837 |
|
1838 | export function sum(list: readonly number[]): number;
|
1839 |
|
1840 |
|
1841 |
|
1842 |
|
1843 | export function symmetricDifference<T>(list1: readonly T[], list2: readonly T[]): T[];
|
1844 | export function symmetricDifference<T>(list: readonly T[]): <T>(list: readonly T[]) => T[];
|
1845 |
|
1846 |
|
1847 |
|
1848 |
|
1849 |
|
1850 | export function symmetricDifferenceWith<T>(pred: (a: T, b: T) => boolean, list1: readonly T[], list2: readonly T[]): T[];
|
1851 | export function symmetricDifferenceWith<T>(pred: (a: T, b: T) => boolean): _.F.Curry<(a: readonly T[], b: readonly T[]) => T[]>;
|
1852 |
|
1853 |
|
1854 |
|
1855 |
|
1856 | export function T(): boolean;
|
1857 |
|
1858 |
|
1859 |
|
1860 |
|
1861 | export function tail(list: string): string;
|
1862 | export function tail<T extends any>(list: readonly T[]): T[];
|
1863 |
|
1864 |
|
1865 |
|
1866 |
|
1867 |
|
1868 | export function take<T>(n: number, xs: readonly T[]): T[];
|
1869 | export function take(n: number, xs: string): string;
|
1870 | export function take(n: number): {
|
1871 | (xs: string): string;
|
1872 | <T>(xs: readonly T[]): T[];
|
1873 | };
|
1874 |
|
1875 |
|
1876 |
|
1877 |
|
1878 |
|
1879 | export function takeLast<T>(n: number, xs: readonly T[]): T[];
|
1880 | export function takeLast(n: number, xs: string): string;
|
1881 | export function takeLast(n: number): {
|
1882 | <T>(xs: readonly T[]): T[];
|
1883 | (xs: string): string;
|
1884 | };
|
1885 |
|
1886 |
|
1887 |
|
1888 |
|
1889 |
|
1890 |
|
1891 |
|
1892 | export function takeLastWhile<T>(pred: (a: T) => boolean, list: readonly T[]): T[];
|
1893 | export function takeLastWhile<T>(pred: (a: T) => boolean): <T>(list: readonly T[]) => T[];
|
1894 |
|
1895 |
|
1896 |
|
1897 |
|
1898 |
|
1899 |
|
1900 | export function takeWhile<T>(fn: (x: T) => boolean, list: readonly T[]): T[];
|
1901 | export function takeWhile<T>(fn: (x: T) => boolean): (list: readonly T[]) => T[];
|
1902 |
|
1903 |
|
1904 |
|
1905 |
|
1906 | export function tap<T>(fn: (a: T) => any, value: T): T;
|
1907 | export function tap<T>(fn: (a: T) => any): (value: T) => T;
|
1908 |
|
1909 |
|
1910 |
|
1911 |
|
1912 | export function test(regexp: RegExp, str: string): boolean;
|
1913 | export function test(regexp: RegExp): (str: string) => boolean;
|
1914 |
|
1915 |
|
1916 |
|
1917 |
|
1918 |
|
1919 | export function thunkify<F extends (...args: readonly any[]) => any>(fn: F): _.F.Curry<(...args: Parameters<F>) => (() => ReturnType<F>)>;
|
1920 |
|
1921 |
|
1922 |
|
1923 |
|
1924 |
|
1925 | export function times<T>(fn: (i: number) => T, n: number): T[];
|
1926 | export function times<T>(fn: (i: number) => T): (n: number) => T[];
|
1927 |
|
1928 |
|
1929 |
|
1930 |
|
1931 | export function toLower<S extends string>(str: S): Lowercase<S>;
|
1932 | export function toLower(str: string): string;
|
1933 |
|
1934 |
|
1935 |
|
1936 |
|
1937 |
|
1938 |
|
1939 |
|
1940 | export function toPairs<O extends object, K extends Extract<keyof O, string | number>>(obj: O): Array<{ [key in K]: [`${key}`, O[key]] }[K]>;
|
1941 | export function toPairs<S>(obj: Record<string | number, S>): Array<[string, S]>;
|
1942 |
|
1943 |
|
1944 |
|
1945 |
|
1946 |
|
1947 |
|
1948 |
|
1949 | export function toPairsIn<O extends object, K extends Extract<keyof O, string | number>>(obj: O): Array<{ [key in K]: [`${key}`, O[key]] }[K]>;
|
1950 | export function toPairsIn<S>(obj: Record<string | number, S>): Array<[string, S]>;
|
1951 |
|
1952 |
|
1953 |
|
1954 |
|
1955 |
|
1956 |
|
1957 |
|
1958 |
|
1959 |
|
1960 |
|
1961 |
|
1962 | export function toString<T>(val: T): string;
|
1963 |
|
1964 |
|
1965 |
|
1966 |
|
1967 | export function toUpper<S extends string>(str: S): Uppercase<S>;
|
1968 | export function toUpper(str: string): string;
|
1969 |
|
1970 |
|
1971 |
|
1972 |
|
1973 |
|
1974 |
|
1975 | export function transduce<T, U>(xf: (arg: readonly T[]) => T[], fn: (acc: readonly U[], val: U) => U[], acc: readonly T[], list: readonly T[]): U;
|
1976 | export function transduce<T, U>(xf: (arg: readonly T[]) => T[]): (fn: (acc: readonly U[], val: U) => U[], acc: readonly T[], list: readonly T[]) => U;
|
1977 | export function transduce<T, U>(xf: (arg: readonly T[]) => T[], fn: (acc: readonly U[], val: U) => U[]): (acc: readonly T[], list: readonly T[]) => U;
|
1978 | export function transduce<T, U>(xf: (arg: readonly T[]) => T[], fn: (acc: readonly U[], val: U) => U[], acc: readonly T[]): (list: readonly T[]) => U;
|
1979 |
|
1980 |
|
1981 |
|
1982 |
|
1983 | export function transpose<T>(list: readonly T[][]): T[][];
|
1984 |
|
1985 |
|
1986 |
|
1987 |
|
1988 |
|
1989 |
|
1990 | export function traverse<A, B>(of: (a: B) => B[], fn: (t: A) => B[], list: readonly A[]): B[][];
|
1991 | export function traverse<A, B>(of: (a: B) => B[], fn: (t: A) => B[]): (list: readonly A[]) => B[][];
|
1992 | export function traverse<A, B>(of: (a: B) => B[]): (fn: (t: A) => B[], list: readonly A[]) => B[][];
|
1993 |
|
1994 |
|
1995 |
|
1996 |
|
1997 | export function trim(str: string): string;
|
1998 |
|
1999 |
|
2000 |
|
2001 |
|
2002 |
|
2003 |
|
2004 |
|
2005 | export function tryCatch<F extends (...args: readonly any[]) => any, RE = ReturnType<F>, E = unknown>(tryer: F, catcher: (error: E, ...args: _.F.Parameters<F>) => RE): (F | (() => RE));
|
2006 | export function tryCatch<F extends (...args: readonly any[]) => any>(tryer: F): <RE = ReturnType<F>, E = unknown>(catcher: (error: E, ...args: _.F.Parameters<F>) => RE) => (F | (() => RE));
|
2007 |
|
2008 |
|
2009 |
|
2010 |
|
2011 |
|
2012 | export function type(val: any): 'Object' | 'Number' | 'Boolean' | 'String' | 'Null' | 'Array' | 'RegExp' | 'Function' | 'Undefined' | 'Symbol';
|
2013 |
|
2014 |
|
2015 |
|
2016 |
|
2017 |
|
2018 |
|
2019 |
|
2020 |
|
2021 |
|
2022 | export function unapply<T>(fn: (args: readonly any[]) => T): (...args: readonly any[]) => T;
|
2023 |
|
2024 |
|
2025 |
|
2026 |
|
2027 |
|
2028 | export function unary<T, R>(fn: (a: T, ...args: readonly any[]) => R): (a: T) => R;
|
2029 |
|
2030 |
|
2031 |
|
2032 |
|
2033 | export function uncurryN<T>(len: number, fn: (a: any) => any): (...a: readonly any[]) => T;
|
2034 |
|
2035 |
|
2036 |
|
2037 |
|
2038 |
|
2039 |
|
2040 | export function unfold<T, TResult>(fn: (seed: T) => [TResult, T] | false, seed: T): TResult[];
|
2041 | export function unfold<T, TResult>(fn: (seed: T) => [TResult, T] | false): (seed: T) => TResult[];
|
2042 |
|
2043 |
|
2044 |
|
2045 |
|
2046 |
|
2047 | export function union<T>(as: readonly T[], bs: readonly T[]): T[];
|
2048 | export function union<T>(as: readonly T[]): (bs: readonly T[]) => T[];
|
2049 |
|
2050 |
|
2051 |
|
2052 |
|
2053 |
|
2054 | export function unionWith<T>(pred: (a: T, b: T) => boolean, list1: readonly T[], list2: readonly T[]): T[];
|
2055 | export function unionWith<T>(pred: (a: T, b: T) => boolean): _.F.Curry<(a: readonly T[], b: readonly T[]) => T[]>;
|
2056 |
|
2057 |
|
2058 |
|
2059 |
|
2060 | export function uniq<T>(list: readonly T[]): T[];
|
2061 |
|
2062 |
|
2063 |
|
2064 |
|
2065 |
|
2066 |
|
2067 |
|
2068 | export function uniqBy<T, U>(fn: (a: T) => U, list: readonly T[]): T[];
|
2069 | export function uniqBy<T, U>(fn: (a: T) => U): (list: readonly T[]) => T[];
|
2070 |
|
2071 |
|
2072 |
|
2073 |
|
2074 |
|
2075 | export function uniqWith<T, U>(pred: (x: T, y: T) => boolean, list: readonly T[]): T[];
|
2076 | export function uniqWith<T, U>(pred: (x: T, y: T) => boolean): (list: readonly T[]) => T[];
|
2077 |
|
2078 |
|
2079 |
|
2080 |
|
2081 |
|
2082 |
|
2083 | export function unless<T, U>(pred: (a: T) => boolean, whenFalseFn: (a: T) => U, obj: T): U;
|
2084 | export function unless<T, U>(pred: (a: T) => boolean, whenFalseFn: (a: T) => U): (obj: T) => U;
|
2085 |
|
2086 |
|
2087 |
|
2088 |
|
2089 |
|
2090 | export function unnest<T extends readonly any[]>(list: T): _.T.UnNest<T>;
|
2091 |
|
2092 |
|
2093 |
|
2094 |
|
2095 |
|
2096 |
|
2097 | export function until<T, U>(pred: (val: T) => boolean, fn: (val: T) => U, init: U): U;
|
2098 | export function until<T, U>(pred: (val: T) => boolean, fn: (val: T) => U): (init: U) => U;
|
2099 |
|
2100 |
|
2101 |
|
2102 |
|
2103 | export function update<T>(index: number, value: T, list: readonly T[]): T[];
|
2104 | export function update<T>(index: number, value: T): (list: readonly T[]) => T[];
|
2105 |
|
2106 |
|
2107 |
|
2108 |
|
2109 |
|
2110 |
|
2111 |
|
2112 |
|
2113 |
|
2114 |
|
2115 |
|
2116 | export function useWith(fn: ((...a: readonly any[]) => any), transformers: Array<((...a: readonly any[]) => any)>): (...a: readonly any[]) => any;
|
2117 |
|
2118 |
|
2119 |
|
2120 |
|
2121 |
|
2122 |
|
2123 | export function values<T extends object, K extends keyof T>(obj: T): Array<T[K] | ValueOfUnion<T>>;
|
2124 |
|
2125 |
|
2126 |
|
2127 |
|
2128 |
|
2129 | export function valuesIn<T>(obj: any): T[];
|
2130 |
|
2131 |
|
2132 |
|
2133 |
|
2134 |
|
2135 | export function view<S, A>(lens: Lens<S, A>): (obj: S) => A;
|
2136 | export function view<S, A>(lens: Lens<S, A>, obj: S): A;
|
2137 |
|
2138 |
|
2139 |
|
2140 |
|
2141 |
|
2142 |
|
2143 | export function when<T, U>(pred: (a: T) => boolean, whenTrueFn: (a: T) => U, obj: T): T | U;
|
2144 | export function when<T, U>(pred: (a: T) => boolean, whenTrueFn: (a: T) => U): (obj: T) => T | U;
|
2145 |
|
2146 |
|
2147 |
|
2148 |
|
2149 |
|
2150 |
|
2151 |
|
2152 |
|
2153 |
|
2154 |
|
2155 |
|
2156 |
|
2157 | export function where<T, U>(spec: T, testObj: U): boolean;
|
2158 | export function where<T>(spec: T): <U>(testObj: U) => boolean;
|
2159 | export function where<ObjFunc2, U>(spec: ObjFunc2, testObj: U): boolean;
|
2160 | export function where<ObjFunc2>(spec: ObjFunc2): <U>(testObj: U) => boolean;
|
2161 |
|
2162 |
|
2163 |
|
2164 |
|
2165 |
|
2166 |
|
2167 |
|
2168 | export function whereEq<T, U>(spec: T, obj: U): boolean;
|
2169 | export function whereEq<T>(spec: T): <U>(obj: U) => boolean;
|
2170 |
|
2171 |
|
2172 |
|
2173 |
|
2174 |
|
2175 | export function without<T>(list1: readonly T[], list2: readonly T[]): T[];
|
2176 | export function without<T>(list1: readonly T[]): (list2: readonly T[]) => T[];
|
2177 |
|
2178 |
|
2179 |
|
2180 |
|
2181 |
|
2182 |
|
2183 | export function xor(a: any, b: any): boolean;
|
2184 | export function xor(a: any): (b: any) => boolean;
|
2185 |
|
2186 |
|
2187 |
|
2188 |
|
2189 | export function xprod<K, V>(as: readonly K[], bs: readonly V[]): Array<KeyValuePair<K, V>>;
|
2190 | export function xprod<K>(as: readonly K[]): <V>(bs: readonly V[]) => Array<KeyValuePair<K, V>>;
|
2191 |
|
2192 |
|
2193 |
|
2194 |
|
2195 |
|
2196 | export function zip<K, V>(list1: readonly K[], list2: readonly V[]): Array<KeyValuePair<K, V>>;
|
2197 | export function zip<K>(list1: readonly K[]): <V>(list2: readonly V[]) => Array<KeyValuePair<K, V>>;
|
2198 |
|
2199 |
|
2200 |
|
2201 |
|
2202 |
|
2203 | export function zipObj<T, K extends string>(keys: readonly K[], values: readonly T[]): { [P in K]: T };
|
2204 | export function zipObj<K extends string>(keys: readonly K[]): <T>(values: readonly T[]) => { [P in K]: T };
|
2205 | export function zipObj<T, K extends number>(keys: readonly K[], values: readonly T[]): { [P in K]: T };
|
2206 | export function zipObj<K extends number>(keys: readonly K[]): <T>(values: readonly T[]) => { [P in K]: T };
|
2207 |
|
2208 |
|
2209 |
|
2210 |
|
2211 |
|
2212 | export function zipWith<T, U, TResult>(fn: (x: T, y: U) => TResult, list1: readonly T[], list2: readonly U[]): TResult[];
|
2213 | export function zipWith<T, U, TResult>(fn: (x: T, y: U) => TResult, list1: readonly T[]): (list2: readonly U[]) => TResult[];
|
2214 | export function zipWith<T, U, TResult>(fn: (x: T, y: U) => TResult): (list1: readonly T[], list2: readonly U[]) => TResult[];
|
2215 |
|
2216 | export as namespace R
|