|
@@ -0,0 +1,514 @@
|
|
1
|
+// flow-typed signature: 4420d5c49e3270b55524360665da4981
|
|
2
|
+// flow-typed version: 9821eaaefe/lodash_v4.x.x/flow_>=v0.38.x <=v0.46.x
|
|
3
|
+
|
|
4
|
+declare module 'lodash' {
|
|
5
|
+ declare type TemplateSettings = {
|
|
6
|
+ escape?: RegExp,
|
|
7
|
+ evaluate?: RegExp,
|
|
8
|
+ imports?: Object,
|
|
9
|
+ interpolate?: RegExp,
|
|
10
|
+ variable?: string,
|
|
11
|
+ };
|
|
12
|
+
|
|
13
|
+ declare type TruncateOptions = {
|
|
14
|
+ length?: number,
|
|
15
|
+ omission?: string,
|
|
16
|
+ separator?: RegExp|string,
|
|
17
|
+ };
|
|
18
|
+
|
|
19
|
+ declare type DebounceOptions = {
|
|
20
|
+ leading?: bool,
|
|
21
|
+ maxWait?: number,
|
|
22
|
+ trailing?: bool,
|
|
23
|
+ };
|
|
24
|
+
|
|
25
|
+ declare type ThrottleOptions = {
|
|
26
|
+ leading?: bool,
|
|
27
|
+ trailing?: bool,
|
|
28
|
+ };
|
|
29
|
+
|
|
30
|
+ declare type NestedArray<T> = Array<Array<T>>;
|
|
31
|
+
|
|
32
|
+ declare type matchesIterateeShorthand = Object;
|
|
33
|
+ declare type matchesPropertyIterateeShorthand = [string, any];
|
|
34
|
+ declare type propertyIterateeShorthand = string;
|
|
35
|
+
|
|
36
|
+ declare type OPredicate<A, O> =
|
|
37
|
+ | ((value: A, key: string, object: O) => any)
|
|
38
|
+ | matchesIterateeShorthand
|
|
39
|
+ | matchesPropertyIterateeShorthand
|
|
40
|
+ | propertyIterateeShorthand;
|
|
41
|
+
|
|
42
|
+ declare type OIterateeWithResult<V, O, R> = Object|string|((value: V, key: string, object: O) => R);
|
|
43
|
+ declare type OIteratee<O> = OIterateeWithResult<any, O, any>;
|
|
44
|
+ declare type OFlatMapIteratee<T, U> = OIterateeWithResult<any, T, Array<U>>;
|
|
45
|
+
|
|
46
|
+ declare type Predicate<T> =
|
|
47
|
+ | ((value: T, index: number, array: Array<T>) => any)
|
|
48
|
+ | matchesIterateeShorthand
|
|
49
|
+ | matchesPropertyIterateeShorthand
|
|
50
|
+ | propertyIterateeShorthand;
|
|
51
|
+
|
|
52
|
+ declare type _ValueOnlyIteratee<T> = (value: T) => mixed;
|
|
53
|
+ declare type ValueOnlyIteratee<T> = _ValueOnlyIteratee<T>|string;
|
|
54
|
+ declare type _Iteratee<T> = (item: T, index: number, array: ?Array<T>) => mixed;
|
|
55
|
+ declare type Iteratee<T> = _Iteratee<T>|Object|string;
|
|
56
|
+ declare type FlatMapIteratee<T, U> = ((item: T, index: number, array: ?Array<T>) => Array<U>)|Object|string;
|
|
57
|
+ declare type Comparator<T> = (item: T, item2: T) => bool;
|
|
58
|
+
|
|
59
|
+ declare type MapIterator<T,U> =
|
|
60
|
+ | ((item: T, index: number, array: Array<T>) => U)
|
|
61
|
+ | propertyIterateeShorthand;
|
|
62
|
+
|
|
63
|
+ declare type OMapIterator<T,O,U> =
|
|
64
|
+ | ((item: T, key: string, object: O) => U)
|
|
65
|
+ | propertyIterateeShorthand;
|
|
66
|
+
|
|
67
|
+ declare class Lodash {
|
|
68
|
+ // Array
|
|
69
|
+ chunk<T>(array: ?Array<T>, size?: number): Array<Array<T>>;
|
|
70
|
+ compact<T,N:?T>(array: Array<N>): Array<T>;
|
|
71
|
+ concat<T>(base: Array<T>, ...elements: Array<any>): Array<T|any>;
|
|
72
|
+ difference<T>(array: ?Array<T>, values?: Array<T>): Array<T>;
|
|
73
|
+ differenceBy<T>(array: ?Array<T>, values: Array<T>, iteratee: ValueOnlyIteratee<T>): T[];
|
|
74
|
+ differenceWith<T>(array: T[], values: T[], comparator?: Comparator<T>): T[];
|
|
75
|
+ drop<T>(array: ?Array<T>, n?: number): Array<T>;
|
|
76
|
+ dropRight<T>(array: ?Array<T>, n?: number): Array<T>;
|
|
77
|
+ dropRightWhile<T>(array: ?Array<T>, predicate?: Predicate<T>): Array<T>;
|
|
78
|
+ dropWhile<T>(array: ?Array<T>, predicate?: Predicate<T>): Array<T>;
|
|
79
|
+ fill<T, U>(array: ?Array<T>, value: U, start?: number, end?: number): Array<T|U>;
|
|
80
|
+ findIndex<T>(array: ?Array<T>, predicate?: Predicate<T>): number;
|
|
81
|
+ findLastIndex<T>(array: ?Array<T>, predicate?: Predicate<T>): number;
|
|
82
|
+ // alias of _.head
|
|
83
|
+ first<T>(array: ?Array<T>): T;
|
|
84
|
+ flatten<T,X>(array: Array<Array<T>|X>): Array<T|X>;
|
|
85
|
+ flattenDeep<T>(array: any[]): Array<T>;
|
|
86
|
+ flattenDepth(array: any[], depth?: number): any[];
|
|
87
|
+ fromPairs<T>(pairs: Array<T>): Object;
|
|
88
|
+ head<T>(array: ?Array<T>): T;
|
|
89
|
+ indexOf<T>(array: ?Array<T>, value: T, fromIndex?: number): number;
|
|
90
|
+ initial<T>(array: ?Array<T>): Array<T>;
|
|
91
|
+ intersection<T>(...arrays: Array<Array<T>>): Array<T>;
|
|
92
|
+ //Workaround until (...parameter: T, parameter2: U) works
|
|
93
|
+ intersectionBy<T>(a1: Array<T>, iteratee?: ValueOnlyIteratee<T>): Array<T>;
|
|
94
|
+ intersectionBy<T>(a1: Array<T>, a2: Array<T>, iteratee?: ValueOnlyIteratee<T>): Array<T>;
|
|
95
|
+ intersectionBy<T>(a1: Array<T>, a2: Array<T>, a3: Array<T>, iteratee?: ValueOnlyIteratee<T>): Array<T>;
|
|
96
|
+ intersectionBy<T>(a1: Array<T>, a2: Array<T>, a3: Array<T>, a4: Array<T>, iteratee?: ValueOnlyIteratee<T>): Array<T>;
|
|
97
|
+ //Workaround until (...parameter: T, parameter2: U) works
|
|
98
|
+ intersectionWith<T>(a1: Array<T>, comparator: Comparator<T>): Array<T>;
|
|
99
|
+ intersectionWith<T>(a1: Array<T>, a2: Array<T>, comparator: Comparator<T>): Array<T>;
|
|
100
|
+ intersectionWith<T>(a1: Array<T>, a2: Array<T>, a3: Array<T>, comparator: Comparator<T>): Array<T>;
|
|
101
|
+ intersectionWith<T>(a1: Array<T>, a2: Array<T>, a3: Array<T>, a4: Array<T>, comparator: Comparator<T>): Array<T>;
|
|
102
|
+ join<T>(array: ?Array<T>, separator?: string): string;
|
|
103
|
+ last<T>(array: ?Array<T>): T;
|
|
104
|
+ lastIndexOf<T>(array: ?Array<T>, value: T, fromIndex?: number): number;
|
|
105
|
+ nth<T>(array: T[], n?: number): T;
|
|
106
|
+ pull<T>(array: ?Array<T>, ...values?: Array<T>): Array<T>;
|
|
107
|
+ pullAll<T>(array: ?Array<T>, values: Array<T>): Array<T>;
|
|
108
|
+ pullAllBy<T>(array: ?Array<T>, values: Array<T>, iteratee?: ValueOnlyIteratee<T>): Array<T>;
|
|
109
|
+ pullAllWith<T>(array?: T[], values: T[], comparator?: Function): T[];
|
|
110
|
+ pullAt<T>(array: ?Array<T>, ...indexed?: Array<number>): Array<T>;
|
|
111
|
+ pullAt<T>(array: ?Array<T>, indexed?: Array<number>): Array<T>;
|
|
112
|
+ remove<T>(array: ?Array<T>, predicate?: Predicate<T>): Array<T>;
|
|
113
|
+ reverse<T>(array: ?Array<T>): Array<T>;
|
|
114
|
+ slice<T>(array: ?Array<T>, start?: number, end?: number): Array<T>;
|
|
115
|
+ sortedIndex<T>(array: ?Array<T>, value: T): number;
|
|
116
|
+ sortedIndexBy<T>(array: ?Array<T>, value: T, iteratee?: ValueOnlyIteratee<T>): number;
|
|
117
|
+ sortedIndexOf<T>(array: ?Array<T>, value: T): number;
|
|
118
|
+ sortedLastIndex<T>(array: ?Array<T>, value: T): number;
|
|
119
|
+ sortedLastIndexBy<T>(array: ?Array<T>, value: T, iteratee?: ValueOnlyIteratee<T>): number;
|
|
120
|
+ sortedLastIndexOf<T>(array: ?Array<T>, value: T): number;
|
|
121
|
+ sortedUniq<T>(array: ?Array<T>): Array<T>;
|
|
122
|
+ sortedUniqBy<T>(array: ?Array<T>, iteratee?: (value: T) => mixed): Array<T>;
|
|
123
|
+ tail<T>(array: ?Array<T>): Array<T>;
|
|
124
|
+ take<T>(array: ?Array<T>, n?: number): Array<T>;
|
|
125
|
+ takeRight<T>(array: ?Array<T>, n?: number): Array<T>;
|
|
126
|
+ takeRightWhile<T>(array: ?Array<T>, predicate?: Predicate<T>): Array<T>;
|
|
127
|
+ takeWhile<T>(array: ?Array<T>, predicate?: Predicate<T>): Array<T>;
|
|
128
|
+ union<T>(...arrays?: Array<Array<T>>): Array<T>;
|
|
129
|
+ //Workaround until (...parameter: T, parameter2: U) works
|
|
130
|
+ unionBy<T>(a1: Array<T>, iteratee?: ValueOnlyIteratee<T>): Array<T>;
|
|
131
|
+ unionBy<T>(a1: Array<T>, a2: Array<T>, iteratee?: ValueOnlyIteratee<T>): Array<T>;
|
|
132
|
+ unionBy<T>(a1: Array<T>, a2: Array<T>, a3: Array<T>, iteratee?: ValueOnlyIteratee<T>): Array<T>;
|
|
133
|
+ unionBy<T>(a1: Array<T>, a2: Array<T>, a3: Array<T>, a4: Array<T>, iteratee?: ValueOnlyIteratee<T>): Array<T>;
|
|
134
|
+ //Workaround until (...parameter: T, parameter2: U) works
|
|
135
|
+ unionWith<T>(a1: Array<T>, comparator?: Comparator<T>): Array<T>;
|
|
136
|
+ unionWith<T>(a1: Array<T>, a2: Array<T>, comparator?: Comparator<T>): Array<T>;
|
|
137
|
+ unionWith<T>(a1: Array<T>, a2: Array<T>, a3: Array<T>, comparator?: Comparator<T>): Array<T>;
|
|
138
|
+ unionWith<T>(a1: Array<T>, a2: Array<T>, a3: Array<T>, a4: Array<T>, comparator?: Comparator<T>): Array<T>;
|
|
139
|
+ uniq<T>(array: ?Array<T>): Array<T>;
|
|
140
|
+ uniqBy<T>(array: ?Array<T>, iteratee?: ValueOnlyIteratee<T>): Array<T>;
|
|
141
|
+ uniqWith<T>(array: ?Array<T>, comparator?: Comparator<T>): Array<T>;
|
|
142
|
+ unzip<T>(array: ?Array<T>): Array<T>;
|
|
143
|
+ unzipWith<T>(array: ?Array<T>, iteratee?: Iteratee<T>): Array<T>;
|
|
144
|
+ without<T>(array: ?Array<T>, ...values?: Array<T>): Array<T>;
|
|
145
|
+ xor<T>(...array: Array<Array<T>>): Array<T>;
|
|
146
|
+ //Workaround until (...parameter: T, parameter2: U) works
|
|
147
|
+ xorBy<T>(a1: Array<T>, iteratee?: ValueOnlyIteratee<T>): Array<T>;
|
|
148
|
+ xorBy<T>(a1: Array<T>, a2: Array<T>, iteratee?: ValueOnlyIteratee<T>): Array<T>;
|
|
149
|
+ xorBy<T>(a1: Array<T>, a2: Array<T>, a3: Array<T>, iteratee?: ValueOnlyIteratee<T>): Array<T>;
|
|
150
|
+ xorBy<T>(a1: Array<T>, a2: Array<T>, a3: Array<T>, a4: Array<T>, iteratee?: ValueOnlyIteratee<T>): Array<T>;
|
|
151
|
+ //Workaround until (...parameter: T, parameter2: U) works
|
|
152
|
+ xorWith<T>(a1: Array<T>, comparator?: Comparator<T>): Array<T>;
|
|
153
|
+ xorWith<T>(a1: Array<T>, a2: Array<T>, comparator?: Comparator<T>): Array<T>;
|
|
154
|
+ xorWith<T>(a1: Array<T>, a2: Array<T>, a3: Array<T>, comparator?: Comparator<T>): Array<T>;
|
|
155
|
+ xorWith<T>(a1: Array<T>, a2: Array<T>, a3: Array<T>, a4: Array<T>, comparator?: Comparator<T>): Array<T>;
|
|
156
|
+ zip<A, B>(a1: A[], a2: B[]): Array<[A, B]>;
|
|
157
|
+ zip<A, B, C>(a1: A[], a2: B[], a3: C[]): Array<[A, B, C]>;
|
|
158
|
+ zip<A, B, C, D>(a1: A[], a2: B[], a3: C[], a4: D[]): Array<[A, B, C, D]>;
|
|
159
|
+ zip<A, B, C, D, E>(a1: A[], a2: B[], a3: C[], a4: D[], a5: E[]): Array<[A, B, C, D, E]>;
|
|
160
|
+
|
|
161
|
+ zipObject(props?: Array<any>, values?: Array<any>): Object;
|
|
162
|
+ zipObjectDeep(props?: any[], values?: any): Object;
|
|
163
|
+ //Workaround until (...parameter: T, parameter2: U) works
|
|
164
|
+ zipWith<T>(a1: NestedArray<T>, iteratee?: Iteratee<T>): Array<T>;
|
|
165
|
+ zipWith<T>(a1: NestedArray<T>, a2: NestedArray<T>, iteratee?: Iteratee<T>): Array<T>;
|
|
166
|
+ zipWith<T>(a1: NestedArray<T>, a2: NestedArray<T>, a3: NestedArray<T>, iteratee?: Iteratee<T>): Array<T>;
|
|
167
|
+ zipWith<T>(a1: NestedArray<T>, a2: NestedArray<T>, a3: NestedArray<T>, a4: NestedArray<T>, iteratee?: Iteratee<T>): Array<T>;
|
|
168
|
+
|
|
169
|
+ // Collection
|
|
170
|
+ countBy<T>(array: ?Array<T>, iteratee?: ValueOnlyIteratee<T>): Object;
|
|
171
|
+ countBy<T: Object>(object: T, iteratee?: ValueOnlyIteratee<T>): Object;
|
|
172
|
+ // alias of _.forEach
|
|
173
|
+ each<T>(array: ?Array<T>, iteratee?: Iteratee<T>): Array<T>;
|
|
174
|
+ each<T: Object>(object: T, iteratee?: OIteratee<T>): T;
|
|
175
|
+ // alias of _.forEachRight
|
|
176
|
+ eachRight<T>(array: ?Array<T>, iteratee?: Iteratee<T>): Array<T>;
|
|
177
|
+ eachRight<T: Object>(object: T, iteratee?: OIteratee<T>): T;
|
|
178
|
+ every<T>(array: ?Array<T>, iteratee?: Iteratee<T>): bool;
|
|
179
|
+ every<T: Object>(object: T, iteratee?: OIteratee<T>): bool;
|
|
180
|
+ filter<T>(array: ?Array<T>, predicate?: Predicate<T>): Array<T>;
|
|
181
|
+ filter<A, T: {[id: string]: A}>(object: T, predicate?: OPredicate<A, T>): Array<A>;
|
|
182
|
+ find<T>(array: ?Array<T>, predicate?: Predicate<T>, fromIndex?: number): T|void;
|
|
183
|
+ find<V, A, T: {[id: string]: A}>(object: T, predicate?: OPredicate<A, T>, fromIndex?: number): V;
|
|
184
|
+ findLast<T>(array: ?Array<T>, predicate?: Predicate<T>, fromIndex?: number): T|void;
|
|
185
|
+ findLast<V, A, T: {[id: string]: A}>(object: T, predicate?: OPredicate<A, T>, fromIndex?: number): V;
|
|
186
|
+ flatMap<T, U>(array: ?Array<T>, iteratee?: FlatMapIteratee<T, U>): Array<U>;
|
|
187
|
+ flatMap<T: Object, U>(object: T, iteratee?: OFlatMapIteratee<T, U>): Array<U>;
|
|
188
|
+ flatMapDeep<T, U>(array: ?Array<T>, iteratee?: FlatMapIteratee<T, U>): Array<U>;
|
|
189
|
+ flatMapDeep<T: Object, U>(object: T, iteratee?: OFlatMapIteratee<T, U>): Array<U>;
|
|
190
|
+ flatMapDepth<T, U>(array: ?Array<T>, iteratee?: FlatMapIteratee<T, U>, depth?: number): Array<U>;
|
|
191
|
+ flatMapDepth<T: Object, U>(object: T, iteratee?: OFlatMapIteratee<T, U>, depth?: number): Array<U>;
|
|
192
|
+ forEach<T>(array: ?Array<T>, iteratee?: Iteratee<T>): Array<T>;
|
|
193
|
+ forEach<T: Object>(object: T, iteratee?: OIteratee<T>): T;
|
|
194
|
+ forEachRight<T>(array: ?Array<T>, iteratee?: Iteratee<T>): Array<T>;
|
|
195
|
+ forEachRight<T: Object>(object: T, iteratee?: OIteratee<T>): T;
|
|
196
|
+ groupBy<V, T>(array: ?Array<T>, iteratee?: ValueOnlyIteratee<T>): {[key: V]: Array<T>};
|
|
197
|
+ groupBy<V, A, T: {[id: string]: A}>(object: T, iteratee?: ValueOnlyIteratee<A>): {[key: V]: Array<A>};
|
|
198
|
+ includes<T>(array: ?Array<T>, value: T, fromIndex?: number): bool;
|
|
199
|
+ includes<T: Object>(object: T, value: any, fromIndex?: number): bool;
|
|
200
|
+ includes(str: string, value: string, fromIndex?: number): bool;
|
|
201
|
+ invokeMap<T>(array: ?Array<T>, path: ((value: T) => Array<string>|string)|Array<string>|string, ...args?: Array<any>): Array<any>;
|
|
202
|
+ invokeMap<T: Object>(object: T, path: ((value: any) => Array<string>|string)|Array<string>|string, ...args?: Array<any>): Array<any>;
|
|
203
|
+ keyBy<T, V>(array: ?Array<T>, iteratee?: ValueOnlyIteratee<T>): {[key: V]: ?T};
|
|
204
|
+ keyBy<V, A, T: {[id: string]: A}>(object: T, iteratee?: ValueOnlyIteratee<A>): {[key: V]: ?A};
|
|
205
|
+ map<T, U>(array: ?Array<T>, iteratee?: MapIterator<T, U>): Array<U>;
|
|
206
|
+ map<V, T: Object, U>(object: ?T, iteratee?: OMapIterator<V, T, U>): Array<U>;
|
|
207
|
+ map(str: ?string, iteratee?: (char: string, index: number, str: string) => any): string;
|
|
208
|
+ orderBy<T>(array: ?Array<T>, iteratees?: Array<Iteratee<T>>|string, orders?: Array<'asc'|'desc'>|string): Array<T>;
|
|
209
|
+ orderBy<V, T: Object>(object: T, iteratees?: Array<OIteratee<*>>|string, orders?: Array<'asc'|'desc'>|string): Array<V>;
|
|
210
|
+ partition<T>(array: ?Array<T>, predicate?: Predicate<T>): NestedArray<T>;
|
|
211
|
+ partition<V, A, T: {[id: string]: A}>(object: T, predicate?: OPredicate<A, T>): NestedArray<V>;
|
|
212
|
+ reduce<T, U>(array: ?Array<T>, iteratee?: (accumulator: U, value: T, index: number, array: ?Array<T>) => U, accumulator?: U): U;
|
|
213
|
+ reduce<T: Object, U>(object: T, iteratee?: (accumulator: U, value: any, key: string, object: T) => U, accumulator?: U): U;
|
|
214
|
+ reduceRight<T, U>(array: ?Array<T>, iteratee?: (accumulator: U, value: T, index: number, array: ?Array<T>) => U, accumulator?: U): U;
|
|
215
|
+ reduceRight<T: Object, U>(object: T, iteratee?: (accumulator: U, value: any, key: string, object: T) => U, accumulator?: U): U;
|
|
216
|
+ reject<T>(array: ?Array<T>, predicate?: Predicate<T>): Array<T>;
|
|
217
|
+ reject<V: Object, A, T: {[id: string]: A}>(object: T, predicate?: OPredicate<A, T>): Array<V>;
|
|
218
|
+ sample<T>(array: ?Array<T>): T;
|
|
219
|
+ sample<V, T: Object>(object: T): V;
|
|
220
|
+ sampleSize<T>(array: ?Array<T>, n?: number): Array<T>;
|
|
221
|
+ sampleSize<V, T: Object>(object: T, n?: number): Array<V>;
|
|
222
|
+ shuffle<T>(array: ?Array<T>): Array<T>;
|
|
223
|
+ shuffle<V, T: Object>(object: T): Array<V>;
|
|
224
|
+ size(collection: Array<any>|Object): number;
|
|
225
|
+ some<T>(array: ?Array<T>, predicate?: Predicate<T>): bool;
|
|
226
|
+ some<A, T: {[id: string]: A}>(object?: ?T, predicate?: OPredicate<A, T>): bool;
|
|
227
|
+ sortBy<T>(array: ?Array<T>, ...iteratees?: Array<Iteratee<T>>): Array<T>;
|
|
228
|
+ sortBy<T>(array: ?Array<T>, iteratees?: Array<Iteratee<T>>): Array<T>;
|
|
229
|
+ sortBy<V, T: Object>(object: T, ...iteratees?: Array<OIteratee<T>>): Array<V>;
|
|
230
|
+ sortBy<V, T: Object>(object: T, iteratees?: Array<OIteratee<T>>): Array<V>;
|
|
231
|
+
|
|
232
|
+ // Date
|
|
233
|
+ now(): number;
|
|
234
|
+
|
|
235
|
+ // Function
|
|
236
|
+ after(n: number, fn: Function): Function;
|
|
237
|
+ ary(func: Function, n?: number): Function;
|
|
238
|
+ before(n: number, fn: Function): Function;
|
|
239
|
+ bind(func: Function, thisArg: any, ...partials: Array<any>): Function;
|
|
240
|
+ bindKey(obj: Object, key: string, ...partials: Array<any>): Function;
|
|
241
|
+ curry(func: Function, arity?: number): Function;
|
|
242
|
+ curryRight(func: Function, arity?: number): Function;
|
|
243
|
+ debounce(func: Function, wait?: number, options?: DebounceOptions): Function;
|
|
244
|
+ defer(func: Function, ...args?: Array<any>): number;
|
|
245
|
+ delay(func: Function, wait: number, ...args?: Array<any>): number;
|
|
246
|
+ flip(func: Function): Function;
|
|
247
|
+ memoize(func: Function, resolver?: Function): Function;
|
|
248
|
+ negate(predicate: Function): Function;
|
|
249
|
+ once(func: Function): Function;
|
|
250
|
+ overArgs(func: Function, ...transforms: Array<Function>): Function;
|
|
251
|
+ overArgs(func: Function, transforms: Array<Function>): Function;
|
|
252
|
+ partial(func: Function, ...partials: any[]): Function;
|
|
253
|
+ partialRight(func: Function, ...partials: Array<any>): Function;
|
|
254
|
+ partialRight(func: Function, partials: Array<any>): Function;
|
|
255
|
+ rearg(func: Function, ...indexes: Array<number>): Function;
|
|
256
|
+ rearg(func: Function, indexes: Array<number>): Function;
|
|
257
|
+ rest(func: Function, start?: number): Function;
|
|
258
|
+ spread(func: Function): Function;
|
|
259
|
+ throttle(func: Function, wait?: number, options?: ThrottleOptions): Function;
|
|
260
|
+ unary(func: Function): Function;
|
|
261
|
+ wrap(value: any, wrapper: Function): Function;
|
|
262
|
+
|
|
263
|
+ // Lang
|
|
264
|
+ castArray(value: *): any[];
|
|
265
|
+ clone<T>(value: T): T;
|
|
266
|
+ cloneDeep<T>(value: T): T;
|
|
267
|
+ cloneDeepWith<T, U>(value: T, customizer?: ?(value: T, key: number|string, object: T, stack: any) => U): U;
|
|
268
|
+ cloneWith<T, U>(value: T, customizer?: ?(value: T, key: number|string, object: T, stack: any) => U): U;
|
|
269
|
+ conformsTo<T:{[key:string]:mixed}>(source: T, predicates: T&{[key:string]:(x:any)=>boolean}): boolean;
|
|
270
|
+ eq(value: any, other: any): bool;
|
|
271
|
+ gt(value: any, other: any): bool;
|
|
272
|
+ gte(value: any, other: any): bool;
|
|
273
|
+ isArguments(value: any): bool;
|
|
274
|
+ isArray(value: any): bool;
|
|
275
|
+ isArrayBuffer(value: any): bool;
|
|
276
|
+ isArrayLike(value: any): bool;
|
|
277
|
+ isArrayLikeObject(value: any): bool;
|
|
278
|
+ isBoolean(value: any): bool;
|
|
279
|
+ isBuffer(value: any): bool;
|
|
280
|
+ isDate(value: any): bool;
|
|
281
|
+ isElement(value: any): bool;
|
|
282
|
+ isEmpty(value: any): bool;
|
|
283
|
+ isEqual(value: any, other: any): bool;
|
|
284
|
+ isEqualWith<T, U>(value: T, other: U, customizer?: (objValue: any, otherValue: any, key: number|string, object: T, other: U, stack: any) => bool|void): bool;
|
|
285
|
+ isError(value: any): bool;
|
|
286
|
+ isFinite(value: any): bool;
|
|
287
|
+ isFunction(value: Function): true;
|
|
288
|
+ isFunction(value: number|string|void|null|Object): false;
|
|
289
|
+ isInteger(value: any): bool;
|
|
290
|
+ isLength(value: any): bool;
|
|
291
|
+ isMap(value: any): bool;
|
|
292
|
+ isMatch(object?: ?Object, source: Object): bool;
|
|
293
|
+ isMatchWith<T: Object, U: Object>(object: T, source: U, customizer?: (objValue: any, srcValue: any, key: number|string, object: T, source: U) => bool|void): bool;
|
|
294
|
+ isNaN(value: any): bool;
|
|
295
|
+ isNative(value: any): bool;
|
|
296
|
+ isNil(value: any): bool;
|
|
297
|
+ isNull(value: any): bool;
|
|
298
|
+ isNumber(value: any): bool;
|
|
299
|
+ isObject(value: any): bool;
|
|
300
|
+ isObjectLike(value: any): bool;
|
|
301
|
+ isPlainObject(value: any): bool;
|
|
302
|
+ isRegExp(value: any): bool;
|
|
303
|
+ isSafeInteger(value: any): bool;
|
|
304
|
+ isSet(value: any): bool;
|
|
305
|
+ isString(value: string): true;
|
|
306
|
+ isString(value: number|bool|Function|void|null|Object|Array<any>): false;
|
|
307
|
+ isSymbol(value: any): bool;
|
|
308
|
+ isTypedArray(value: any): bool;
|
|
309
|
+ isUndefined(value: any): bool;
|
|
310
|
+ isWeakMap(value: any): bool;
|
|
311
|
+ isWeakSet(value: any): bool;
|
|
312
|
+ lt(value: any, other: any): bool;
|
|
313
|
+ lte(value: any, other: any): bool;
|
|
314
|
+ toArray(value: any): Array<any>;
|
|
315
|
+ toFinite(value: any): number;
|
|
316
|
+ toInteger(value: any): number;
|
|
317
|
+ toLength(value: any): number;
|
|
318
|
+ toNumber(value: any): number;
|
|
319
|
+ toPlainObject(value: any): Object;
|
|
320
|
+ toSafeInteger(value: any): number;
|
|
321
|
+ toString(value: any): string;
|
|
322
|
+
|
|
323
|
+ // Math
|
|
324
|
+ add(augend: number, addend: number): number;
|
|
325
|
+ ceil(number: number, precision?: number): number;
|
|
326
|
+ divide(dividend: number, divisor: number): number;
|
|
327
|
+ floor(number: number, precision?: number): number;
|
|
328
|
+ max<T>(array: ?Array<T>): T;
|
|
329
|
+ maxBy<T>(array: ?Array<T>, iteratee?: Iteratee<T>): T;
|
|
330
|
+ mean(array: Array<*>): number;
|
|
331
|
+ meanBy<T>(array: Array<T>, iteratee?: Iteratee<T>): number;
|
|
332
|
+ min<T>(array: ?Array<T>): T;
|
|
333
|
+ minBy<T>(array: ?Array<T>, iteratee?: Iteratee<T>): T;
|
|
334
|
+ multiply(multiplier: number, multiplicand: number): number;
|
|
335
|
+ round(number: number, precision?: number): number;
|
|
336
|
+ subtract(minuend: number, subtrahend: number): number;
|
|
337
|
+ sum(array: Array<*>): number;
|
|
338
|
+ sumBy<T>(array: Array<T>, iteratee?: Iteratee<T>): number;
|
|
339
|
+
|
|
340
|
+ // number
|
|
341
|
+ clamp(number: number, lower?: number, upper: number): number;
|
|
342
|
+ inRange(number: number, start?: number, end: number): bool;
|
|
343
|
+ random(lower?: number, upper?: number, floating?: bool): number;
|
|
344
|
+
|
|
345
|
+ // Object
|
|
346
|
+ assign(object?: ?Object, ...sources?: Array<Object>): Object;
|
|
347
|
+ assignIn<A, B>(a: A, b: B): A & B;
|
|
348
|
+ assignIn<A, B, C>(a: A, b: B, c: C): A & B & C;
|
|
349
|
+ assignIn<A, B, C, D>(a: A, b: B, c: C, d: D): A & B & C & D;
|
|
350
|
+ assignIn<A, B, C, D, E>(a: A, b: B, c: C, d: D, e: E): A & B & C & D & E;
|
|
351
|
+ assignInWith<T: Object, A: Object>(object: T, s1: A, customizer?: (objValue: any, srcValue: any, key: string, object: T, source: A) => any|void): Object;
|
|
352
|
+ assignInWith<T: Object, A: Object, B: Object>(object: T, s1: A, s2: B, customizer?: (objValue: any, srcValue: any, key: string, object: T, source: A|B) => any|void): Object;
|
|
353
|
+ assignInWith<T: Object, A: Object, B: Object, C: Object>(object: T, s1: A, s2: B, s3: C, customizer?: (objValue: any, srcValue: any, key: string, object: T, source: A|B|C) => any|void): Object;
|
|
354
|
+ assignInWith<T: Object, A: Object, B: Object, C: Object, D: Object>(object: T, s1: A, s2: B, s3: C, s4: D, customizer?: (objValue: any, srcValue: any, key: string, object: T, source: A|B|C|D) => any|void): Object;
|
|
355
|
+ assignWith<T: Object, A: Object>(object: T, s1: A, customizer?: (objValue: any, srcValue: any, key: string, object: T, source: A) => any|void): Object;
|
|
356
|
+ assignWith<T: Object, A: Object, B: Object>(object: T, s1: A, s2: B, customizer?: (objValue: any, srcValue: any, key: string, object: T, source: A|B) => any|void): Object;
|
|
357
|
+ assignWith<T: Object, A: Object, B: Object, C: Object>(object: T, s1: A, s2: B, s3: C, customizer?: (objValue: any, srcValue: any, key: string, object: T, source: A|B|C) => any|void): Object;
|
|
358
|
+ assignWith<T: Object, A: Object, B: Object, C: Object, D: Object>(object: T, s1: A, s2: B, s3: C, s4: D, customizer?: (objValue: any, srcValue: any, key: string, object: T, source: A|B|C|D) => any|void): Object;
|
|
359
|
+ at(object?: ?Object, ...paths: Array<string>): Array<any>;
|
|
360
|
+ at(object?: ?Object, paths: Array<string>): Array<any>;
|
|
361
|
+ create<T>(prototype: T, properties?: Object): $Supertype<T>;
|
|
362
|
+ defaults(object?: ?Object, ...sources?: Array<Object>): Object;
|
|
363
|
+ defaultsDeep(object?: ?Object, ...sources?: Array<Object>): Object;
|
|
364
|
+ // alias for _.toPairs
|
|
365
|
+ entries(object?: ?Object): NestedArray<any>;
|
|
366
|
+ // alias for _.toPairsIn
|
|
367
|
+ entriesIn(object?: ?Object): NestedArray<any>;
|
|
368
|
+ // alias for _.assignIn
|
|
369
|
+ extend<A, B>(a: A, b: B): A & B;
|
|
370
|
+ extend<A, B, C>(a: A, b: B, c: C): A & B & C;
|
|
371
|
+ extend<A, B, C, D>(a: A, b: B, c: C, d: D): A & B & C & D;
|
|
372
|
+ extend<A, B, C, D, E>(a: A, b: B, c: C, d: D, e: E): A & B & C & D & E;
|
|
373
|
+ // alias for _.assignInWith
|
|
374
|
+ extendWith<T: Object, A: Object>(object: T, s1: A, customizer?: (objValue: any, srcValue: any, key: string, object: T, source: A) => any|void): Object;
|
|
375
|
+ extendWith<T: Object, A: Object, B: Object>(object: T, s1: A, s2: B, customizer?: (objValue: any, srcValue: any, key: string, object: T, source: A|B) => any|void): Object;
|
|
376
|
+ extendWith<T: Object, A: Object, B: Object, C: Object>(object: T, s1: A, s2: B, s3: C, customizer?: (objValue: any, srcValue: any, key: string, object: T, source: A|B|C) => any|void): Object;
|
|
377
|
+ extendWith<T: Object, A: Object, B: Object, C: Object, D: Object>(object: T, s1: A, s2: B, s3: C, s4: D, customizer?: (objValue: any, srcValue: any, key: string, object: T, source: A|B|C|D) => any|void): Object;
|
|
378
|
+ findKey<A, T: {[id: string]: A}>(object?: ?T, predicate?: OPredicate<A, T>): string|void;
|
|
379
|
+ findLastKey<A, T: {[id: string]: A}>(object?: ?T, predicate?: OPredicate<A, T>): string|void;
|
|
380
|
+ forIn(object?: ?Object, iteratee?: OIteratee<*>): Object;
|
|
381
|
+ forInRight(object?: ?Object, iteratee?: OIteratee<*>): Object;
|
|
382
|
+ forOwn(object?: ?Object, iteratee?: OIteratee<*>): Object;
|
|
383
|
+ forOwnRight(object?: ?Object, iteratee?: OIteratee<*>): Object;
|
|
384
|
+ functions(object?: ?Object): Array<string>;
|
|
385
|
+ functionsIn(object?: ?Object): Array<string>;
|
|
386
|
+ get(object?: ?Object|?Array<any>, path?: ?Array<string>|string, defaultValue?: any): any;
|
|
387
|
+ has(object?: ?Object, path?: ?Array<string>|string): bool;
|
|
388
|
+ hasIn(object?: ?Object, path?: ?Array<string>|string): bool;
|
|
389
|
+ invert(object?: ?Object, multiVal?: bool): Object;
|
|
390
|
+ invertBy(object: ?Object, iteratee?: Function): Object;
|
|
391
|
+ invoke(object?: ?Object, path?: ?Array<string>|string, ...args?: Array<any>): any;
|
|
392
|
+ keys(object?: ?Object): Array<string>;
|
|
393
|
+ keysIn(object?: ?Object): Array<string>;
|
|
394
|
+ mapKeys(object?: ?Object, iteratee?: OIteratee<*>): Object;
|
|
395
|
+ mapValues(object?: ?Object, iteratee?: OIteratee<*>): Object;
|
|
396
|
+ merge(object?: ?Object, ...sources?: Array<?Object>): Object;
|
|
397
|
+ mergeWith<T: Object, A: Object>(object: T, customizer?: (objValue: any, srcValue: any, key: string, object: T, source: A) => any|void): Object;
|
|
398
|
+ mergeWith<T: Object, A: Object, B: Object>(object: T, s1: A, s2: B, customizer?: (objValue: any, srcValue: any, key: string, object: T, source: A|B) => any|void): Object;
|
|
399
|
+ mergeWith<T: Object, A: Object, B: Object, C: Object>(object: T, s1: A, s2: B, s3: C, customizer?: (objValue: any, srcValue: any, key: string, object: T, source: A|B|C) => any|void): Object;
|
|
400
|
+ mergeWith<T: Object, A: Object, B: Object, C: Object, D: Object>(object: T, s1: A, s2: B, s3: C, s4: D, customizer?: (objValue: any, srcValue: any, key: string, object: T, source: A|B|C|D) => any|void): Object;
|
|
401
|
+ omit(object?: ?Object, ...props: Array<string>): Object;
|
|
402
|
+ omit(object?: ?Object, props: Array<string>): Object;
|
|
403
|
+ omitBy<A, T: {[id: string]: A}>(object?: ?T, predicate?: OPredicate<A, T>): Object;
|
|
404
|
+ pick(object?: ?Object, ...props: Array<string>): Object;
|
|
405
|
+ pick(object?: ?Object, props: Array<string>): Object;
|
|
406
|
+ pickBy<A, T: {[id: string]: A}>(object?: ?T, predicate?: OPredicate<A, T>): Object;
|
|
407
|
+ result(object?: ?Object, path?: ?Array<string>|string, defaultValue?: any): any;
|
|
408
|
+ set(object?: ?Object, path?: ?Array<string>|string, value: any): Object;
|
|
409
|
+ setWith<T>(object: T, path?: ?Array<string>|string, value: any, customizer?: (nsValue: any, key: string, nsObject: T) => any): Object;
|
|
410
|
+ toPairs(object?: ?Object|Array<*>): NestedArray<any>;
|
|
411
|
+ toPairsIn(object?: ?Object): NestedArray<any>;
|
|
412
|
+ transform(collection: Object|Array<any>, iteratee?: OIteratee<*>, accumulator?: any): any;
|
|
413
|
+ unset(object?: ?Object, path?: ?Array<string>|string): bool;
|
|
414
|
+ update(object: Object, path: string[]|string, updater: Function): Object;
|
|
415
|
+ updateWith(object: Object, path: string[]|string, updater: Function, customizer?: Function): Object;
|
|
416
|
+ values(object?: ?Object): Array<any>;
|
|
417
|
+ valuesIn(object?: ?Object): Array<any>;
|
|
418
|
+
|
|
419
|
+ // Seq
|
|
420
|
+ // harder to read, but this is _()
|
|
421
|
+ (value: any): any;
|
|
422
|
+ chain<T>(value: T): any;
|
|
423
|
+ tap<T>(value: T, interceptor: (value:T)=>any): T;
|
|
424
|
+ thru<T1,T2>(value: T1, interceptor: (value:T1)=>T2): T2;
|
|
425
|
+ // TODO: _.prototype.*
|
|
426
|
+
|
|
427
|
+ // String
|
|
428
|
+ camelCase(string?: ?string): string;
|
|
429
|
+ capitalize(string?: string): string;
|
|
430
|
+ deburr(string?: string): string;
|
|
431
|
+ endsWith(string?: string, target?: string, position?: number): bool;
|
|
432
|
+ escape(string?: string): string;
|
|
433
|
+ escapeRegExp(string?: string): string;
|
|
434
|
+ kebabCase(string?: string): string;
|
|
435
|
+ lowerCase(string?: string): string;
|
|
436
|
+ lowerFirst(string?: string): string;
|
|
437
|
+ pad(string?: string, length?: number, chars?: string): string;
|
|
438
|
+ padEnd(string?: string, length?: number, chars?: string): string;
|
|
439
|
+ padStart(string?: string, length?: number, chars?: string): string;
|
|
440
|
+ parseInt(string: string, radix?: number): number;
|
|
441
|
+ repeat(string?: string, n?: number): string;
|
|
442
|
+ replace(string?: string, pattern: RegExp|string, replacement: ((string: string) => string)|string): string;
|
|
443
|
+ snakeCase(string?: string): string;
|
|
444
|
+ split(string?: string, separator: RegExp|string, limit?: number): Array<string>;
|
|
445
|
+ startCase(string?: string): string;
|
|
446
|
+ startsWith(string?: string, target?: string, position?: number): bool;
|
|
447
|
+ template(string?: string, options?: TemplateSettings): Function;
|
|
448
|
+ toLower(string?: string): string;
|
|
449
|
+ toUpper(string?: string): string;
|
|
450
|
+ trim(string?: string, chars?: string): string;
|
|
451
|
+ trimEnd(string?: string, chars?: string): string;
|
|
452
|
+ trimStart(string?: string, chars?: string): string;
|
|
453
|
+ truncate(string?: string, options?: TruncateOptions): string;
|
|
454
|
+ unescape(string?: string): string;
|
|
455
|
+ upperCase(string?: string): string;
|
|
456
|
+ upperFirst(string?: string): string;
|
|
457
|
+ words(string?: string, pattern?: RegExp|string): Array<string>;
|
|
458
|
+
|
|
459
|
+ // Util
|
|
460
|
+ attempt(func: Function): any;
|
|
461
|
+ bindAll(object?: ?Object, methodNames: Array<string>): Object;
|
|
462
|
+ bindAll(object?: ?Object, ...methodNames: Array<string>): Object;
|
|
463
|
+ cond(pairs: NestedArray<Function>): Function;
|
|
464
|
+ conforms(source: Object): Function;
|
|
465
|
+ constant<T>(value: T): () => T;
|
|
466
|
+ defaultTo<T1:string|boolean|Object,T2>(value: T1, defaultValue: T2): T1;
|
|
467
|
+ // NaN is a number instead of its own type, otherwise it would behave like null/void
|
|
468
|
+ defaultTo<T1:number,T2>(value: T1, defaultValue: T2): T1|T2;
|
|
469
|
+ defaultTo<T1:void|null,T2>(value: T1, defaultValue: T2): T2;
|
|
470
|
+ flow(...funcs?: Array<Function>): Function;
|
|
471
|
+ flow(funcs?: Array<Function>): Function;
|
|
472
|
+ flowRight(...funcs?: Array<Function>): Function;
|
|
473
|
+ flowRight(funcs?: Array<Function>): Function;
|
|
474
|
+ identity<T>(value: T): T;
|
|
475
|
+ iteratee(func?: any): Function;
|
|
476
|
+ matches(source: Object): Function;
|
|
477
|
+ matchesProperty(path?: ?Array<string>|string, srcValue: any): Function;
|
|
478
|
+ method(path?: ?Array<string>|string, ...args?: Array<any>): Function;
|
|
479
|
+ methodOf(object?: ?Object, ...args?: Array<any>): Function;
|
|
480
|
+ mixin<T: Function|Object>(object?: T, source: Object, options?: { chain: bool }): T;
|
|
481
|
+ noConflict(): Lodash;
|
|
482
|
+ noop(...args: Array<mixed>): void;
|
|
483
|
+ nthArg(n?: number): Function;
|
|
484
|
+ over(...iteratees: Array<Function>): Function;
|
|
485
|
+ over(iteratees: Array<Function>): Function;
|
|
486
|
+ overEvery(...predicates: Array<Function>): Function;
|
|
487
|
+ overEvery(predicates: Array<Function>): Function;
|
|
488
|
+ overSome(...predicates: Array<Function>): Function;
|
|
489
|
+ overSome(predicates: Array<Function>): Function;
|
|
490
|
+ property(path?: ?Array<string>|string): Function;
|
|
491
|
+ propertyOf(object?: ?Object): Function;
|
|
492
|
+ range(start: number, end: number, step?: number): Array<number>;
|
|
493
|
+ range(end: number, step?: number): Array<number>;
|
|
494
|
+ rangeRight(start: number, end: number, step?: number): Array<number>;
|
|
495
|
+ rangeRight(end: number, step?: number): Array<number>;
|
|
496
|
+ runInContext(context?: Object): Function;
|
|
497
|
+
|
|
498
|
+ stubArray(): Array<*>;
|
|
499
|
+ stubFalse(): false;
|
|
500
|
+ stubObject(): {};
|
|
501
|
+ stubString(): '';
|
|
502
|
+ stubTrue(): true;
|
|
503
|
+ times(n: number, ...rest: Array<void>): Array<number>;
|
|
504
|
+ times<T>(n: number, iteratee: ((i: number) => T)): Array<T>;
|
|
505
|
+ toPath(value: any): Array<string>;
|
|
506
|
+ uniqueId(prefix?: string): string;
|
|
507
|
+
|
|
508
|
+ // Properties
|
|
509
|
+ VERSION: string;
|
|
510
|
+ templateSettings: TemplateSettings;
|
|
511
|
+ }
|
|
512
|
+
|
|
513
|
+ declare var exports: Lodash;
|
|
514
|
+}
|