|
@@ -1,3 +1,6 @@
|
|
1
|
+// flow-typed signature: 99202f0cce15ad31fae01af918065827
|
|
2
|
+// flow-typed version: ce66c2353d/lodash_v4.x.x/flow_>=v0.63.x
|
|
3
|
+
|
1
|
4
|
declare module "lodash" {
|
2
|
5
|
declare type __CurriedFunction1<A, R, AA: A> = (...r: [AA]) => R;
|
3
|
6
|
declare type CurriedFunction1<A, R> = __CurriedFunction1<A, R, *>;
|
|
@@ -211,8 +214,8 @@ declare module "lodash" {
|
211
|
214
|
// Array
|
212
|
215
|
chunk<T>(array?: ?Array<T>, size?: ?number): Array<Array<T>>;
|
213
|
216
|
compact<T, N: ?T>(array?: ?Array<N>): Array<T>;
|
214
|
|
- concat<T>(base?: ?Array<T>, ...elements: Array<any>): Array<T | any>;
|
215
|
|
- difference<T>(array?: ?$ReadOnlyArray<T>, values?: ?$ReadOnlyArray<T>): Array<T>;
|
|
217
|
+ concat<T>(base?: ?$ReadOnlyArray<T>, ...elements: Array<any>): Array<T | any>;
|
|
218
|
+ difference<T>(array?: ?$ReadOnlyArray<T>, ...values: Array<?$ReadOnlyArray<T>>): Array<T>;
|
216
|
219
|
differenceBy<T>(
|
217
|
220
|
array?: ?$ReadOnlyArray<T>,
|
218
|
221
|
values?: ?$ReadOnlyArray<T>,
|
|
@@ -250,12 +253,12 @@ declare module "lodash" {
|
250
|
253
|
fromIndex?: ?number
|
251
|
254
|
): -1;
|
252
|
255
|
// alias of _.head
|
253
|
|
- first<T>(array: ?Array<T>): T;
|
|
256
|
+ first<T>(array: ?$ReadOnlyArray<T>): T;
|
254
|
257
|
flatten<T, X>(array?: ?Array<Array<T> | X>): Array<T | X>;
|
255
|
258
|
flattenDeep<T>(array?: ?any[]): Array<T>;
|
256
|
259
|
flattenDepth(array?: ?any[], depth?: ?number): any[];
|
257
|
260
|
fromPairs<A, B>(pairs?: ?Array<[A, B]>): { [key: A]: B };
|
258
|
|
- head<T>(array: ?Array<T>): T;
|
|
261
|
+ head<T>(array: ?$ReadOnlyArray<T>): T;
|
259
|
262
|
indexOf<T>(array: Array<T>, value: T, fromIndex?: number): number;
|
260
|
263
|
indexOf<T>(array: void | null, value?: ?T, fromIndex?: ?number): -1;
|
261
|
264
|
initial<T>(array: ?Array<T>): Array<T>;
|
|
@@ -328,7 +331,7 @@ declare module "lodash" {
|
328
|
331
|
remove<T>(array?: ?Array<T>, predicate?: ?Predicate<T>): Array<T>;
|
329
|
332
|
reverse<T>(array: Array<T>): Array<T>;
|
330
|
333
|
reverse<T: void | null>(array: T): T;
|
331
|
|
- slice<T>(array?: ?Array<T>, start?: ?number, end?: ?number): Array<T>;
|
|
334
|
+ slice<T>(array?: ?$ReadOnlyArray<T>, start?: ?number, end?: ?number): Array<T>;
|
332
|
335
|
sortedIndex<T>(array: Array<T>, value: T): number;
|
333
|
336
|
sortedIndex<T>(array: void | null, value: ?T): 0;
|
334
|
337
|
sortedIndexBy<T>(
|
|
@@ -410,7 +413,7 @@ declare module "lodash" {
|
410
|
413
|
uniqWith<T>(array?: ?Array<T>, comparator?: ?Comparator<T>): Array<T>;
|
411
|
414
|
unzip<T>(array?: ?Array<T>): Array<T>;
|
412
|
415
|
unzipWith<T>(array: ?Array<T>, iteratee?: ?Iteratee<T>): Array<T>;
|
413
|
|
- without<T>(array?: ?Array<T>, ...values?: Array<?T>): Array<T>;
|
|
416
|
+ without<T>(array?: ?$ReadOnlyArray<T>, ...values?: Array<?T>): Array<T>;
|
414
|
417
|
xor<T>(...array: Array<Array<T>>): Array<T>;
|
415
|
418
|
//Workaround until (...parameter: T, parameter2: U) works
|
416
|
419
|
xorBy<T>(a1?: ?Array<T>, iteratee?: ?ValueOnlyIteratee<T>): Array<T>;
|
|
@@ -509,16 +512,16 @@ declare module "lodash" {
|
509
|
512
|
countBy<T>(array: void | null, iteratee?: ?ValueOnlyIteratee<T>): {};
|
510
|
513
|
countBy<T: Object>(object: T, iteratee?: ?ValueOnlyIteratee<T>): Object;
|
511
|
514
|
// alias of _.forEach
|
512
|
|
- each<T>(array: Array<T>, iteratee?: ?Iteratee<T>): Array<T>;
|
|
515
|
+ each<T>(array: $ReadOnlyArray<T>, iteratee?: ?Iteratee<T>): Array<T>;
|
513
|
516
|
each<T: void | null>(array: T, iteratee?: ?Iteratee<any>): T;
|
514
|
517
|
each<T: Object>(object: T, iteratee?: ?OIteratee<T>): T;
|
515
|
518
|
// alias of _.forEachRight
|
516
|
|
- eachRight<T>(array: Array<T>, iteratee?: ?Iteratee<T>): Array<T>;
|
|
519
|
+ eachRight<T>(array: $ReadOnlyArray<T>, iteratee?: ?Iteratee<T>): Array<T>;
|
517
|
520
|
eachRight<T: void | null>(array: T, iteratee?: ?Iteratee<any>): T;
|
518
|
521
|
eachRight<T: Object>(object: T, iteratee?: OIteratee<T>): T;
|
519
|
522
|
every<T>(array?: ?$ReadOnlyArray<T>, iteratee?: ?Iteratee<T>): boolean;
|
520
|
523
|
every<T: Object>(object: T, iteratee?: OIteratee<T>): boolean;
|
521
|
|
- filter<T>(array?: ?Array<T>, predicate?: ?Predicate<T>): Array<T>;
|
|
524
|
+ filter<T>(array?: ?$ReadOnlyArray<T>, predicate?: ?Predicate<T>): Array<T>;
|
522
|
525
|
filter<A, T: { [id: string]: A }>(
|
523
|
526
|
object: T,
|
524
|
527
|
predicate?: OPredicate<A, T>
|
|
@@ -573,10 +576,10 @@ declare module "lodash" {
|
573
|
576
|
iteratee?: OFlatMapIteratee<T, U>,
|
574
|
577
|
depth?: number
|
575
|
578
|
): Array<U>;
|
576
|
|
- forEach<T>(array: Array<T>, iteratee?: ?Iteratee<T>): Array<T>;
|
|
579
|
+ forEach<T>(array: $ReadOnlyArray<T>, iteratee?: ?Iteratee<T>): Array<T>;
|
577
|
580
|
forEach<T: void | null>(array: T, iteratee?: ?Iteratee<any>): T;
|
578
|
581
|
forEach<T: Object>(object: T, iteratee?: ?OIteratee<T>): T;
|
579
|
|
- forEachRight<T>(array: Array<T>, iteratee?: ?Iteratee<T>): Array<T>;
|
|
582
|
+ forEachRight<T>(array: $ReadOnlyArray<T>, iteratee?: ?Iteratee<T>): Array<T>;
|
580
|
583
|
forEachRight<T: void | null>(array: T, iteratee?: ?Iteratee<any>): T;
|
581
|
584
|
forEachRight<T: Object>(object: T, iteratee?: ?OIteratee<T>): T;
|
582
|
585
|
groupBy<V, T>(
|
|
@@ -591,7 +594,7 @@ declare module "lodash" {
|
591
|
594
|
object: T,
|
592
|
595
|
iteratee?: ValueOnlyIteratee<A>
|
593
|
596
|
): { [key: V]: Array<A> };
|
594
|
|
- includes<T>(array: Array<T>, value: T, fromIndex?: ?number): boolean;
|
|
597
|
+ includes<T>(array: $ReadOnlyArray<T>, value: T, fromIndex?: ?number): boolean;
|
595
|
598
|
includes<T>(array: void | null, value?: ?T, fromIndex?: ?number): false;
|
596
|
599
|
includes<T: Object>(object: T, value: any, fromIndex?: number): boolean;
|
597
|
600
|
includes(str: string, value: string, fromIndex?: number): boolean;
|
|
@@ -703,7 +706,7 @@ declare module "lodash" {
|
703
|
706
|
iteratee?: ?(accumulator: U, value: any, key: string, object: T) => U,
|
704
|
707
|
accumulator?: ?U
|
705
|
708
|
): U;
|
706
|
|
- reject<T>(array: ?Array<T>, predicate?: Predicate<T>): Array<T>;
|
|
709
|
+ reject<T>(array: ?$ReadOnlyArray<T>, predicate?: Predicate<T>): Array<T>;
|
707
|
710
|
reject<V: Object, A, T: { [id: string]: A }>(
|
708
|
711
|
object?: ?T,
|
709
|
712
|
predicate?: ?OPredicate<A, T>
|
|
@@ -714,7 +717,7 @@ declare module "lodash" {
|
714
|
717
|
sampleSize<V, T: Object>(object: T, n?: number): Array<V>;
|
715
|
718
|
shuffle<T>(array: ?Array<T>): Array<T>;
|
716
|
719
|
shuffle<V, T: Object>(object: T): Array<V>;
|
717
|
|
- size(collection: Array<any> | Object | string): number;
|
|
720
|
+ size(collection: $ReadOnlyArray<any> | Object | string): number;
|
718
|
721
|
some<T>(array: ?$ReadOnlyArray<T>, predicate?: Predicate<T>): boolean;
|
719
|
722
|
some<T>(array: void | null, predicate?: ?Predicate<T>): false;
|
720
|
723
|
some<A, T: { [id: string]: A }>(
|
|
@@ -927,7 +930,7 @@ declare module "lodash" {
|
927
|
930
|
random(lower?: number, upper?: number, floating?: boolean): number;
|
928
|
931
|
|
929
|
932
|
// Object
|
930
|
|
- assign(object?: ?Object, ...sources?: Array<Object>): Object;
|
|
933
|
+ assign(object?: ?Object, ...sources?: Array<?Object>): Object;
|
931
|
934
|
assignIn(): {};
|
932
|
935
|
assignIn<A, B>(a: A, b: B): A & B;
|
933
|
936
|
assignIn<A, B, C>(a: A, b: B, c: C): A & B & C;
|
|
@@ -1039,8 +1042,8 @@ declare module "lodash" {
|
1039
|
1042
|
at(object?: ?Object, paths: Array<string>): Array<any>;
|
1040
|
1043
|
create<T>(prototype: T, properties: Object): $Supertype<T>;
|
1041
|
1044
|
create(prototype: any, properties: void | null): {};
|
1042
|
|
- defaults(object?: ?Object, ...sources?: Array<Object>): Object;
|
1043
|
|
- defaultsDeep(object?: ?Object, ...sources?: Array<Object>): Object;
|
|
1045
|
+ defaults(object?: ?Object, ...sources?: Array<?Object>): Object;
|
|
1046
|
+ defaultsDeep(object?: ?Object, ...sources?: Array<?Object>): Object;
|
1044
|
1047
|
// alias for _.toPairs
|
1045
|
1048
|
entries(object?: ?Object): Array<[string, any]>;
|
1046
|
1049
|
// alias for _.toPairsIn
|
|
@@ -1128,8 +1131,8 @@ declare module "lodash" {
|
1128
|
1131
|
functions(object?: ?Object): Array<string>;
|
1129
|
1132
|
functionsIn(object?: ?Object): Array<string>;
|
1130
|
1133
|
get(
|
1131
|
|
- object?: ?Object | ?Array<any>,
|
1132
|
|
- path?: ?Array<string> | string,
|
|
1134
|
+ object?: ?Object | ?$ReadOnlyArray<any>,
|
|
1135
|
+ path?: ?$ReadOnlyArray<string> | string,
|
1133
|
1136
|
defaultValue?: any
|
1134
|
1137
|
): any;
|
1135
|
1138
|
has(object: Object, path: Array<string> | string): boolean;
|
|
@@ -1724,14 +1727,14 @@ declare module "lodash/fp" {
|
1724
|
1727
|
array: $ReadOnlyArray<T>
|
1725
|
1728
|
): number;
|
1726
|
1729
|
// alias of _.head
|
1727
|
|
- first<T>(array: Array<T>): T;
|
|
1730
|
+ first<T>(array: $ReadOnlyArray<T>): T;
|
1728
|
1731
|
flatten<T, X>(array: Array<Array<T> | X>): Array<T | X>;
|
1729
|
1732
|
unnest<T, X>(array: Array<Array<T> | X>): Array<T | X>;
|
1730
|
1733
|
flattenDeep<T>(array: any[]): Array<T>;
|
1731
|
1734
|
flattenDepth(depth: number): (array: any[]) => any[];
|
1732
|
1735
|
flattenDepth(depth: number, array: any[]): any[];
|
1733
|
1736
|
fromPairs<A, B>(pairs: Array<[A, B]>): { [key: A]: B };
|
1734
|
|
- head<T>(array: Array<T>): T;
|
|
1737
|
+ head<T>(array: $ReadOnlyArray<T>): T;
|
1735
|
1738
|
indexOf<T>(value: T): (array: Array<T>) => number;
|
1736
|
1739
|
indexOf<T>(value: T, array: Array<T>): number;
|
1737
|
1740
|
indexOfFrom<T>(
|
|
@@ -1995,18 +1998,18 @@ declare module "lodash/fp" {
|
1995
|
1998
|
// alias of _.forEach
|
1996
|
1999
|
each<T>(
|
1997
|
2000
|
iteratee: Iteratee<T> | OIteratee<T>
|
1998
|
|
- ): (collection: Array<T> | { [id: any]: T }) => Array<T>;
|
|
2001
|
+ ): (collection: $ReadOnlyArray<T> | { [id: any]: T }) => Array<T>;
|
1999
|
2002
|
each<T>(
|
2000
|
2003
|
iteratee: Iteratee<T> | OIteratee<T>,
|
2001
|
|
- collection: Array<T> | { [id: any]: T }
|
|
2004
|
+ collection: $ReadOnlyArray<T> | { [id: any]: T }
|
2002
|
2005
|
): Array<T>;
|
2003
|
2006
|
// alias of _.forEachRight
|
2004
|
2007
|
eachRight<T>(
|
2005
|
2008
|
iteratee: Iteratee<T> | OIteratee<T>
|
2006
|
|
- ): (collection: Array<T> | { [id: any]: T }) => Array<T>;
|
|
2009
|
+ ): (collection: $ReadOnlyArray<T> | { [id: any]: T }) => Array<T>;
|
2007
|
2010
|
eachRight<T>(
|
2008
|
2011
|
iteratee: Iteratee<T> | OIteratee<T>,
|
2009
|
|
- collection: Array<T> | { [id: any]: T }
|
|
2012
|
+ collection: $ReadOnlyArray<T> | { [id: any]: T }
|
2010
|
2013
|
): Array<T>;
|
2011
|
2014
|
every<T>(
|
2012
|
2015
|
iteratee: Iteratee<T> | OIteratee<T>
|
|
@@ -2110,17 +2113,17 @@ declare module "lodash/fp" {
|
2110
|
2113
|
): Array<U>;
|
2111
|
2114
|
forEach<T>(
|
2112
|
2115
|
iteratee: Iteratee<T> | OIteratee<T>
|
2113
|
|
- ): (collection: Array<T> | { [id: any]: T }) => Array<T>;
|
|
2116
|
+ ): (collection: $ReadOnlyArray<T> | { [id: any]: T }) => Array<T>;
|
2114
|
2117
|
forEach<T>(
|
2115
|
2118
|
iteratee: Iteratee<T> | OIteratee<T>,
|
2116
|
|
- collection: Array<T> | { [id: any]: T }
|
|
2119
|
+ collection: $ReadOnlyArray<T> | { [id: any]: T }
|
2117
|
2120
|
): Array<T>;
|
2118
|
2121
|
forEachRight<T>(
|
2119
|
2122
|
iteratee: Iteratee<T> | OIteratee<T>
|
2120
|
|
- ): (collection: Array<T> | { [id: any]: T }) => Array<T>;
|
|
2123
|
+ ): (collection: $ReadOnlyArray<T> | { [id: any]: T }) => Array<T>;
|
2121
|
2124
|
forEachRight<T>(
|
2122
|
2125
|
iteratee: Iteratee<T> | OIteratee<T>,
|
2123
|
|
- collection: Array<T> | { [id: any]: T }
|
|
2126
|
+ collection: $ReadOnlyArray<T> | { [id: any]: T }
|
2124
|
2127
|
): Array<T>;
|
2125
|
2128
|
groupBy<V, T>(
|
2126
|
2129
|
iteratee: ValueOnlyIteratee<T>
|
|
@@ -2275,7 +2278,7 @@ declare module "lodash/fp" {
|
2275
|
2278
|
): (collection: Array<T> | { [id: any]: T }) => Array<T>;
|
2276
|
2279
|
sampleSize<T>(n: number, collection: Array<T> | { [id: any]: T }): Array<T>;
|
2277
|
2280
|
shuffle<T>(collection: Array<T> | { [id: any]: T }): Array<T>;
|
2278
|
|
- size(collection: Array<any> | Object | string): number;
|
|
2281
|
+ size(collection: $ReadOnlyArray<any> | Object | string): number;
|
2279
|
2282
|
some<T>(
|
2280
|
2283
|
predicate: Predicate<T> | OPredicate<T>
|
2281
|
2284
|
): (collection: $ReadOnlyArray<T> | { [id: any]: T }) => boolean;
|
|
@@ -2768,8 +2771,8 @@ declare module "lodash/fp" {
|
2768
|
2771
|
forOwnRight(iteratee: OIteratee<*>, object: Object): Object;
|
2769
|
2772
|
functions(object: Object): Array<string>;
|
2770
|
2773
|
functionsIn(object: Object): Array<string>;
|
2771
|
|
- get(path: Array<string> | string): (object: Object | Array<any>) => any;
|
2772
|
|
- get(path: Array<string> | string, object: Object | Array<any>): any;
|
|
2774
|
+ get(path: $ReadOnlyArray<string> | string): (object: Object | $ReadOnlyArray<any>) => any;
|
|
2775
|
+ get(path: $ReadOnlyArray<string> | string, object: Object | $ReadOnlyArray<any>): any;
|
2773
|
2776
|
prop(path: Array<string> | string): (object: Object | Array<any>) => any;
|
2774
|
2777
|
prop(path: Array<string> | string, object: Object | Array<any>): any;
|
2775
|
2778
|
path(path: Array<string> | string): (object: Object | Array<any>) => any;
|