Ver código fonte

flow-typed

j8
Lyubo Marinov 7 anos atrás
pai
commit
8f97da3265

+ 514
- 0
flow-typed/npm/lodash_v4.x.x.js Ver arquivo

@@ -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
+}

+ 57
- 24
flow-typed/npm/react-redux_v5.x.x.js Ver arquivo

@@ -1,10 +1,9 @@
1
-// flow-typed signature: 0ed284c5a2e97a9e3c0e87af3dedc09d
2
-// flow-typed version: bdf1e66252/react-redux_v5.x.x/flow_>=v0.30.x
1
+// flow-typed signature: c0e8d9867aff7576bb7cf63fe60a6af3
2
+// flow-typed version: 83053e4020/react-redux_v5.x.x/flow_>=v0.30.x <=v0.52.x
3 3
 
4
-import type { Dispatch, Store } from 'redux'
5
-
6
-declare module 'react-redux' {
4
+import type { Dispatch, Store } from "redux";
7 5
 
6
+declare module "react-redux" {
8 7
   /*
9 8
 
10 9
     S = State
@@ -15,30 +14,58 @@ declare module 'react-redux' {
15 14
 
16 15
   */
17 16
 
18
-  declare type MapStateToProps<S, OP: Object, SP: Object> = (state: S, ownProps: OP) => SP | MapStateToProps<S, OP, SP>;
19
-
20
-  declare type MapDispatchToProps<A, OP: Object, DP: Object> = ((dispatch: Dispatch<A>, ownProps: OP) => DP) | DP;
21
-
22
-  declare type MergeProps<SP, DP: Object, OP: Object, P: Object> = (stateProps: SP, dispatchProps: DP, ownProps: OP) => P;
23
-
24
-  declare type StatelessComponent<P> = (props: P) => ?React$Element<any>;
25
-
26
-  declare class ConnectedComponent<OP, P, Def, St> extends React$Component<void, OP, void> {
27
-    static WrappedComponent: Class<React$Component<Def, P, St>>;
28
-    getWrappedInstance(): React$Component<Def, P, St>;
29
-    static defaultProps: void;
30
-    props: OP;
31
-    state: void;
17
+  declare type MapStateToProps<S, OP: Object, SP: Object> = (
18
+    state: S,
19
+    ownProps: OP
20
+  ) => ((state: S, ownProps: OP) => SP) | SP;
21
+
22
+  declare type MapDispatchToProps<A, OP: Object, DP: Object> =
23
+    | ((dispatch: Dispatch<A>, ownProps: OP) => DP)
24
+    | DP;
25
+
26
+  declare type MergeProps<SP, DP: Object, OP: Object, P: Object> = (
27
+    stateProps: SP,
28
+    dispatchProps: DP,
29
+    ownProps: OP
30
+  ) => P;
31
+
32
+  declare type Context = { store: Store<*, *> };
33
+
34
+  declare type StatelessComponent<P> = (
35
+    props: P,
36
+    context: Context
37
+  ) => ?React$Element<any>;
38
+
39
+  declare class ConnectedComponent<OP, P, Def, St> extends React$Component<
40
+    void,
41
+    OP,
42
+    void
43
+  > {
44
+    static WrappedComponent: Class<React$Component<Def, P, St>>,
45
+    getWrappedInstance(): React$Component<Def, P, St>,
46
+    static defaultProps: void,
47
+    props: OP,
48
+    state: void
32 49
   }
33 50
 
34
-  declare type ConnectedComponentClass<OP, P, Def, St> = Class<ConnectedComponent<OP, P, Def, St>>;
51
+  declare type ConnectedComponentClass<OP, P, Def, St> = Class<
52
+    ConnectedComponent<OP, P, Def, St>
53
+  >;
35 54
 
36 55
   declare type Connector<OP, P> = {
37
-    (component: StatelessComponent<P>): ConnectedComponentClass<OP, P, void, void>;
38
-    <Def, St>(component: Class<React$Component<Def, P, St>>): ConnectedComponentClass<OP, P, Def, St>;
56
+    (
57
+      component: StatelessComponent<P>
58
+    ): ConnectedComponentClass<OP, P, void, void>,
59
+    <Def, St>(
60
+      component: Class<React$Component<Def, P, St>>
61
+    ): ConnectedComponentClass<OP, P, Def, St>
39 62
   };
40 63
 
41
-  declare class Provider<S, A> extends React$Component<void, { store: Store<S, A>, children?: any }, void> { }
64
+  declare class Provider<S, A> extends React$Component<
65
+    void,
66
+    { store: Store<S, A>, children?: any },
67
+    void
68
+  > {}
42 69
 
43 70
   declare type ConnectOptions = {
44 71
     pure?: boolean,
@@ -81,9 +108,15 @@ declare module 'react-redux' {
81 108
 
82 109
   declare function connect<S, A, OP, SP, DP, P>(
83 110
     mapStateToProps: MapStateToProps<S, OP, SP>,
84
-    mapDispatchToProps: MapDispatchToProps<A, OP, DP>,
111
+    mapDispatchToProps: Null,
85 112
     mergeProps: MergeProps<SP, DP, OP, P>,
86 113
     options?: ConnectOptions
87 114
   ): Connector<OP, P>;
88 115
 
116
+  declare function connect<S, A, OP, SP, DP, P>(
117
+    mapStateToProps: MapStateToProps<S, OP, SP>,
118
+    mapDispatchToProps: MapDispatchToProps<A, OP, DP>,
119
+    mergeProps: MergeProps<SP, DP, OP, P>,
120
+    options?: ConnectOptions
121
+  ): Connector<OP, P>;
89 122
 }

+ 72
- 20
flow-typed/npm/redux_v3.x.x.js Ver arquivo

@@ -1,5 +1,5 @@
1
-// flow-typed signature: 7f1a115f75043c44385071ea3f33c586
2
-// flow-typed version: 358375125e/redux_v3.x.x/flow_>=v0.33.x
1
+// flow-typed signature: 86993bd000012d3e1ef10d757d16952d
2
+// flow-typed version: a165222d28/redux_v3.x.x/flow_>=v0.33.x
3 3
 
4 4
 declare module 'redux' {
5 5
 
@@ -7,19 +7,21 @@ declare module 'redux' {
7 7
 
8 8
     S = State
9 9
     A = Action
10
+    D = Dispatch
10 11
 
11 12
   */
12 13
 
13
-  declare type Dispatch<A: { type: $Subtype<string> }> = (action: A) => A;
14
+  declare type DispatchAPI<A> = (action: A) => A;
15
+  declare type Dispatch<A: { type: $Subtype<string> }> = DispatchAPI<A>;
14 16
 
15
-  declare type MiddlewareAPI<S, A> = {
16
-    dispatch: Dispatch<A>;
17
+  declare type MiddlewareAPI<S, A, D = Dispatch<A>> = {
18
+    dispatch: D;
17 19
     getState(): S;
18 20
   };
19 21
 
20
-  declare type Store<S, A> = {
22
+  declare type Store<S, A, D = Dispatch<A>> = {
21 23
     // rewrite MiddlewareAPI members in order to get nicer error messages (intersections produce long messages)
22
-    dispatch: Dispatch<A>;
24
+    dispatch: D;
23 25
     getState(): S;
24 26
     subscribe(listener: () => void): () => void;
25 27
     replaceReducer(nextReducer: Reducer<S, A>): void
@@ -29,29 +31,79 @@ declare module 'redux' {
29 31
 
30 32
   declare type CombinedReducer<S, A> = (state: $Shape<S> & {} | void, action: A) => S;
31 33
 
32
-  declare type Middleware<S, A> =
33
-    (api: MiddlewareAPI<S, A>) =>
34
-      (next: Dispatch<A>) => Dispatch<A>;
34
+  declare type Middleware<S, A, D = Dispatch<A>> =
35
+    (api: MiddlewareAPI<S, A, D>) =>
36
+      (next: D) => D;
35 37
 
36
-  declare type StoreCreator<S, A> = {
37
-    (reducer: Reducer<S, A>, enhancer?: StoreEnhancer<S, A>): Store<S, A>;
38
-    (reducer: Reducer<S, A>, preloadedState: S, enhancer?: StoreEnhancer<S, A>): Store<S, A>;
38
+  declare type StoreCreator<S, A, D = Dispatch<A>> = {
39
+    (reducer: Reducer<S, A>, enhancer?: StoreEnhancer<S, A, D>): Store<S, A, D>;
40
+    (reducer: Reducer<S, A>, preloadedState: S, enhancer?: StoreEnhancer<S, A, D>): Store<S, A, D>;
39 41
   };
40 42
 
41
-  declare type StoreEnhancer<S, A> = (next: StoreCreator<S, A>) => StoreCreator<S, A>;
43
+  declare type StoreEnhancer<S, A, D = Dispatch<A>> = (next: StoreCreator<S, A, D>) => StoreCreator<S, A, D>;
42 44
 
43
-  declare function createStore<S, A>(reducer: Reducer<S, A>, enhancer?: StoreEnhancer<S, A>): Store<S, A>;
44
-  declare function createStore<S, A>(reducer: Reducer<S, A>, preloadedState: S, enhancer?: StoreEnhancer<S, A>): Store<S, A>;
45
+  declare function createStore<S, A, D>(reducer: Reducer<S, A>, enhancer?: StoreEnhancer<S, A, D>): Store<S, A, D>;
46
+  declare function createStore<S, A, D>(reducer: Reducer<S, A>, preloadedState: S, enhancer?: StoreEnhancer<S, A, D>): Store<S, A, D>;
45 47
 
46
-  declare function applyMiddleware<S, A>(...middlewares: Array<Middleware<S, A>>): StoreEnhancer<S, A>;
48
+  declare function applyMiddleware<S, A, D>(...middlewares: Array<Middleware<S, A, D>>): StoreEnhancer<S, A, D>;
47 49
 
48 50
   declare type ActionCreator<A, B> = (...args: Array<B>) => A;
49 51
   declare type ActionCreators<K, A> = { [key: K]: ActionCreator<A, any> };
50 52
 
51
-  declare function bindActionCreators<A, C: ActionCreator<A, any>>(actionCreator: C, dispatch: Dispatch<A>): C;
52
-  declare function bindActionCreators<A, K, C: ActionCreators<K, A>>(actionCreators: C, dispatch: Dispatch<A>): C;
53
+  declare function bindActionCreators<A, C: ActionCreator<A, any>, D: DispatchAPI<A>>(actionCreator: C, dispatch: D): C;
54
+  declare function bindActionCreators<A, K, C: ActionCreators<K, A>, D: DispatchAPI<A>>(actionCreators: C, dispatch: D): C;
53 55
 
54 56
   declare function combineReducers<O: Object, A>(reducers: O): CombinedReducer<$ObjMap<O, <S>(r: Reducer<S, any>) => S>, A>;
55 57
 
56
-  declare function compose<S, A>(...fns: Array<StoreEnhancer<S, A>>): Function;
58
+  declare function compose<A, B>(ab: (a: A) => B): (a: A) => B
59
+  declare function compose<A, B, C>(
60
+    bc: (b: B) => C,
61
+    ab: (a: A) => B
62
+  ): (a: A) => C
63
+  declare function compose<A, B, C, D>(
64
+    cd: (c: C) => D,
65
+    bc: (b: B) => C,
66
+    ab: (a: A) => B
67
+  ): (a: A) => D
68
+  declare function compose<A, B, C, D, E>(
69
+    de: (d: D) => E,
70
+    cd: (c: C) => D,
71
+    bc: (b: B) => C,
72
+    ab: (a: A) => B
73
+  ): (a: A) => E
74
+  declare function compose<A, B, C, D, E, F>(
75
+    ef: (e: E) => F,
76
+    de: (d: D) => E,
77
+    cd: (c: C) => D,
78
+    bc: (b: B) => C,
79
+    ab: (a: A) => B
80
+  ): (a: A) => F
81
+  declare function compose<A, B, C, D, E, F, G>(
82
+    fg: (f: F) => G,
83
+    ef: (e: E) => F,
84
+    de: (d: D) => E,
85
+    cd: (c: C) => D,
86
+    bc: (b: B) => C,
87
+    ab: (a: A) => B
88
+  ): (a: A) => G
89
+  declare function compose<A, B, C, D, E, F, G, H>(
90
+    gh: (g: G) => H,
91
+    fg: (f: F) => G,
92
+    ef: (e: E) => F,
93
+    de: (d: D) => E,
94
+    cd: (c: C) => D,
95
+    bc: (b: B) => C,
96
+    ab: (a: A) => B
97
+  ): (a: A) => H
98
+  declare function compose<A, B, C, D, E, F, G, H, I>(
99
+    hi: (h: H) => I,
100
+    gh: (g: G) => H,
101
+    fg: (f: F) => G,
102
+    ef: (e: E) => F,
103
+    de: (d: D) => E,
104
+    cd: (c: C) => D,
105
+    bc: (b: B) => C,
106
+    ab: (a: A) => B
107
+  ): (a: A) => I
108
+
57 109
 }

+ 81
- 0
flow-typed/npm/uuid_v3.x.x.js Ver arquivo

@@ -0,0 +1,81 @@
1
+// flow-typed signature: 615e568e95029d58f116dd157e320137
2
+// flow-typed version: 2b95c0dfc1/uuid_v3.x.x/flow_>=v0.32.x
3
+
4
+declare module "uuid" {
5
+  declare class uuid {
6
+    static (
7
+      options?: {|
8
+        random?: number[],
9
+        rng?: () => number[] | Buffer
10
+      |},
11
+      buffer?: number[] | Buffer,
12
+      offset?: number
13
+    ): string,
14
+
15
+    static v1(
16
+      options?: {|
17
+        node?: number[],
18
+        clockseq?: number,
19
+        msecs?: number | Date,
20
+        nsecs?: number
21
+      |},
22
+      buffer?: number[] | Buffer,
23
+      offset?: number
24
+    ): string,
25
+
26
+    static v4(
27
+      options?: {|
28
+        random?: number[],
29
+        rng?: () => number[] | Buffer
30
+      |},
31
+      buffer?: number[] | Buffer,
32
+      offset?: number
33
+    ): string
34
+  }
35
+  declare module.exports: Class<uuid>;
36
+}
37
+
38
+declare module "uuid/v1" {
39
+  declare class v1 {
40
+    static (
41
+      options?: {|
42
+        node?: number[],
43
+        clockseq?: number,
44
+        msecs?: number | Date,
45
+        nsecs?: number
46
+      |},
47
+      buffer?: number[] | Buffer,
48
+      offset?: number
49
+    ): string
50
+  }
51
+
52
+  declare module.exports: Class<v1>;
53
+}
54
+
55
+declare module "uuid/v4" {
56
+  declare class v4 {
57
+    static (
58
+      options?: {|
59
+        random?: number[],
60
+        rng?: () => number[] | Buffer
61
+      |},
62
+      buffer?: number[] | Buffer,
63
+      offset?: number
64
+    ): string
65
+  }
66
+
67
+  declare module.exports: Class<v4>;
68
+}
69
+
70
+declare module "uuid/v5" {
71
+  declare class v5 {
72
+    static (
73
+      name?: string | number[],
74
+      namespace?: string | number[],
75
+      buffer?: number[] | Buffer,
76
+      offset?: number
77
+    ): string
78
+  }
79
+
80
+  declare module.exports: Class<v5>;
81
+}

Carregando…
Cancelar
Salvar